1 #include "AliRICHPreprocessor.h" //header
3 #include <AliCDBMetaData.h>
4 #include <AliDCSValue.h>
5 #include <TObjArray.h> //Test()
6 #include <TObjString.h> //Test()
7 #include <AliCDBManager.h> //Test()
8 #include <AliCDBEntry.h> //Test()
9 //#include <AliTestShuttle.h> //Test()
10 #include <TRandom.h> //Test()
11 #include <TF1.h> //Process()
12 #include <TGraph.h> //Process()
14 ClassImp(AliRICHPreprocessor)
16 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17 void AliRICHPreprocessor::Initialize(Int_t run, UInt_t startTime,UInt_t endTime)
19 AliPreprocessor::Initialize(run, startTime, endTime);
21 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
22 UInt_t AliRICHPreprocessor::Process(TMap* pDcsMap)
25 // Argumets: pDcsMap - map of structure "alias name" - TObjArray of AliDCSValue
27 TList* list = GetFileSources(kDAQ, "MAP"); //first analyse a set of pedestal files
29 Log("The following sources produced files with the id MAP");
34 if(!pDcsMap) return 0; //no DCS map provided
36 TObjArray result; result.SetOwner(kTRUE); //result is a array of TF1
39 for(Int_t iCh=0;iCh<7;iCh++){ //aliases loop
40 for(Int_t iRad=0;iRad<3;iRad++){
41 TObjArray *pValLst=(TObjArray*)pDcsMap->GetValue(Form("HMP_DET/HMP_MP%i/HMP_MP%i_LIQ_LOOP.actual.sensors.Rad%iIn_Temp",iCh,iCh,iRad));//get data serias
42 if(!pValLst) continue; //no data serias this alias
43 TF1 *pF1=new TF1("t11","[0]+[1]*x+[2]*sin([3]*x)",0,10); pF1->SetLineColor(iRad+2); //temp=f(time) for fitting data seria
44 TGraph *pGr=new TGraph; //tmp graph of sensor data versus time
45 TIter next(pValLst); AliDCSValue *pDcsVal; Int_t i=0;
46 while((pDcsVal=(AliDCSValue*)next())) //loop over data points for this sensor
47 pGr->SetPoint(i++,pDcsVal->GetTimeStamp(),pDcsVal->GetFloat()); //and fill the graph
48 pGr->Fit(pF1); //now fit the graph
54 AliCDBMetaData metaData; metaData.SetBeamPeriod(0); metaData.SetResponsible("AliRICHPreprocessor"); metaData.SetComment("SIMULATED");
56 return Store("DCS", "RefIdx", &result, &metaData); //use AliPreprocessor::Store(), not allowed to use AliCDBManager directly
59 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++