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