17 void scanAll(
const char *listfile =
"filelist.txt")
21 ifstream fin(listfile);
33 TFile destFile(
"all.root",
"recreate");
36 tree->Branch(
"runno", &runno,
"runno/I");
37 tree->Branch(
"iSM", &iSM,
"iSM/I");
38 tree->Branch(
"nOk", &nOk,
"nOk/I");
39 tree->Branch(
"nPTot", &nPTot,
"nPTot/I");
40 tree->Branch(
"minStart", &minStart,
"minStart/I");
41 tree->Branch(
"maxEnd", &maxEnd,
"maxEnd/I");
42 tree->Branch(
"aveMin", &aveMin,
"aveMin/F");
43 tree->Branch(
"aveMax", &aveMax,
"aveMax/F");
46 while ( fin.good() ) {
49 cout <<
" filename fn " << fn <<
" runno " << runno << endl;
53 TFile *file0 = TFile::Open(fn);
54 AliEMCALSensorTempArray *arr = (AliEMCALSensorTempArray *) AliCDBEntry->GetObject();
58 cout <<
" NumSensors " << arr->NumSensors()
59 <<
" GetFirstIdDCS() " << arr->GetFirstIdDCS()
60 <<
" GetLastIdDCS() " << arr->GetLastIdDCS()
71 minStart = 0x7FFFffff;
74 for (
int isensor=0; isensor<
kNumSens; isensor++) {
75 AliEMCALSensorTemp *o = arr->GetSensor(isensor);
77 iSM = o->GetSide() + o->GetSector()*2;
81 cout <<
" id mismatch: id " <<
id <<
" " << is << endl;
85 cout <<
" side " << o->GetSide()
86 <<
" sector " << o->GetSector()
87 <<
" num " << o->GetNum()
88 <<
" startTime " << o->GetStartTime()
89 <<
" endTime " << o->GetEndTime()
92 if ( minStart > o->GetStartTime() ) { minStart = o->GetStartTime(); }
93 if ( maxEnd < o->GetEndTime() ) { maxEnd = o->GetEndTime(); }
95 AliSplineFit *f = o->GetFit();
101 np[is] = f->GetKnots();
103 cout <<
" np " << np[is] << endl;
108 for (
int i=0; i<np[is]; i++) {
116 if (min[is]>y0[i]) min[is]=y0[i];
117 if (max[is]<y0[i]) max[is]=y0[i];
123 for (iSM=0; iSM<
kNSM; iSM++) {
125 cout <<
" iSM " << iSM << endl;
140 double median = TMath::Median(nOk, tmp);
152 printf(
"is %d np %d median %3.2f min %3.2f max %3.2f diff %3.2f\n",
153 is, np[
id], median, min[
id], max[
id],
167 printf(
"iSM %d average min %3.2f max %3.2f (max+min)/2 %3.2f\n",
168 iSM, aveMin, aveMax, (aveMin + aveMax)/2.);
177 cout <<
" nruns " << nruns << endl;
void scanAll(const char *listfile="filelist.txt")
const float kMaxDiffMedian