]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/Macros/AliTRDcheckConfig.C
Some unuseful print commented
[u/mrichter/AliRoot.git] / TRD / Macros / AliTRDcheckConfig.C
CommitLineData
eaceaf51 1//===================================================================================\r\r
2// This is a macro to analyze TRD/Calib/DCS OCDB objects either\r\r
3// from the grid for a given run number or from a local object.\r\r
4// If you want to analyze data from the grid, please don't forget to\r\r
5// have a valid alien token initialized and the file /tmp/gclient_env_$UID source'd.\r\r
6//\r\r
7// Arguments:\r\r
8// The first argument is the runnumber (this is ignored in case of a local file),\r\r
9// the second is a string that needs to contain either "grid" or "local". Further\r\r
10// you can add either verbose or quiet to that string. If you don't, you'll be asked\r\r
11// for all stuff individually wether you want to see it or not\r\r
12// the thrid argument is the number of the ROC you (eventually) want to dump its data\r\r
13// member of.\r\r
14// The fourth one is the path and name of the local file you might want to look at.\r\r
15//\r\r
16// So the simplest way to use this macro is if you want to check the output of a given\r\r
17// run from the OCDB:\r\r
18// .x AliTRDcheckConfig.C(60111)\r\r
19//\r\r
20// An example for quickly checking a local file:\r\r
21// .x AliTRDcheckConfig.C(0, "local quiet", 533, "$ALICE_ROOT/TRD/Calib/DCS/Run0_999999999_v0_s0.root")\r\r
22//\r\r
23// Please contact Frederick Kramer in case of problems\r\r
24//===================================================================================\r\r
25\r\r
26\r\r
27const Int_t nROC = 540;\r\r
28const Int_t nROB = 8;\r\r
29const Int_t nMCM = 18;\r\r
30const Int_t cArraySize = 1000;\r\r
31\r\r
32\r\r
33\r\r
34void AnalyzeArray(Int_t states[cArraySize], Int_t occur[cArraySize]) {\r\r
35 long long srtIndx[cArraySize] = 0;\r\r
36 \r\r
37 TMath::Sort(cArraySize, occur, srtIndx);\r\r
38\r\r
39 Int_t totalSum = 0, subSum = 0, iIndex = 0;\r\r
40 for (Int_t i=0; i<cArraySize; i++) totalSum += occur[i];\r\r
41 \r\r
42 cout << " The majority ("<< occur[srtIndx[0]] << " of " \r\r
43 << totalSum <<") is: " << states[srtIndx[0]] << endl;\r\r
44 subSum = occur[srtIndx[0]];\r\r
45 while (totalSum != subSum) {\r\r
46 if (++iIndex > 999) {\r\r
47 cout << "E : out of bounds." << endl;\r\r
48 break;\r\r
49 }\r\r
50 Printf(" Next: %7d (%d)", states[srtIndx[iIndex]], occur[srtIndx[iIndex]]);\r\r
51 subSum += occur[srtIndx[iIndex]];\r\r
52 }\r\r
53}\r\r
54\r\r
55\r\r
56\r\r
57void FillItemInArray(Int_t states[cArraySize], Int_t occur[cArraySize], Int_t item) {\r\r
58 for (Int_t iArrPos=0; iArrPos<cArraySize; iArrPos++) {\r\r
59 if (item == -1) break; // value not set\r\r
60 if (states[iArrPos] == item) {\r\r
61 occur[iArrPos]++;\r\r
62 break;\r\r
63 } else if (occur[iArrPos] == 0) {\r\r
64 states[iArrPos] = item;\r\r
65 occur[iArrPos]++;\r\r
66 break;\r\r
67 }\r\r
68 }\r\r
69}\r\r
70\r\r
71\r\r
72\r\r
73void GetMajoritys(AliTRDCalDCS* calDCSObj) {\r\r
74\r\r
75 Int_t gsmStates[cArraySize] = {0}, gsmOccur[cArraySize] = {0};\r\r
76 Int_t nimStates[cArraySize] = {0}, nimOccur[cArraySize] = {0};\r\r
77 Int_t nevStates[cArraySize] = {0}, nevOccur[cArraySize] = {0};\r\r
78 Int_t nptStates[cArraySize] = {0}, nptOccur[cArraySize] = {0};\r\r
79\r\r
80 for (Int_t i=0; i<cArraySize; i++) {\r\r
81 gsmStates[i] = 0;\r\r
82 gsmOccur[i] = 0;\r\r
83 nimStates[i] = 0;\r\r
84 nimOccur[i] = 0;\r\r
85 nevStates[i] = 0;\r\r
86 nevOccur[i] = 0;\r\r
87 nptStates[i] = 0;\r\r
88 nptOccur[i] = 0; \r\r
89 }\r\r
90 \r\r
91 for (Int_t i=0; i<nROC; i++) {\r\r
92 AliTRDCalDCSFEE *idcsfee = calDCSObj->GetCalDCSFEEObj(i);\r\r
93 if ((idcsfee == NULL) || (idcsfee->GetStatusBit() != 0)) continue;\r\r
94 for (Int_t j=0; j<nROB; j++) {\r\r
95 for (Int_t k=0; k<nMCM; k++) {\r\r
96 Int_t igsm = idcsfee->GetMCMGlobalState(j,k);\r\r
97 Int_t inim = idcsfee->GetMCMStateNI(j,k);\r\r
98 Int_t inev = idcsfee->GetMCMEventCnt(j,k);\r\r
99 Int_t inpt = idcsfee->GetMCMPtCnt(j,k);\r\r
100 \r\r
101 FillItemInArray(gsmStates, gsmOccur, igsm); \r\r
102 FillItemInArray(nimStates, nimOccur, inim); \r\r
103 FillItemInArray(nevStates, nevOccur, inev); \r\r
104 FillItemInArray(nptStates, nptOccur, inpt); \r\r
105 }\r\r
106 }\r\r
107 }\r\r
108 \r\r
109 cout << "I : Global MCM state statistics:" << endl;\r\r
110 AnalyzeArray(gsmStates, gsmOccur);\r\r
111 cout << "I : Network interface state statistics:" << endl;\r\r
112 AnalyzeArray(nimStates, nimOccur);\r\r
113 cout << "I : MCM Event counter reading statistics:" << endl;\r\r
114 AnalyzeArray(nevStates, nevOccur);\r\r
115 cout << "I : MCM PreTrigger counter reading statistics:" << endl;\r\r
116 AnalyzeArray(nptStates, nptOccur);\r\r
117 \r\r
118 return;\r\r
119}\r\r
120\r\r
121\r\r
122void AliTRDcheckConfig(Int_t runNr=0, TString source="grid", Int_t dumpid=0, char *pathfile="nopathgiven"){\r\r
123\r\r
124 AliCDBEntry *entry=0;\r\r
125\r\r
126 // get the source\r\r
127 if(source.Contains("grid")) {\r\r
128 cout << "I : Accessing grid storage for run number " << runNr << endl;\r\r
129 cout << "I : Get CDBManager instance." << endl;\r\r
130 AliCDBManager *man = AliCDBManager::Instance();\r\r
131 cout << "I : SetDefaultStorage." << endl;\r\r
132 man->SetDefaultStorage("alien://folder=/alice/data/2008/LHC08d/OCDB/");\r\r
133 cout << "I : Get OCDB Entry." << endl;\r\r
134 entry = man->Get("TRD/Calib/DCSCONFIG", runNr);\r\r
135 } else if(source.Contains("local")) {\r\r
136 cout << "I : Accessing local storage" << endl;\r\r
137 TFile *f = new TFile(pathfile);\r\r
138 if(f != NULL) {\r\r
139 entry = (AliCDBEntry*) f->Get("AliCDBEntry");\r\r
140 }\r\r
141 else {\r\r
142 cout << "E : Cannot open file" << endl;\r\r
143 return;\r\r
144 }\r\r
145 } else {\r\r
146 cout << "E : Please specify a correct source (grid/local)" << endl;\r\r
147 return;\r\r
148 }\r\r
149\r\r
150\r\r
151 Int_t dump[20], contSelect=-1;\r\r
152 for(Int_t i=0; i<20; i++) dump[i]=0;\r\r
153 if(!source.Contains("quiet") && !source.Contains("verbose")) {\r\r
154 cout << "Q : Do you want to dump the AliCDBEntry? (1/0) ";\r\r
155 cin >> dump[0];\r\r
156 cout << "Q : Do you want to dump the AliTRDCalDCS Object? (1/0) ";\r\r
157 cin >> dump[1];\r\r
158 cout << "Q : Do you want to dump the AliTRDCalDCSFEE Object? (1/0) ";\r\r
159 cin >> dump[2];\r\r
160 if(dump[2] == 1) {\r\r
161 cout << "Q : Which Detector ID? (0..540) ";\r\r
162 cin >> dumpid;\r\r
163 }\r\r
164 cout << "Q : Do you want to get a status bit summary? (1/0) ";\r\r
165 cin >> dump[3];\r\r
166 cout << "Q : Do you want to get a status bit histogram? (1/0) ";\r\r
167 cin >> dump[4];\r\r
168 cout << "Q : Do you want to get a check on data integrity? (1/0) ";\r\r
169 cin >> dump[5];\r\r
170 }\r\r
171 if(source.Contains("verbose")) for(Int_t i=0; i<20; i++) dump[i]=1;\r\r
172\r\r
173 // check version\r\r
174 //TObject *objectCDB = (TObject*)entry->GetObject();\r\r
175 TObject *objectCDB = (TObject*)entry->GetObject();\r\r
176 if (objectCDB->IsA()->InheritsFrom("TObjArray")) {\r\r
177 cout << "I : It seems like you are checking a file containing both SOR and EOR informations." << endl;\r\r
178 cout << "Q : Do you want to check SOR (0), EOR (1) or their differences (2)? ";\r\r
179 cin >> contSelect;\r\r
180 TObjArray *objArrayCDB = (TObjArray*)entry->GetObject();\r\r
181 }\r\r
182\r\r
183\r\r
184\r\r
185 // the AliCDBEntry\r\r
186 if(dump[0] > 0) {\r\r
187 cout << endl << "============ Dumping the AliCDBEntry ============" << endl;\r\r
188 entry->Dump();\r\r
189 }\r\r
190\r\r
191 \r\r
192 // the CalDCS object\r\r
193 AliTRDCalDCS *caldcs;\r\r
194 switch(contSelect) {\r\r
195 case -1:\r\r
196 caldcs = (AliTRDCalDCS*) entry->GetObject();\r\r
197 break; \r\r
198 case 0:\r\r
199 caldcs = (AliTRDCalDCS*) objArrayCDB->At(0);\r\r
200 break; \r\r
201 case 1:\r\r
202 caldcs = (AliTRDCalDCS*) objArrayCDB->At(1);\r\r
203 break; \r\r
204 case 2:\r\r
205 cout << "I : Sorry, not implemented yet. Stop." << endl;\r\r
206 return;\r\r
207 break; \r\r
208 default:\r\r
209 cout << "E : Invalid key. Stop." << endl;\r\r
210 return;\r\r
211 }\r\r
212\r\r
213 \r\r
214\r\r
215 if(dump[1] > 0) {\r\r
216 cout << endl << "============ Dumping the AliTRDCalDCS Object ============" << endl;\r\r
217 caldcs->Dump();\r\r
218 }\r\r
219\r\r
220 // one CalDCSFEE object\r\r
221 if(dump[2] > 0) {\r\r
222 AliTRDCalDCSFEE *dcsfee;\r\r
223 dcsfee = caldcs->GetCalDCSFEEObj(dumpid);\r\r
224 cout <<endl<< "============ Dumping the AliTRDCalDCSFEE Object Nr. " << dumpid << " ============" << endl;\r\r
225 if (dcsfee != NULL) {\r\r
226 dcsfee->Dump();\r\r
227 }\r\r
228 }\r\r
229\r\r
230 // fill histograms\r\r
231 TH1F *hStatusBits = new TH1F("hStatusBits", "DCS FEE Status Bits", 10, -.5, 9.5);\r\r
232 hStatusBits->SetFillColor(38);\r\r
233 hStatusBits->GetXaxis()->SetTitle("Status Bit Value");\r\r
234 hStatusBits->GetYaxis()->SetTitle("Occurrence");\r\r
235\r\r
236 // get a status bit summary\r\r
237 if(dump[3] > 0) {\r\r
238 cout << endl << "============ Status Bit Summary: ============" << endl;\r\r
239 TString bitfivestr = " ROCs with status bit 5. These have been not even responding to any DIM communication attempt. Most probably they just were off.\n DCS IDs: ";\r\r
240 Int_t lengthfive = bitfivestr.Length();\r\r
241 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\r
242 Int_t lengthfour = bitfourstr.Length();\r\r
243 TString bitthreestr = " ROCs with status bit 3!!! VERY BAD! This might be due to a serious communication error between the fxsproxy program and the FEEservers.\n DCS IDs: ";\r\r
244 Int_t lengththree = bitthreestr.Length();\r\r
245 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\r
246 Int_t lengthtwo = bittwostr.Length();\r\r
247 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\r
248 Int_t lengthone = bitonestr.Length();\r\r
249\r\r
250 Int_t nSB1=0, nSB2=0, nSB3=0, nSB4=0, nSB5=0;\r\r
251 for (Int_t i=0; i<540; i++) {\r\r
252 AliTRDCalDCSFEE *idcsfee;\r\r
253 idcsfee = caldcs->GetCalDCSFEEObj(i);\r\r
254 if (idcsfee != NULL) {\r\r
255 Int_t sb = idcsfee->GetStatusBit();\r\r
256 if (sb == 5) { bitfivestr += i; bitfivestr += " "; nSB5++; }\r\r
257 if (sb == 4) { bitfourstr += i; bitfourstr += " "; nSB4++; }\r\r
258 if (sb == 3) { bitthreestr += i; bitthreestr += " "; nSB3++; }\r\r
259 if (sb == 2) { bittwostr += i; bittwostr += " "; nSB2++; }\r\r
260 if (sb == 1) { bitonestr += i; bitonestr += " "; nSB1++; }\r\r
261 hStatusBits->Fill(sb);\r\r
262 }\r\r
263 }\r\r
264\r\r
265 if (lengthfive < bitfivestr.Length()) cout << nSB5 << bitfivestr.Data() << endl << endl;\r\r
266 else cout << "GOOD: No ROCs with status bit 5" << endl;\r\r
267 if (lengthfour < bitfourstr.Length()) cout << nSB4 << bitfourstr.Data() << endl << endl;\r\r
268 else cout << "GOOD: No ROCs with status bit 4" << endl;\r\r
269 if (lengththree < bitthreestr.Length()) cout << nSB3 << bitthreestr.Data() << endl << endl;\r\r
270 else cout << "GOOD: No ROCs with status bit 3" << endl;\r\r
271 if (lengthtwo < bittwostr.Length()) cout << nSB2 << bittwostr.Data() << endl << endl;\r\r
272 else cout << "GOOD: No ROCs with status bit 2" << endl;\r\r
273 if (lengthone < bitonestr.Length()) cout << nSB1 << bitonestr.Data() << endl << endl;\r\r
274 else cout << "GOOD: No ROCs with status bit 1" << endl;\r\r
275 }\r\r
276\r\r
277\r\r
278 // get a status bit histogram\r\r
279 if(dump[4] > 0) {\r\r
280 TCanvas *c1 = new TCanvas("c1");\r\r
281 gPad->SetLogy();\r\r
282 hStatusBits->Draw("HIST");\r\r
283 }\r\r
284\r\r
285\r\r
286\r\r
287 // get a check on data integrity\r\r
288 if(dump[5] > 0) {\r\r
289 cout << endl << "============ Data Integrity: ============" << endl;\r\r
290 TH1F *tb = new TH1F("tbs", "", 100000, 0, 100000);\r\r
291 TH1F *ct = new TH1F("cts", "", 100000, 0, 100000);\r\r
292 const Int_t ngsm = nROB * nMCM;\r\r
293\r\r
294 Int_t gsm_occ[nROC][ngsm][2];\r\r
295 Int_t ni_occ[nROC][ngsm][2];\r\r
296 Int_t ev_occ[nROC][ngsm][2];\r\r
297 Int_t pt_occ[nROC][ngsm][2];\r\r
298\r\r
299 for (Int_t i=0; i<nROC; i++) {\r\r
300 for (Int_t j=0; j<ngsm; j++) {\r\r
301 gsm_occ[i][j][0] = 0; // values\r\r
302 gsm_occ[i][j][1] = 0; // counter\r\r
303 ni_occ[i][j][0] = 0; // values\r\r
304 ni_occ[i][j][1] = 0; // counter\r\r
305 ev_occ[i][j][0] = 0; // values\r\r
306 ev_occ[i][j][1] = 0; // counter\r\r
307 pt_occ[i][j][0] = 0; // values\r\r
308 pt_occ[i][j][1] = 0; // counter\r\r
309 }\r\r
310 }\r\r
311\r\r
312 Int_t majGSM[2], majNI[2], majEV[2], majPT[2];\r\r
313 majGSM[0] = 0; // value\r\r
314 majGSM[1] = 0; // count\r\r
315 majNI[0] = 0; // value\r\r
316 majNI[1] = 0; // count\r\r
317 majEV[0] = 0; // value\r\r
318 majEV[1] = 0; // count\r\r
319 majPT[0] = 0; // value\r\r
320 majPT[1] = 0; // count\r\r
321\r\r
322\r\r
323 // find the majority states/counters\r\r
324 for (Int_t i=0; i<nROC; i++) {\r\r
325 AliTRDCalDCSFEE *idcsfee;\r\r
326 idcsfee = caldcs->GetCalDCSFEEObj(i);\r\r
327 if (idcsfee != NULL) {\r\r
328 if(idcsfee->GetStatusBit() == 0) {\r\r
329 tb->Fill(idcsfee->GetNumberOfTimeBins()-1);\r\r
330 ct->Fill(idcsfee->GetConfigTag()-1);\r\r
331 for (Int_t j=0; j<nROB; j++) {\r\r
332 for (Int_t k=0; k<nMCM; k++) {\r\r
333 Int_t igsm = idcsfee->GetMCMGlobalState(j, k);\r\r
334 Int_t ini = idcsfee->GetMCMStateNI(j, k);\r\r
335 Int_t iev = idcsfee->GetMCMEventCnt(j, k);\r\r
336 Int_t ipt = idcsfee->GetMCMPtCnt(j, k);\r\r
337 // gsm\r\r
338 for (Int_t l=0; l<nROB*nMCM; l++) {\r\r
339 if (gsm_occ[i][l][1] == 0){\r\r
340 gsm_occ[i][l][1] = 1;\r\r
341 gsm_occ[i][l][0] = igsm;\r\r
342 break;\r\r
343 }\r\r
344 else if (gsm_occ[i][l][0] == igsm) {\r\r
345 gsm_occ[i][l][1]++;\r\r
346 break;\r\r
347 }\r\r
348 }\r\r
349 // ni\r\r
350 for (Int_t l=0; l<nROB*nMCM; l++) {\r\r
351 if (ni_occ[i][l][1] == 0){\r\r
352 ni_occ[i][l][1] = 1;\r\r
353 ni_occ[i][l][0] = ini;\r\r
354 break;\r\r
355 }\r\r
356 else if (ni_occ[i][l][0] == ini) {\r\r
357 ni_occ[i][l][1]++;\r\r
358 break;\r\r
359 }\r\r
360 }\r\r
361 // ev\r\r
362 for (Int_t l=0; l<nROB*nMCM; l++) {\r\r
363 if (ev_occ[i][l][1] == 0){\r\r
364 ev_occ[i][l][1] = 1;\r\r
365 ev_occ[i][l][0] = iev;\r\r
366 break;\r\r
367 }\r\r
368 else if (ev_occ[i][l][0] == iev) {\r\r
369 ev_occ[i][l][1]++;\r\r
370 break;\r\r
371 }\r\r
372 }\r\r
373 // pt\r\r
374 for (Int_t l=0; l<nROB*nMCM; l++) {\r\r
375 if (pt_occ[i][l][1] == 0){\r\r
376 pt_occ[i][l][1] = 1;\r\r
377 pt_occ[i][l][0] = ipt;\r\r
378 break;\r\r
379 }\r\r
380 else if (pt_occ[i][l][0] == ipt) {\r\r
381 pt_occ[i][l][1]++;\r\r
382 break;\r\r
383 }\r\r
384 }\r\r
385 }\r\r
386 }\r\r
387\r\r
388 for (Int_t j=0; j<ngsm; j++) {\r\r
389 // gsm\r\r
390 if (gsm_occ[i][j][1] > 0) {\r\r
391 if (gsm_occ[i][j][1] > majGSM[1]) {\r\r
392 majGSM[0] = gsm_occ[i][j][0];\r\r
393 majGSM[1] = gsm_occ[i][j][1];\r\r
394 }\r\r
395 }\r\r
396 // ni\r\r
397 if (ni_occ[i][j][1] > 0) {\r\r
398 if (ni_occ[i][j][1] > majNI[1]) {\r\r
399 majNI[0] = ni_occ[i][j][0];\r\r
400 majNI[1] = ni_occ[i][j][1];\r\r
401 }\r\r
402 }\r\r
403 // ev\r\r
404 if (ev_occ[i][j][1] > 0) {\r\r
405 if (ev_occ[i][j][1] > majEV[1]) {\r\r
406 majEV[0] = ev_occ[i][j][0];\r\r
407 majEV[1] = ev_occ[i][j][1];\r\r
408 }\r\r
409 }\r\r
410 // pt\r\r
411 if (pt_occ[i][j][1] > 0) {\r\r
412 if (pt_occ[i][j][1] > majPT[1]) {\r\r
413 majPT[0] = pt_occ[i][j][0];\r\r
414 majPT[1] = pt_occ[i][j][1];\r\r
415 }\r\r
416 } \r\r
417 }\r\r
418 }\r\r
419 }\r\r
420 }\r\r
421\r\r
422 Int_t maxBinCT = ct->GetMaximumBin();\r\r
423 //cout << "Majority number of configuration tags: " << maxBinCT << endl;\r\r
424 Int_t maxBinTB = tb->GetMaximumBin();\r\r
425 //cout << "Majority number of timebins: " << maxBinTB << endl;\r\r
426 Int_t integrityProblem = 0;\r\r
427\r\r
428 for (Int_t i=0; i<nROC; i++) {\r\r
429 AliTRDCalDCSFEE *idcsfee;\r\r
430 idcsfee = caldcs->GetCalDCSFEEObj(i);\r\r
431 if (idcsfee != NULL) {\r\r
432 if(idcsfee->GetStatusBit() == 0) {\r\r
433 Int_t ict = idcsfee->GetConfigTag();\r\r
434 if(ict != maxBinCT) {\r\r
435 cout << "ROB " << i << " has the config tag = " << ict \r\r
436 << " what differs from the majority (=" << maxBinCT << ")!" << endl;\r\r
437 integrityProblem++;\r\r
438 }\r\r
439 Int_t itb = idcsfee->GetNumberOfTimeBins();\r\r
440 if(itb != maxBinTB) {\r\r
441 cout << "ROB " << i << " has number of time bins = " << itb \r\r
442 << " what differs from the majority (=" << maxBinTB << ")!" << endl;\r\r
443 integrityProblem++;\r\r
444 }\r\r
445\r\r
446\r\r
447 for (Int_t j=0; j<ngsm; j++) {\r\r
448 // gsm\r\r
449 if ((gsm_occ[i][j][1] > 0) && (gsm_occ[i][j][0] != majGSM[0])) {\r\r
450 if (!((gsm_occ[i][j][0] == -1) && ((gsm_occ[i][j][1] == 6) || (gsm_occ[i][j][1] == 40)))) { \r\r
451 printf("ROC %3d %3d inconstistent global rstates found with value %2d\n",\r\r
452 i,gsm_occ[i][j][1],gsm_occ[i][j][0]);\r\r
453 integrityProblem++;\r\r
454 }\r\r
455 }\r\r
456 // ni\r\r
457 if ((ni_occ[i][j][1] > 0) && (ni_occ[i][j][0] != majNI[0])) {\r\r
458 if (!((ni_occ[i][j][0] == -1) && ((ni_occ[i][j][1] == 6) || (ni_occ[i][j][1] == 40)))) { \r\r
459 printf("ROC %3d %3d inconstistent network interface states found with value %2d\n",\r\r
460 i,ni_occ[i][j][1],ni_occ[i][j][0]);\r\r
461 integrityProblem++;\r\r
462 }\r\r
463 }\r\r
464 // ev\r\r
465 if ((ev_occ[i][j][1] > 0) && (ev_occ[i][j][0] != majEV[0])) {\r\r
466 if (!((ev_occ[i][j][0] == -1) && ((ev_occ[i][j][1] == 6) || (ev_occ[i][j][1] == 40)))) { \r\r
467 printf("ROC %3d %3d inconstistent event counters found with value %2d\n",\r\r
468 i,ev_occ[i][j][1],ev_occ[i][j][0]);\r\r
469 integrityProblem++;\r\r
470 }\r\r
471 }\r\r
472 // pt\r\r
473 if ((pt_occ[i][j][1] > 0) && (pt_occ[i][j][0] != majPT[0])) {\r\r
474 if (!((pt_occ[i][j][0] == -1) && ((pt_occ[i][j][1] == 6) || (pt_occ[i][j][1] == 40)))) { \r\r
475 printf("ROC %3d %3d inconstistent pretrigger counters found with value %2d\n",\r\r
476 i,pt_occ[i][j][1],pt_occ[i][j][0]);\r\r
477 integrityProblem++;\r\r
478 }\r\r
479 }\r\r
480\r\r
481 }\r\r
482 }\r\r
483 }\r\r
484 }\r\r
485\r\r
486 if(integrityProblem == 0) cout << "No problem with data integrity found." << endl;\r\r
487 else cout << endl << "There were in total " << integrityProblem << " inconsistencies!" << endl;\r\r
488 }\r\r
489\r\r
490\r\r
491 cout << endl << "============ Statistics from RSTATE: ============" << endl;\r\r
492 cout<<"I : The majority entry is given as well as all other values," << endl;\r\r
493 cout<<" sorted according to their occurrence." << endl << endl;\r\r
494 GetMajoritys(caldcs);\r\r
495 \r\r
496\r\r
497 cout << endl << "============ Global Configuraton: ============" << endl;\r\r
498 cout<<"I : Numbers are -1 if not set and -2 if mixed," << endl;\r\r
499 cout<<" strings are empty if not set and 'mixed' if so." << endl << endl;\r\r
500 cout<<"Global number of time bins.........................: "<<caldcs->GetGlobalNumberOfTimeBins() << endl;\r\r
501 cout<<"Global configuration tag...........................: "<<caldcs->GetGlobalConfigTag() << endl;\r\r
502 cout<<"Global single hit threshold........................: "<<caldcs->GetGlobalSingleHitThres() << endl;\r\r
503 cout<<"Global three pad cluster threshold.................: "<<caldcs->GetGlobalThreePadClustThres()<<endl;\r\r
504 cout<<"Global selective ZS (every i'th event).............: "<<caldcs->GetGlobalSelectiveNoZS() << endl;\r\r
505 cout<<"Global tail cancellation filter weight.............: "<<caldcs->GetGlobalTCFilterWeight() << endl;\r\r
506 cout<<"Global tail cancellat. filter short decay parameter: "<<caldcs->GetGlobalTCFilterShortDecPar()<<endl;\r\r
507 cout<<"Global tail cancellation filt. long decay parameter: "<<caldcs->GetGlobalTCFilterLongDecPar()<<endl;\r\r
508 cout<<"Global fast statistics mode?.......................: "<<caldcs->GetGlobalModeFastStatNoise() << endl;\r\r
509 cout<<"Global configuration tag version...................: "<<caldcs->GetGlobalConfigVersion() << endl;\r\r
510 cout<<"Global configuration tag name......................: "<<caldcs->GetGlobalConfigName() << endl;\r\r
511 cout<<"Global filter type.................................: "<<caldcs->GetGlobalFilterType() << endl;\r\r
512 cout<<"Global readout parameter...........................: "<<caldcs->GetGlobalReadoutParam() << endl;\r\r
513 cout<<"Global test pattern................................: "<<caldcs->GetGlobalTestPattern() << endl;\r\r
514 cout<<"Global tracklet mode...............................: "<<caldcs->GetGlobalTrackletMode() << endl;\r\r
515 cout<<"Global tracklet definition.........................: "<<caldcs->GetGlobalTrackletDef() << endl;\r\r
516 cout<<"Global trigger setup...............................: "<<caldcs->GetGlobalTriggerSetup() << endl;\r\r
517 cout<<"Global additional options..........................: "<<caldcs->GetGlobalAddOptions() << endl;\r\r
518\r\r
519}\r\r