2 int pedStat(
char runNum[10],
int k=-1, TString path=
"./"){
6 int jSector=0,jSubSect=0,jEta=0;
11 const int mSmdPlanes=2;
12 const int mSmdStrips=288;
17 TString subdir = path; subdir+=
"StatFiles/";
21 float minTPedPos=1.0,maxTPedPos=100.0;
22 float minMPedPos=1.0,maxMPedPos=400.0;
23 float minTSig=.5,maxTSig=2.5;
24 float minMSig=.3,maxMSig=1.5;
25 float deadentriesT=.998;
26 float deadentriesM=.9995;
28 assert( !gSystem->Load(
"StEEmcStatus"));
34 printf(
"\n\n%s %d %d\n\n",runNum,k,rNum);
36 strncpy(day,runNum+3,3);
39 TString fullname = path+
"day"+day+
"/outPed"+runNum+
"/"+runNum+
"fit.hist.root";
40 TString fullnameraw = path+
"day"+day+
"/outPed"+runNum+
"/"+runNum+
".hist.root";
42 fd=
new TFile(fullname);
44 printf(
"file %s not found\n",runNum);
48 fdraw=
new TFile(fullnameraw);
50 printf(
"raw file %s not found\n",runNum);
54 strcpy(fileName,runNum);
55 strcat(fileName,
".errs");
56 strcpy(logFile,runNum);
57 strcat(logFile,
".log");
59 TString Outname= subdir + fileName;
60 fpout=fopen(Outname.Data(),
"w");
62 printf(
"Output file not opened\n");
65 TString logname=subdir + logFile;
66 fplog=fopen(logname.Data(),
"w");
68 printf(
"Log file not opened\n");
74 stat->initRun(k,fd,fdraw,fpout,fplog,rNum);
77 for(jSector=0; jSector<12; jSector++)
78 {
for (jSubSect=0;jSubSect<5;jSubSect++)
79 {
for(jEta=0; jEta<12; jEta++)
81 sprintf(channel,
"a%02dT%c%02d",jSector+1,
'A'+jSubSect,jEta+1);
82 stat->procDetector(channel,maxTPedPos,minTPedPos,maxTSig,minTSig,deadentriesT,mskDay);
88 for(
int jSector=0;jSector<mSec;jSector++) {
89 for(
int uv= 0; uv < mSmdPlanes; uv++){
90 for(
int lst=0;lst < mSmdStrips; lst++) {
91 sprintf(channel,
"a%02d%c%03d",jSector+1,
'U'+uv,lst+1);
92 stat->procDetector(channel,maxMPedPos,minMPedPos,maxMSig,minMSig,deadentriesM,mskDay);
96 for(
int jSubSect=0;jSubSect<mSub;jSubSect++) {
97 for(
int jEta=0;jEta< mEta;jEta++) {
98 for(
int prlst=0;prlst < 3; prlst++){
100 sprintf(channel,
"a%02d%c%c%02d",jSector+1,preL[prlst],
'A'+jSubSect,jEta+1);
101 stat->procDetector(channel,maxMPedPos,minMPedPos,maxMSig,minMSig,deadentriesM,mskDay);
107 printf(
"Closing files\n");
112 printf(
"all done\n");