2 Simple macro to make pedstal calibration
3 and visualize calibration data
5 .L $ALICE_ROOT/TPC/macros/testDataQA.C
12 void testDataQA(Char_t *fileName, Int_t maxevent=10)
14 AliRawReaderRoot *rawReader = new AliRawReaderRoot(fileName);
15 if ( !rawReader ) return;
16 AliTPCdataQA *calib = new AliTPCdataQA;
17 AliTPCdataQA *calibFast = new AliTPCdataQA;
18 calib->SetRangeTime(1,1000);
19 calibFast->SetRangeTime(1,1000);
20 printf("Processing data\n");
22 while (rawReader->NextEvent()){
23 calib->ProcessEvent(rawReader);
25 calibFast->ProcessEventFast(rawReader);
27 // if you wann to check the handling of Analyse updates uncomment this
28 // if(gRandom->Rndm()<0.3) {
30 // calibFast->Analyse();
32 if (event>maxevent) break;
37 TFile file1("dataQATestAnalyse.root","recreate");
38 calib->Write("AliTPCdataQA");
39 calibFast->Write("AliTPCdataQAFast");
46 TFile file2("dataQATestAnalyse.root");
47 AliTPCdataQA* cal = (AliTPCdataQA*)file2.Get("AliTPCdataQA");
48 AliTPCdataQA* calFast = (AliTPCdataQA*)file2.Get("AliTPCdataQAFast");
50 AliTPCPreprocessorOnline preprocesor;
51 preprocesor.AddComponent(cal->GetNoThreshold());
52 preprocesor.AddComponent(cal->GetOverThreshold10());
53 preprocesor.AddComponent(cal->GetOverThreshold20());
54 preprocesor.AddComponent(cal->GetOverThreshold30());
55 preprocesor.AddComponent(cal->GetNLocalMaxima());
56 preprocesor.AddComponent(cal->GetMeanCharge());
57 preprocesor.AddComponent(cal->GetMaxCharge());
58 preprocesor.AddComponent(cal->GetNTimeBins());
59 preprocesor.AddComponent(cal->GetNPads());
60 preprocesor.AddComponent(cal->GetTimePosition());
62 AliTPCCalPad* calPadNoThr= new AliTPCCalPad(*calFast->GetNoThreshold());
63 AliTPCCalPad* calPadThr10= new AliTPCCalPad(*calFast->GetOverThreshold10());
64 AliTPCCalPad* calPadThr20= new AliTPCCalPad(*calFast->GetOverThreshold20());
65 AliTPCCalPad* calPadThr30= new AliTPCCalPad(*calFast->GetOverThreshold30());
66 AliTPCCalPad* calNLocal = new AliTPCCalPad(*calFast->GetNLocalMaxima());
67 AliTPCCalPad* calPadMean = new AliTPCCalPad(*calFast->GetMeanCharge());
68 AliTPCCalPad* calPadMax = new AliTPCCalPad(*calFast->GetMaxCharge());
69 AliTPCCalPad* calNTime = new AliTPCCalPad(*calFast->GetNTimeBins());
70 AliTPCCalPad* calNPad = new AliTPCCalPad(*calFast->GetNPads());
71 AliTPCCalPad* calTimePos = new AliTPCCalPad(*calFast->GetTimePosition());
73 calPadNoThr ->SetName(Form("%sFast", calPadNoThr->GetName()));
74 calPadThr10 ->SetName(Form("%sFast", calPadThr10->GetName()));
75 calPadThr20 ->SetName(Form("%sFast", calPadThr20->GetName()));
76 calPadThr30 ->SetName(Form("%sFast", calPadThr30->GetName()));
77 calNLocal ->SetName(Form("%sFast", calNLocal ->GetName()));
78 calPadMean ->SetName(Form("%sFast", calPadMean ->GetName()));
79 calPadMax ->SetName(Form("%sFast", calPadMax ->GetName()));
80 calNTime ->SetName(Form("%sFast", calNTime ->GetName()));
81 calNPad ->SetName(Form("%sFast", calNPad ->GetName()));
82 calTimePos ->SetName(Form("%sFast", calTimePos ->GetName()));
84 preprocesor.AddComponent(calPadNoThr );
85 preprocesor.AddComponent(calPadThr10 );
86 preprocesor.AddComponent(calPadThr20 );
87 preprocesor.AddComponent(calPadThr30 );
88 preprocesor.AddComponent(calNLocal );
89 preprocesor.AddComponent(calPadMean );
90 preprocesor.AddComponent(calPadMax );
91 preprocesor.AddComponent(calNTime );
92 preprocesor.AddComponent(calNPad );
93 preprocesor.AddComponent(calTimePos );
95 preprocesor.DumpToFile("CalibTreeTestAnalyse.root");
96 AliTPCCalibViewerGUI::ShowGUI("CalibTreeTestAnalyse.root");