]>
Commit | Line | Data |
---|---|---|
457c0713 | 1 | /// \file testPed.C |
2 | /// | |
3 | /// Simple macro to make pedstal calibration | |
4 | /// and visualize calibration data | |
43f7c6fc | 5 | |
6 | void testPed(Char_t *fileName) | |
7 | { | |
8 | AliRawReaderRoot *rawReader = new AliRawReaderRoot(fileName); | |
9 | if ( !rawReader ) return; | |
10 | AliTPCCalibPedestal *calib = new AliTPCCalibPedestal; | |
11 | printf("Processing data\n"); | |
12 | Int_t event=0; | |
13 | while (rawReader->NextEvent()){ | |
14 | calib->ProcessEvent(rawReader); | |
15 | printf("Processing event\t%d\n",event); | |
16 | event++; | |
17 | } | |
18 | calib->Analyse(); | |
19 | calib->DumpToFile("PedestalData.root"); | |
20 | delete rawReader; | |
21 | delete calib; | |
457c0713 | 22 | |
43f7c6fc | 23 | // |
24 | TFile f("PedestalData.root"); | |
25 | AliTPCCalibPedestal* ped = (AliTPCCalibPedestal*)f.Get("AliTPCCalibPedestal"); | |
26 | AliTPCCalPad * pad0 = new AliTPCCalPad(ped->GetCalPadRMS()); | |
27 | AliTPCCalPad * pad1 = new AliTPCCalPad(ped->GetCalPadPedestal()); | |
28 | pad0->SetName("Noise"); | |
29 | pad1->SetName("Pedestal"); | |
30 | ||
31 | AliTPCPreprocessorOnline preprocesor; | |
32 | preprocesor.AddComponent(pad0); | |
33 | preprocesor.AddComponent(pad1); | |
34 | preprocesor.DumpToFile("CalibTree.root"); | |
35 | AliTPCCalibViewerGUI::ShowGUI("CalibTree.root"); | |
36 | } | |
37 | ||
38 | ||
39 | void testPed0(Char_t *fileName) | |
40 | { | |
457c0713 | 41 | /// |
42 | ||
43f7c6fc | 43 | AliRawReaderRoot *rawReader = new AliRawReaderRoot(fileName); |
44 | if ( !rawReader ) return; | |
457c0713 | 45 | AliTPCCalibPedestal *calib = new AliTPCCalibPedestal; |
43f7c6fc | 46 | printf("Processing data\n"); |
47 | Int_t event=0; | |
48 | while (rawReader->NextEvent()){ | |
457c0713 | 49 | calib->ProcessEvent(rawReader); |
43f7c6fc | 50 | printf("Processing event\t%d\n",event); |
51 | event++; | |
52 | } | |
457c0713 | 53 | calib->Analyse(); |
43f7c6fc | 54 | // |
55 | AliTPCCalPad * pad0 = new AliTPCCalPad(calib->GetCalPadRMS()); | |
56 | AliTPCCalPad * pad1 = new AliTPCCalPad(calib->GetCalPadPedestal()); | |
57 | pad0->SetName("Noise"); | |
58 | pad1->SetName("Pedestal"); | |
59 | // | |
60 | AliTPCPreprocessorOnline preprocesor; | |
61 | preprocesor.AddComponent(pad0); | |
62 | preprocesor.AddComponent(pad1); | |
63 | preprocesor.DumpToFile("CalibTree.root"); | |
64 | AliTPCCalibViewerGUI::ShowGUI("CalibTree.root"); | |
65 | } | |
66 |