1 #include "AliTestPreprocessor.h"
3 #include "AliCDBMetaData.h"
4 #include "AliDCSValue.h"
6 #include "AliTestDataDCS.h"
8 #include <TTimeStamp.h>
11 // This class is an example for a simple preprocessor.
12 // It takes data from DCS and passes it to the class AliTestDataDCS, which
13 // reformats its. This class is then written to the CDB.
16 ClassImp(AliTestPreprocessor)
18 AliTestPreprocessor::AliTestPreprocessor(const char* detector, AliShuttleInterface* shuttle) :
19 AliPreprocessor(detector, shuttle),
25 AliTestPreprocessor::~AliTestPreprocessor()
30 void AliTestPreprocessor::Initialize(Int_t run, UInt_t startTime,
33 // Creates AliTestDataDCS object
35 AliPreprocessor::Initialize(run, startTime, endTime);
37 AliInfo(Form("\n\tRun %d \n\tStartTime %s \n\tEndTime %s", run,
38 TTimeStamp(startTime).AsString(),
39 TTimeStamp(endTime).AsString()));
41 fData = new AliTestDataDCS(fRun, fStartTime, fEndTime);
44 Int_t AliTestPreprocessor::Process(TMap* dcsAliasMap)
46 // Fills data into a AliTestDataDCS object
51 fData->ProcessData(*dcsAliasMap);
53 const char* fileName = GetFile(kDAQ, "PEDESTALS", "GDC");
55 AliInfo(Form("Got the file %s, now we can extract some values.", fileName));
56 // open file, extract some values, write them to fData
58 AliCDBMetaData metaData;
59 metaData.SetBeamPeriod(0);
60 metaData.SetResponsible("Alberto Colla");
61 metaData.SetComment("This preprocessor fills an AliTestDataDCS object.");
63 Store(fData, &metaData);