--- quicklook/tracker/flight/macros/FTrkCalibQLook_EXPERT.cxx 2006/05/18 13:06:08 1.2 +++ 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=file(0,dwpos); TString out; if(outdir.Length()==0){ @@ -83,13 +70,14 @@ }else{ out = outdir; } + if(out.Last('/')+1Get("CalibHeader"); hotr->SetBranchAddress("Header", &eh4); @@ -195,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]; @@ -259,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]; - }; - }; + } + } // @@ -268,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"); @@ -306,13 +305,13 @@ TH1F *histoasig[12]; //histos of sigma TH1F *histoaped[12]; //histos of pedestals - Double_t posy = 0.95; // up y-coord - top pads - Double_t hpad = 0.15; // pad height - Double_t posx1=0; // left x-coord - pad column - Double_t posx2=0; // right x-coord - pad olumn - Double_t posx0=0; // x-coord - column division - Double_t wrel = 0.6; // relative x size of first sub-column - Double_t marg = 0.004; // margin among pads + Float_t posy = 0.95; // up y-coord - top pads + Float_t hpad = 0.15; // pad height + Float_t posx1=0; // left x-coord - pad column + Float_t posx2=0; // right x-coord - pad olumn + Float_t posx0=0; // x-coord - column division + Float_t wrel = 0.6; // relative x size of first sub-column + Float_t marg = 0.004; // margin among pads stringstream title; stringstream hid; @@ -335,20 +334,20 @@ /* -----------> HISTOGRAMS */ /* calibration parameters */ title<<"DSP "<cd(); trkpadtext[nn]->Draw(); trkpad2[nn]->SetLogy();