]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/AliRICHPreprocessor.cxx
Initial commit
[u/mrichter/AliRoot.git] / RICH / AliRICHPreprocessor.cxx
1 #include "AliRICHPreprocessor.h" //header
2
3 #include <AliCDBMetaData.h>
4 #include <AliDCSValue.h>
5 #include "AliLog.h"
6 #include "AliTestDataDCS.h"
7
8 #include <TTimeStamp.h>
9
10 //
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.
14 //
15
16 ClassImp(AliRICHPreprocessor)
17
18 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
19 void AliRICHPreprocessor::Initialize(Int_t run, UInt_t startTime,UInt_t endTime)
20 {
21
22   AliPreprocessor::Initialize(run, startTime, endTime);
23
24   Log(Form("\n\tRun %d \n\tStartTime %s \n\tEndTime %s", run,
25                 TTimeStamp(startTime).AsString(),
26                 TTimeStamp(endTime).AsString()));
27
28 }
29 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
30 UInt_t AliRICHPreprocessor::Process(TMap* pDcsMap)
31 {
32
33   if(!pDcsMap)  return 0;
34
35   const char* fileName = GetFile(kDAQ, "PEDESTALS", "GDC");
36   if(fileName) AliInfo(Form("Got the file %s, now we can extract some values.", fileName));
37
38   TList* list = GetFileSources(kDAQ, "DRIFTVELOCITY");
39   if (list){
40     AliInfo("The following sources produced files with the id DRIFTVELOCITY");
41     list->Print();
42     delete list;
43   }
44
45   //Now we have to store the final CDB file
46   AliCDBMetaData metaData;
47         metaData.SetBeamPeriod(0);
48         metaData.SetResponsible("RICH expert");
49         metaData.SetComment("This data produced by AliRICHPreprocessor from simulated input.");
50
51   UInt_t result = Store(pTempFreon, &metaData); //use AliPreprocessor::Store(), not allowed to use AliCDBManager directly
52
53   return result;
54 }
55