12 #include <TPaveStats.h>
18 #include <StMessMgr.h>
20 #include "BemcTwMask.h"
23 BemcTwMask::BemcTwMask()
30 BemcTwMask::~BemcTwMask()
32 if (txtH)
delete txtH; txtH = 0;
36 void BemcTwMask::clear() {
37 for (
int i = 0;i < nPl;i++) {
42 memset(crCh, 0,
sizeof(crCh));
43 if (txtH) txtH->Clear();
47 bool useBtowMask(
const Char_t *fname,
BemcTwMask *m) {
48 if (!(fname && fname[0] && m))
return false;
50 LOG_INFO <<
"BEMCPlots::useTwMask(\"" << fname <<
"\") ..." << endm;
53 Int_t softid, cr, seq, TWmask, HTmask ,TPmask, tp;
54 Int_t plot, channelinplot, nok=0;
58 ifstream BemcStatusFile(fname);
60 if (!BemcStatusFile) {
61 LOG_ERROR <<
"BemcTwMask:: useBTowMask Failed due to NO FILE" << endm;
68 if (BemcStatusFile.is_open())
70 while (! BemcStatusFile.eof() )
72 std::getline(BemcStatusFile,line);
73 size_t comment=line.find(
"#",0);
74 size_t trigger=line.find(
"trigger",0);
75 if (comment!=string::npos)
continue;
76 if (trigger!=string::npos)
continue;
77 istringstream iss; iss.str(line);
78 iss>>name>>softid>>cr>>seq>>TWmask>>HTmask>>TPmask>>ped>>tp;
79 if (softid<1||softid>4800)
return 0;
85 if ((softid>0)&&(softid<=1220)) plot=0;
86 if ((softid>1220)&&(softid<=2400)) plot=1;
87 if ((softid>2400)&&(softid<=3540)) plot=2;
88 if ((softid>3540)&&(softid<=4800)) plot=3;
90 int jj=m->crG[plot].GetN();
91 m->crG[plot].SetPoint(jj,channelinplot,-10);
92 m->crG[plot].SetPoint(jj+1,channelinplot,100000);
93 m->crG[plot].SetPoint(jj+2,channelinplot,-10);
102 BemcStatusFile.close();
107 for(
int i=0;i<m->nPl;i++){
108 m->crG[i].SetMarkerStyle(23);
109 m->crG[i].SetMarkerColor(kRed);