7 void rdFeeTTreeUser1(
int max=10000) {
8 gSystem->Load(
"StRoot/StEEmcUtil/EEfeeRaw/libEEfeeRaw.so");
9 gStyle->SetPalette(1,0);
17 TString fname=
"/star/u/eemcdb/miniDaq/Mar1/run01001.root";
19 TFile *f =
new TFile(fname);
20 TTree *t = (TTree *)f->Get(
"fee");
21 TBranch *bd = t->GetBranch(
"desc");
22 TBranch *be = t->GetBranch(
"evt");
25 EEfeeRunDescr *des =
new EEfeeRunDescr();
30 Int_t nentries = (Int_t)t->GetEntries();
31 cout << nentries << endl;
35 for(Int_t ieve=0; ieve<nentries && ieve<max; ieve++) {
36 nbe += be->GetEntry(ieve);
37 nbd += bd->GetEntry(ieve);
38 TClonesArray *block=eve->block;
39 if(ieve%20==0)printf(
"EfeeRawEvent ID=%d with DataBlock entered=%d of %d, accepted %d events of %d\n", eve->getID(),block->GetEntries(),block->GetSize(), nAcc,ieve);
49 for(j=0;j<block->GetEntries();j++) {
51 if(j==0) token=blk->getToken();
52 if(token!=blk->getToken()){ token=-2;
break;}
53 if(blk->getCrateID()<3 || blk->getCrateID()>5) { token =-3;
break;}
55 if(blk->getCrateID()!=j+3) {
62 for(
int k=0;k<128;k++) {
63 int adc=blk->getData()[k];
66 if(n256>5){ token =-5; ;
break;}
85 for(j=0;j<block->GetEntries();j++) {
88 for(
int k=0;k<128;k++) {
89 int adc=blk->getData()[k];
93 switch( blk->getCrateID()) {
94 case 3: x3_71=blk->getData()[71];x3_61=blk->getData()[61];
break;
95 case 4: x4_10=blk->getData()[10];x4_1=blk->getData()[1];
break;
96 case 5: x5_95=blk->getData()[95];x5_99=blk->getData()[99];
break;
100 hd[0]->Fill(x4_10,x3_71);
101 hd[1]->Fill(x4_10,x5_95);
102 hd[2]->Fill(x4_10,x4_1);
104 hd[3]->Fill(x3_61,x3_71);
105 hd[4]->Fill(x3_61,x4_1);
106 hd[5]->Fill(x5_99,x4_1);
107 hd[6]->Fill(x5_99,x5_95);
108 if(x4_10>40 && x4_1 >40 && x3_71>60 && x3_61>80 && x5_99>60 && x5_95>80 )
134 void initHisto(TH2F **h2) {
139 char tt1[100], tt2[100];
140 sprintf(tt1,
"cr%dspeR",crate);
141 sprintf(tt2,
"chan vs. raw ADC , carte=%d",crate);
143 h2[i]=
new TH2F(tt1,tt2, 200,0.,400,129,-0.5,128.5);
148 void initHistoD(TH2F **h2) {
150 h2[0]=
new TH2F(
"dd0",
" cr3/ch71 vs. cr4/ch10", 100,0.,200,100,0.,200);
151 h2[1]=
new TH2F(
"dd1",
" cr5/ch95 vs. cr4/ch10", 100,0.,200,100,0.,200);
152 h2[2]=
new TH2F(
"dd2",
" cr4/ch1 vs. cr4/ch10", 100,0.,200,100,0.,200);
153 h2[3]=
new TH2F(
"dd3",
" cr3/ch71 vs. cr3/ch61", 100,0.,200,100,0.,200);
154 h2[4]=
new TH2F(
"dd4",
" cr4/ch1 vs. cr3/ch61", 100,0.,200,100,0.,200);
155 h2[5]=
new TH2F(
"dd5",
" cr4/ch1 vs. cr5/ch99", 100,0.,200,100,0.,200);
156 h2[6]=
new TH2F(
"dd6",
" cr5/ch95 vs. cr5/ch99", 100,0.,200,100,0.,200);