--- quicklook/tracker/flight/macros/FTrkCalibQLook_EXPERT.cxx 2006/06/05 14:23:29 1.4 +++ quicklook/tracker/flight/macros/FTrkCalibQLook_EXPERT.cxx 2006/07/13 10:13:37 1.8 @@ -1,8 +1,8 @@ /** - * FTrkCalibQLookExpert.cpp + * FTrkCalibQLookExpert.cxx * * autor: D.Fedele - * version 2.0 + * version v1r06 * Parameters: * file - the data file to analyze * step - select =1 in order to analyze one event at time @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -29,19 +30,7 @@ #include // - -void stringcopy(TString& s1, const TString& s2, Int_t from=0, Int_t to=0){ - if ( to == 0 ){ - Int_t t2length = s2.Length(); - s1 = ""; - to = t2length; - }; - for (Int_t i = from; i0) base+="/"; + Int_t dwpos = file.Last('/'); + Int_t dwpos1 = file.Last('.'); + TString base,ffile ; + ffile=file(dwpos+1,dwpos1-(dwpos+1)); + if(dwpos>0) base=file(0,dwpos); TString out; if(outdir.Length()==0){ @@ -84,13 +70,14 @@ }else{ out = outdir; } + if(out.Last('/')+1Get("CalibHeader"); hotr->SetBranchAddress("Header", &eh4); @@ -196,22 +186,29 @@ // //********************************************************************** + Int_t hcevent=hotr->GetEntries(); + printf("\n%d\n",hcevent); + ULong64_t HOBT[hcevent], TOBT[hcevent]; + for (Int_t i = 0; i < hcevent; i++){ + totr->GetEntry(i); + hotr->GetEntry(i); + ph = eh4->GetPscuHeader(); + HOBT[i]= ph->GetOrbitalTime(); + ph = eh3->GetPscuHeader(); + TOBT[i]= ph->GetOrbitalTime(); + } + printf("\n Scan of calibration packets from %i to %i ... \n\n",minevent+1,maxevent); for (Int_t i = minevent; i < maxevent; i++){ otr1->GetEntry(i); - otr2->GetEntry(i); - totr->GetEntry(i); - hotr->GetEntry(i); - ph = eh4->GetPscuHeader(); - HOBT= ph->GetOrbitalTime(); - ph = eh3->GetPscuHeader(); - TOBT= ph->GetOrbitalTime(); - + otr2->GetEntry(i); + ctrk.good0[0]=trk1->good0; ctrk.good0[1]=trk2->good0; for (Int_t m = 0; m < 6; m++){ ph = eh1->GetPscuHeader(); + cod = eh1->GetCounter(); FOBT[0]= ph->GetOrbitalTime(); ctrk.daqmode[trk1->DSPnumber[m]-1]=trk1->DAQmode[m]; ctrk.dspnum[trk1->DSPnumber[m]-1]=trk1->DSPnumber[m]; @@ -260,8 +257,8 @@ ctrk.dspped[trk2->DSPnumber[m]-1][j]=trk2->DSPped_par[m][j]; ctrk.dspsig[trk2->DSPnumber[m]-1][j]=trk2->DSPsig_par[m][j]; ctrk.dspbad[trk2->DSPnumber[m]-1][j]=trk2->DSPbad_par[m][j]; - }; - }; + } + } // @@ -269,7 +266,8 @@ Int_t risposta=0; stringstream fromfile; - fromfile<<"FTrkCalibQLook_EXPERT File: "<Get(pctp->CalibHeader)); + fromfile<<"FTrkCalibQLook_EXPERT File: "<SetLabelSize(0.08,"x"); gStyle->SetLabelSize(0.08,"y");