]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/Macros/AliTRDcheckConfig.C
Parsing of the DCS configuration name into parameters (e.g. number of time bins)...
[u/mrichter/AliRoot.git] / TRD / Macros / AliTRDcheckConfig.C
1 //===================================================================================\r
2 // This is a macro to analyze TRD/Calib/DCS OCDB objects either\r
3 // from the grid for a given run number or from a local object.\r
4 // If you want to analyze data from the grid, please don't forget to\r
5 // have a valid alien token initialized\r
6 //\r
7 // Arguments:\r
8 // Either provide a run number as the first argument to access the \r
9 // corresponding file on the grid\r
10 // or the path + filename as the second argument (and an arbitrary number as the first)\r
11 // to access a local file.\r
12 //\r
13 // Please note that leading zeros in the run number are not supported.\r
14 //\r
15 // Examples:\r
16 // .x AliTRDcheckConfig.C (60111)\r
17 // .x AliTRDcheckConfig.C (0, "$ALICE_ROOT/TRD/Calib/DCS/Run0_999999999_v0_s0.root")\r
18 //\r
19 // Please contact Frederick Kramer or Hans Beck in case of problems\r
20 //===================================================================================\r
21 \r
22 \r
23 const Int_t nROC = 540;\r
24 const Int_t nROB = 8;\r
25 const Int_t nMCM = 18;\r
26 const Int_t cArraySize = 1000;\r
27 \r
28 Bool_t errors = false;\r
29 Int_t  calVer = 0;\r
30 \r
31 Int_t AnalyzeArray(Int_t states[cArraySize], Int_t occur[cArraySize]) {\r
32   long long srtIndx[cArraySize] = 0;\r
33   \r
34   TMath::Sort(cArraySize, occur, srtIndx);\r
35 \r
36   Int_t totalSum = 0, subSum = 0, iIndex = 0;\r
37   for (Int_t i=0; i<cArraySize; i++) totalSum += occur[i];\r
38   \r
39   cout << "    The majority ("<< occur[srtIndx[0]] << " of " \r
40        << totalSum <<") is: " << states[srtIndx[0]] << endl;\r
41   subSum = occur[srtIndx[0]];\r
42   while (totalSum != subSum) {\r
43     if (++iIndex > 999) {\r
44       cout << "E : out of bounds." << endl;\r
45       break;\r
46     }\r
47     Printf("    Next: %7d (%d)", states[srtIndx[iIndex]], occur[srtIndx[iIndex]]);\r
48     subSum += occur[srtIndx[iIndex]];\r
49   }\r
50   return states[srtIndx[0]];\r
51 }\r
52 \r
53 \r
54 \r
55 void FillItemInArray(Int_t states[cArraySize], Int_t occur[cArraySize], Int_t item, Bool_t allowNeg) {\r
56   for (Int_t iArrPos=0; iArrPos<cArraySize; iArrPos++) {\r
57     // if allowNeg is set then we change the number indicating that the item ws not set from -1 to -100\r
58     // so that small negitive numbers can be sorted too\r
59     if ((allowNeg && item == -100000) || (!allowNeg && item == -1)) break; // value not set\r
60     if (states[iArrPos] == item) {\r
61       occur[iArrPos]++;\r
62       break;\r
63     } else if (occur[iArrPos] == 0) {\r
64       states[iArrPos] = item;\r
65       occur[iArrPos]++;\r
66       break;\r
67     }\r
68   }\r
69 }\r
70 \r
71 void GetMajoritys(TObject* calDCSObj) {\r
72   \r
73   Int_t gsmStates[cArraySize] = {0}, gsmOccur[cArraySize] = {0};\r
74   Int_t nimStates[cArraySize] = {0}, nimOccur[cArraySize] = {0};\r
75   Int_t nevStates[cArraySize] = {0}, nevOccur[cArraySize] = {0};\r
76   Int_t nptStates[cArraySize] = {0}, nptOccur[cArraySize] = {0};\r
77   \r
78   for (Int_t i=0; i<cArraySize; i++) {\r
79     gsmStates[i] = 0; gsmOccur[i]  = 0;\r
80     nimStates[i] = 0; nimOccur[i]  = 0;\r
81     nevStates[i] = 0; nevOccur[i]  = 0;\r
82     nptStates[i] = 0; nptOccur[i]  = 0;  \r
83   }\r
84   \r
85 \r
86   Int_t feeArrSiz = 0;\r
87   if (calVer == 1) feeArrSiz = ((AliTRDCalDCS*)calDCSObj)->GetFEEArr()->GetSize();\r
88   if (calVer == 2) feeArrSiz = ((AliTRDCalDCSv2*)calDCSObj)->GetFEEArr()->GetSize();\r
89 \r
90   for (Int_t i=0; i<nROC && i<feeArrSiz; i++) {\r
91     TObject* idcsfee;\r
92     if (calVer == 1) idcsfee = ((AliTRDCalDCS*)calDCSObj)->GetCalDCSFEEObj(i);\r
93     if (calVer == 2) idcsfee = ((AliTRDCalDCSv2*)calDCSObj)->GetCalDCSFEEObj(i);\r
94 \r
95     if (idcsfee == NULL) continue;\r
96 \r
97     Int_t sbit = 0;\r
98     if (calVer == 1) ((AliTRDCalDCSFEE*)idcsfee)->GetStatusBit();\r
99     if (calVer == 2) ((AliTRDCalDCSFEEv2*)idcsfee)->GetStatusBit();\r
100 \r
101     if (sbit != 0) continue;\r
102 \r
103     for (Int_t j=0; j<nROB; j++) {\r
104       for (Int_t k=0; k<nMCM; k++) {\r
105         Int_t igsm = 0;\r
106         Int_t inim = 0;\r
107         Int_t inev = 0;\r
108         Int_t inpt = 0;\r
109         if (calVer == 1) {\r
110           igsm = ((AliTRDCalDCSFEE*)idcsfee)->GetMCMGlobalState(j,k);\r
111           inim = ((AliTRDCalDCSFEE*)idcsfee)->GetMCMStateNI(j,k);\r
112           inev = ((AliTRDCalDCSFEE*)idcsfee)->GetMCMEventCnt(j,k);\r
113           inpt = ((AliTRDCalDCSFEE*)idcsfee)->GetMCMPtCnt(j,k);\r
114         }\r
115         if (calVer == 2) {\r
116           igsm = ((AliTRDCalDCSFEEv2*)idcsfee)->GetMCMGlobalState(j,k);\r
117           inim = ((AliTRDCalDCSFEEv2*)idcsfee)->GetMCMStateNI(j,k);\r
118           inev = ((AliTRDCalDCSFEEv2*)idcsfee)->GetMCMEventCnt(j,k);\r
119           inpt = ((AliTRDCalDCSFEEv2*)idcsfee)->GetMCMPtCnt(j,k);\r
120         }\r
121         \r
122         FillItemInArray(gsmStates, gsmOccur, igsm, false); \r
123         FillItemInArray(nimStates, nimOccur, inim, false); \r
124         FillItemInArray(nevStates, nevOccur, inev, false); \r
125         FillItemInArray(nptStates, nptOccur, inpt, false); \r
126       }\r
127     }\r
128   }\r
129   \r
130   cout << "I : Global MCM state statistics:" << endl;\r
131   AnalyzeArray(gsmStates, gsmOccur);\r
132   cout << "I : Network interface state statistics:" << endl;\r
133   AnalyzeArray(nimStates, nimOccur);\r
134   cout << "I : MCM Event counter reading statistics:" << endl;\r
135   AnalyzeArray(nevStates, nevOccur);\r
136   cout << "I : MCM PreTrigger counter reading statistics:" << endl;\r
137   AnalyzeArray(nptStates, nptOccur);\r
138   \r
139   return;\r
140 }\r
141 \r
142 \r
143 \r
144 void GetMajorityDifferences(TObject* calDCSObj, TObject* calDCSObj2) {\r
145   \r
146   Int_t gsmStates[cArraySize] = {0}, gsmOccur[cArraySize] = {0};\r
147   Int_t nimStates[cArraySize] = {0}, nimOccur[cArraySize] = {0};\r
148   Int_t nevStates[cArraySize] = {0}, nevOccur[cArraySize] = {0};\r
149   Int_t nptStates[cArraySize] = {0}, nptOccur[cArraySize] = {0};\r
150   \r
151   for (Int_t i=0; i<cArraySize; i++) {\r
152     gsmStates[i] = 0; gsmOccur[i]  = 0;\r
153     nimStates[i] = 0; nimOccur[i]  = 0;\r
154     nevStates[i] = 0; nevOccur[i]  = 0;\r
155     nptStates[i] = 0; nptOccur[i]  = 0;  \r
156   }\r
157 \r
158   Int_t feeArrSiz1 = 0;\r
159   Int_t feeArrSiz2 = 0;\r
160   if (calVer == 1) {\r
161     feeArrSiz1 = ((AliTRDCalDCS*)calDCSObj)->GetFEEArr()->GetSize();\r
162     feeArrSiz2 = ((AliTRDCalDCS*)calDCSObj2)->GetFEEArr()->GetSize();\r
163   }\r
164   if (calVer == 2) {\r
165     feeArrSiz1 = ((AliTRDCalDCSv2*)calDCSObj)->GetFEEArr()->GetSize();\r
166     feeArrSiz2 = ((AliTRDCalDCSv2*)calDCSObj2)->GetFEEArr()->GetSize();\r
167   }\r
168 \r
169   for (Int_t i=0; i<nROC && i<feeArrSiz1 && i<feeArrSiz2; i++) {\r
170     TObject* idcsfee;\r
171     TObject* idcsfee2;\r
172 \r
173     if (calVer == 1) {\r
174       idcsfee  = ((AliTRDCalDCS*)calDCSObj)->GetCalDCSFEEObj(i);\r
175       idcsfee2 = ((AliTRDCalDCS*)calDCSObj2)->GetCalDCSFEEObj(i);\r
176     }\r
177     if (calVer == 2) {\r
178       idcsfee  = ((AliTRDCalDCSv2*)calDCSObj)->GetCalDCSFEEObj(i);\r
179       idcsfee2 = ((AliTRDCalDCSv2*)calDCSObj2)->GetCalDCSFEEObj(i);\r
180     }\r
181     if ((idcsfee == NULL) || (idcsfee2 == NULL)) continue;\r
182 \r
183     Int_t sbit = 0;\r
184     if (calVer == 1) sbit = ((AliTRDCalDCSFEE*)idcsfee)->GetStatusBit();\r
185     if (calVer == 2) sbit = ((AliTRDCalDCSFEEv2*)idcsfee)->GetStatusBit();\r
186     if (sbit != 0) continue;\r
187 \r
188     for (Int_t j=0; j<nROB; j++) {\r
189       for (Int_t k=0; k<nMCM; k++) {\r
190         Int_t igsm, inim, inev, inpt, igsm1, inim1, inev1, inpt1, igsm2, inim2, inev2, inpt2;\r
191         if (calVer == 1) {\r
192           igsm1 = ((AliTRDCalDCSFEE*)idcsfee)->GetMCMGlobalState(j,k);\r
193           inim1 = ((AliTRDCalDCSFEE*)idcsfee)->GetMCMStateNI(j,k);\r
194           inev1 = ((AliTRDCalDCSFEE*)idcsfee)->GetMCMEventCnt(j,k);\r
195           inpt1 = ((AliTRDCalDCSFEE*)idcsfee)->GetMCMPtCnt(j,k);\r
196           igsm2 = ((AliTRDCalDCSFEE*)idcsfee2)->GetMCMGlobalState(j,k);\r
197           inim2 = ((AliTRDCalDCSFEE*)idcsfee2)->GetMCMStateNI(j,k);\r
198           inev2 = ((AliTRDCalDCSFEE*)idcsfee2)->GetMCMEventCnt(j,k);\r
199           inpt2 = ((AliTRDCalDCSFEE*)idcsfee2)->GetMCMPtCnt(j,k);\r
200         }\r
201         if (calVer == 2) {\r
202           igsm1 = ((AliTRDCalDCSFEEv2*)idcsfee)->GetMCMGlobalState(j,k);\r
203           inim1 = ((AliTRDCalDCSFEEv2*)idcsfee)->GetMCMStateNI(j,k);\r
204           inev1 = ((AliTRDCalDCSFEEv2*)idcsfee)->GetMCMEventCnt(j,k);\r
205           inpt1 = ((AliTRDCalDCSFEEv2*)idcsfee)->GetMCMPtCnt(j,k);\r
206           igsm2 = ((AliTRDCalDCSFEEv2*)idcsfee2)->GetMCMGlobalState(j,k);\r
207           inim2 = ((AliTRDCalDCSFEEv2*)idcsfee2)->GetMCMStateNI(j,k);\r
208           inev2 = ((AliTRDCalDCSFEEv2*)idcsfee2)->GetMCMEventCnt(j,k);\r
209           inpt2 = ((AliTRDCalDCSFEEv2*)idcsfee2)->GetMCMPtCnt(j,k);\r
210         }\r
211 \r
212         igsm = igsm1 - igsm2;\r
213         inim = inim1 - inim2;\r
214         inev = inev2 - inev1;\r
215         inpt = inpt2 - inpt1;\r
216         \r
217         // if they were set to -1, it means they were not actauuly set\r
218         // change -1 to -100 to mean they werent set since the above \r
219         // can give negitives\r
220         if (igsm1 == -1 && igsm == 0) igsm =-100000;\r
221         if (inim1 == -1 && inim == 0) inim =-100000;\r
222         if (inev1 == -1 && inev == 0) inev =-100000;\r
223         if (inpt1 == -1 && inpt == 0) inpt =-100000;\r
224         \r
225         FillItemInArray(gsmStates, gsmOccur, igsm, true); \r
226         FillItemInArray(nimStates, nimOccur, inim, true); \r
227         FillItemInArray(nevStates, nevOccur, inev, true); \r
228         FillItemInArray(nptStates, nptOccur, inpt, true); \r
229       }\r
230     }\r
231   }\r
232   \r
233   cout << "I : Global MCM state difference statistics:" << endl;\r
234   AnalyzeArray(gsmStates, gsmOccur);\r
235   cout << "I : Network interface state difference statistics:" << endl;\r
236   AnalyzeArray(nimStates, nimOccur);\r
237   cout << "I : MCM Event counter difference statistics:" << endl;\r
238   if (AnalyzeArray(nevStates, nevOccur) < 1) {\r
239     cout << "E : There should have been some events recorded, but there weren't" << endl;\r
240     errors = true;\r
241   }\r
242   cout << "I : MCM PreTrigger counter difference statistics:" << endl;\r
243   if (AnalyzeArray(nptStates, nptOccur) < 1) {\r
244     cout << "E : There should have been some events recorded, but there weren't" << endl;\r
245     errors = true;\r
246   }\r
247   \r
248   return;\r
249 }\r
250 \r
251 \r
252 void AliTRDcheckConfig(Int_t runNr=0, char *pathfile="nopathgiven"){\r
253 \r
254   AliCDBEntry *entry=0;\r
255   TString pathfilets(pathfile);\r
256 \r
257   // get the source\r
258   if(pathfilets.Contains("nopathgiven")) {\r
259     cout << "I : Accessing grid storage for run number " << runNr << endl;\r
260     cout << "I : Get CDBManager instance." << endl;\r
261     AliCDBManager *man = AliCDBManager::Instance();\r
262     cout << "I : SetDefaultStorage." << endl;\r
263     man->SetDefaultStorageFromRun(runNr);\r
264 \r
265     cout << "I : Get OCDB Entry." << endl;\r
266     entry = man->Get("TRD/Calib/DCS", runNr);\r
267     if (entry == NULL) {\r
268       cout << endl << "ERROR: Unable to get the AliTRDCalDCS object from the OCDB for run number " << runNr << "." << endl;\r
269       return;\r
270     }\r
271   } else {\r
272     cout << "I : Accessing local storage" << endl;\r
273     TFile *f = new TFile(pathfile);\r
274     if(f != NULL) {\r
275       entry = (AliCDBEntry*) f->Get("AliCDBEntry");\r
276     }\r
277     else {\r
278       cout << "E : Cannot open file" << endl;\r
279       return;\r
280     }\r
281   }\r
282   \r
283   TObject *objectCDB = (TObject*)entry->GetObject();\r
284   if (objectCDB->IsA()->InheritsFrom("TObjArray")) {\r
285     TObjArray *objArrayCDB = (TObjArray*)entry->GetObject();\r
286   }\r
287   \r
288   Int_t iesor=0;\r
289   for (iesor=0; iesor<3; iesor++) if(objArrayCDB->At(iesor)) break;\r
290   if (iesor > 1) {\r
291     cout << "E : Neither the start or end of run objects were in the root file.";\r
292     return;\r
293   }\r
294 \r
295   Bool_t hasSOR = (objArrayCDB->At(0));\r
296   Bool_t hasEOR = (objArrayCDB->At(1));\r
297   printf("SOR entry: %d, EOR entry: %d\n", hasSOR, hasEOR);\r
298 \r
299   if (!strcmp(objArrayCDB->At(iesor)->ClassName(),"AliTRDCalDCS"))   calVer = 1;\r
300   else if (!strcmp(objArrayCDB->At(iesor)->ClassName(),"AliTRDCalDCSv2")) calVer = 2;\r
301   else {  \r
302     cout << "E : Object types undefined.";\r
303     return;\r
304   }\r
305 \r
306   Bool_t sorandeor = true;\r
307   TObject *caldcs  = objArrayCDB->At(0);\r
308   TObject *caldcs2 = objArrayCDB->At(1);\r
309 \r
310   if (caldcs == NULL && caldcs2 == NULL) {\r
311     cout << "E : Neither the start or end of run objects were in the root file.";\r
312     return;\r
313   } else if (caldcs != NULL && caldcs2 == NULL) {\r
314     cout << "E : The EOR file was not in the root file.";\r
315     errors = true;\r
316     sorandeor = false;\r
317   } else if (caldcs == NULL && caldcs2 != NULL) {\r
318     cout << "E : The SOR file was not in the root file.";\r
319     errors = true;\r
320     sorandeor = false;\r
321     caldcs = caldcs2;\r
322   }\r
323 \r
324   cout << endl << "============ Non responding ROC Summary: ============" << endl;\r
325   TString bitfivestr = " ROCs with status bit 5. These havn't responded to communication\nattempts over DIM. Most probably they just were off this is ok.\n    DCS IDs: ";\r
326   Int_t lengthfive = bitfivestr.Length();\r
327   TString bitfourstr = " ROCs with status bit 4! BAD! This might be due to a communication problem between fxsproxy and the feeserver(s) \n    DCS IDs: ";\r
328   Int_t lengthfour = bitfourstr.Length();\r
329   TString bitthreestr = " ROCs with status bit 3! BAD! data from fee server was old or corrupt.\n    DCS IDs: ";\r
330   Int_t lengththree = bitthreestr.Length();\r
331   TString bittwostr = " ROCs with status bit 2. These have been in states in which they cannot be read out, e.g. Standby.\n    DCS IDs: ";\r
332   Int_t lengthtwo = bittwostr.Length();\r
333   TString bitonestr = " ROCs with status bit 1! BAD! This means the chamber(s) didn't respont even though is should have been in a good state.\n    DCS IDs: ";\r
334   Int_t lengthone = bitonestr.Length();\r
335 \r
336   Int_t feeArrSiz = 0;\r
337   if (calVer == 1) feeArrSiz = ((AliTRDCalDCS*)caldcs)->GetFEEArr()->GetSize();\r
338   if (calVer == 2) feeArrSiz = ((AliTRDCalDCSv2*)caldcs)->GetFEEArr()->GetSize();\r
339 \r
340   Int_t nSB1=0, nSB2=0, nSB3=0, nSB4=0, nSB5=0, nTot=0;\r
341   for (Int_t i=0; i<nROC && i<feeArrSiz; i++) {\r
342     TObject* idcsfee;\r
343     if (calVer == 1) idcsfee = ((AliTRDCalDCS*)caldcs)->GetCalDCSFEEObj(i);\r
344     if (calVer == 2) idcsfee = ((AliTRDCalDCSv2*)caldcs)->GetCalDCSFEEObj(i);\r
345     if (idcsfee != NULL) {\r
346       Int_t sb;\r
347       if (calVer == 1) sb = ((AliTRDCalDCSFEE*)idcsfee)->GetStatusBit();\r
348       if (calVer == 2) sb = ((AliTRDCalDCSFEEv2*)idcsfee)->GetStatusBit();\r
349       if (sb == 5) { bitfivestr  += i; bitfivestr  += "  "; nSB5++; }\r
350       if (sb == 4) { bitfourstr  += i; bitfourstr  += "  "; nSB4++; errors = true; }\r
351       if (sb == 3) { bitthreestr += i; bitthreestr += "  "; nSB3++; errors = true; }\r
352       if (sb == 2) { bittwostr   += i; bittwostr   += "  "; nSB2++; }\r
353       if (sb == 1) { bitonestr   += i; bitonestr   += "  "; nSB1++; errors = true; }\r
354       nTot += 1;\r
355     }\r
356   }\r
357 \r
358   if (lengthfive < bitfivestr.Length()) cout << nSB5 << bitfivestr.Data() << endl << endl;\r
359   if (lengthfour < bitfourstr.Length()) cout << nSB4 << bitfourstr.Data() << endl << endl;\r
360   if (lengththree < bitthreestr.Length()) cout << nSB3 << bitthreestr.Data() << endl << endl;\r
361   if (lengthtwo < bittwostr.Length()) cout << nSB2 << bittwostr.Data() << endl << endl;\r
362   if (lengthone < bitonestr.Length()) cout << nSB1 << bitonestr.Data() << endl << endl;\r
363   \r
364   cout << "The remaining " << nTot-(nSB1+nSB2+nSB3+nSB4+nSB5) << " ROCs responded correctly in the start of run."<<endl;\r
365 \r
366   Int_t nChanged=0, nTot=0;\r
367   for (Int_t i=0; i<nROC && i<feeArrSiz; i++) {\r
368     TObject* idcsfee;\r
369     TObject* idcsfee2;\r
370     if (calVer == 1) {\r
371       if (caldcs)  idcsfee  = ((AliTRDCalDCS*)caldcs)->GetCalDCSFEEObj(i);\r
372       if (caldcs2) idcsfee2 = ((AliTRDCalDCS*)caldcs2)->GetCalDCSFEEObj(i);\r
373     }\r
374     if (calVer == 2) {\r
375       if (caldcs)  idcsfee  = ((AliTRDCalDCSv2*)caldcs)->GetCalDCSFEEObj(i);\r
376       if (caldcs2) idcsfee2 = ((AliTRDCalDCSv2*)caldcs2)->GetCalDCSFEEObj(i);\r
377     }\r
378     if (idcsfee != NULL && idcsfee2 != NULL) {\r
379       Int_t sbd1 = 0;\r
380       Int_t sbd2 = 0;\r
381       if (calVer == 1) {\r
382         sbd1 = ((AliTRDCalDCSFEE*)idcsfee)->GetStatusBit();\r
383         sbd2 = ((AliTRDCalDCSFEE*)idcsfee2)->GetStatusBit();\r
384       }\r
385       if (calVer == 2) {\r
386         sbd1 = ((AliTRDCalDCSFEEv2*)idcsfee)->GetStatusBit();\r
387         sbd2 = ((AliTRDCalDCSFEEv2*)idcsfee2)->GetStatusBit();\r
388       }\r
389       Int_t sbd = sbd1 - sbd2;\r
390       if (sbd != 0) { \r
391         cout << "ROC " << i << " changed from state " << sbd1 << " at start of the run to "  << sbd2 << " at the end of the run." << endl;\r
392         cout << "ROC " << i << " changed from state " << sbd1 << " at start of the run to "  << sbd2 << " at the end of the run." << endl;\r
393         nChanged++; \r
394       }\r
395       nTot += 1;\r
396     }\r
397   }\r
398   \r
399   if (nChanged == 0) {\r
400     cout << "No ROCs changed state between the start and end of the run" << endl;\r
401   } else {\r
402     cout << "E : " << nChanged << " out of " << nTot << " ROCs changed state during the run" << endl;\r
403     errors = true; \r
404   }\r
405 \r
406   cout << endl << "============ Statistics from RSTATE: ============" << endl;\r
407   cout<<"I : The majority entry is given as well as all other values," << endl;\r
408   cout<<"    sorted according to their occurrence." << endl << endl;\r
409   GetMajoritys(caldcs);\r
410   if (sorandeor) GetMajorityDifferences(caldcs,caldcs2);\r
411 \r
412   cout << endl << "============ Global Configuraton: ============" << endl;\r
413   cout<<"I : Anything not listed is not set, mixed numbers are indicated with a" << endl;\r
414   cout<<"    value of -2 and strings are set to 'mixed' if they're mixed." << endl << endl;\r
415  \r
416   Int_t   gtb, gct, gsh, gtc, gsz, gfw, gfs, gfl, gsn;\r
417   TString gcv, gcn, gft, grp, gtp, gtm, gtd, gts, gao;\r
418 \r
419   if (calVer == 1) {\r
420     gtb = ((AliTRDCalDCS*)caldcs)->GetGlobalNumberOfTimeBins();\r
421     gct = ((AliTRDCalDCS*)caldcs)->GetGlobalConfigTag();\r
422     gsh = ((AliTRDCalDCS*)caldcs)->GetGlobalSingleHitThres();\r
423     gtc = ((AliTRDCalDCS*)caldcs)->GetGlobalThreePadClustThres();\r
424     gsz = ((AliTRDCalDCS*)caldcs)->GetGlobalSelectiveNoZS();\r
425     gfw = ((AliTRDCalDCS*)caldcs)->GetGlobalTCFilterWeight();\r
426     gfs = ((AliTRDCalDCS*)caldcs)->GetGlobalTCFilterShortDecPar();\r
427     gfl = ((AliTRDCalDCS*)caldcs)->GetGlobalTCFilterLongDecPar();\r
428     gsn = ((AliTRDCalDCS*)caldcs)->GetGlobalModeFastStatNoise();\r
429     gcv = ((AliTRDCalDCS*)caldcs)->GetGlobalConfigVersion();\r
430     gcn = ((AliTRDCalDCS*)caldcs)->GetGlobalConfigName();\r
431     gft = ((AliTRDCalDCS*)caldcs)->GetGlobalFilterType();\r
432     grp = ((AliTRDCalDCS*)caldcs)->GetGlobalReadoutParam();\r
433     gtp = ((AliTRDCalDCS*)caldcs)->GetGlobalTestPattern();\r
434     gtm = ((AliTRDCalDCS*)caldcs)->GetGlobalTrackletMode();\r
435     gtd = ((AliTRDCalDCS*)caldcs)->GetGlobalTrackletDef();\r
436     gts = ((AliTRDCalDCS*)caldcs)->GetGlobalTriggerSetup();\r
437     gao = ((AliTRDCalDCS*)caldcs)->GetGlobalAddOptions();\r
438   }\r
439   if (calVer == 2) {\r
440     gtb = ((AliTRDCalDCSv2*)caldcs)->GetCalDCSFEEObj(0)->GetNumberOfTimeBins();\r
441     gct = ((AliTRDCalDCSv2*)caldcs)->GetCalDCSFEEObj(0)->GetConfigTag();\r
442     gsh = ((AliTRDCalDCSv2*)caldcs)->GetCalDCSFEEObj(0)->GetSingleHitThres();\r
443     gtc = ((AliTRDCalDCSv2*)caldcs)->GetCalDCSFEEObj(0)->GetThreePadClustThres();\r
444     gsz = ((AliTRDCalDCSv2*)caldcs)->GetCalDCSFEEObj(0)->GetSelectiveNoZS();\r
445     gfw = ((AliTRDCalDCSv2*)caldcs)->GetCalDCSFEEObj(0)->GetTCFilterWeight();\r
446     gfs = ((AliTRDCalDCSv2*)caldcs)->GetCalDCSFEEObj(0)->GetTCFilterShortDecPar();\r
447     gfl = ((AliTRDCalDCSv2*)caldcs)->GetCalDCSFEEObj(0)->GetTCFilterLongDecPar();\r
448     gcv = ((AliTRDCalDCSv2*)caldcs)->GetCalDCSFEEObj(0)->GetConfigVersion();\r
449     gcn = ((AliTRDCalDCSv2*)caldcs)->GetCalDCSFEEObj(0)->GetConfigName();\r
450     gft = ((AliTRDCalDCSv2*)caldcs)->GetCalDCSFEEObj(0)->GetFilterType();\r
451     grp = ((AliTRDCalDCSv2*)caldcs)->GetCalDCSFEEObj(0)->GetReadoutParam();\r
452     gtp = ((AliTRDCalDCSv2*)caldcs)->GetCalDCSFEEObj(0)->GetTestPattern();\r
453     gtm = ((AliTRDCalDCSv2*)caldcs)->GetCalDCSFEEObj(0)->GetTrackletMode();\r
454     gtd = ((AliTRDCalDCSv2*)caldcs)->GetCalDCSFEEObj(0)->GetTrackletDef();\r
455     gts = ((AliTRDCalDCSv2*)caldcs)->GetCalDCSFEEObj(0)->GetTriggerSetup();\r
456     gao = ((AliTRDCalDCSv2*)caldcs)->GetCalDCSFEEObj(0)->GetAddOptions();\r
457   }\r
458 \r
459 \r
460   if (gtb != -1) cout<<"Global number of time bins.........................: "<< gtb << endl;\r
461   if (gct != -1) cout<<"Global configuration tag...........................: "<< gct << endl;\r
462   if (gsh != -1) cout<<"Global single hit threshold........................: "<< gsh << endl;\r
463   if (gtc != -1) cout<<"Global three pad cluster threshold.................: "<< gtc << endl;\r
464   if (gsz != -1) cout<<"Global selective ZS (every i'th event).............: "<< gsz << endl;\r
465   if (gfw != -1) cout<<"Global tail cancellation filter weight.............: "<< gfs << endl;\r
466   if (gfs != -1) cout<<"Global tail cancellat. filter short decay parameter: "<< gfs << endl;\r
467   if (gfl != -1) cout<<"Global tail cancellation filt. long decay parameter: "<< gfl << endl;\r
468   if (gsn != -1) cout<<"Global fast statistics mode?.......................: "<< gsn << endl;\r
469   if (gcv != "") cout<<"Global configuration tag version...................: "<< gcv << endl;\r
470   if (gcn != "") cout<<"Global configuration tag name......................: "<< gcn << endl;\r
471   if (gft != "") cout<<"Global filter type.................................: "<< gft << endl;\r
472   if (grp != "") cout<<"Global readout parameter...........................: "<< grp << endl;\r
473   if (gtp != "") cout<<"Global test pattern................................: "<< gtp << endl;\r
474   if (gtm != "") cout<<"Global tracklet mode...............................: "<< gtm << endl;\r
475   if (gtd != "") cout<<"Global tracklet definition.........................: "<< gtd << endl;\r
476   if (gts != "") cout<<"Global trigger setup...............................: "<< gts << endl;\r
477   if (gao != "") cout<<"Global additional options..........................: "<< gao << endl;\r
478   \r
479   cout << endl << "============ Error Summary: ============" << endl;\r
480   if (errors) {\r
481     cout<<"    I noticed some errors, please see above for the specifics." << endl;\r
482   } else {\r
483     cout<<"    I didn't notice any errors, but that doesn't mean there weren't any!" << endl;\r
484   }\r
485   \r
486 \r
487 }\r