/[PAMELA software]/quicklook/tracker/flight/macros/FTrkCalibQLook_EXPERT.cxx
ViewVC logotype

Diff of /quicklook/tracker/flight/macros/FTrkCalibQLook_EXPERT.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by pam-fi, Thu Jun 29 11:11:59 2006 UTC revision 1.8 by pam-fi, Thu Jul 13 10:13:37 2006 UTC
# Line 2  Line 2 
2   * FTrkCalibQLookExpert.cxx   * FTrkCalibQLookExpert.cxx
3   *   *
4   * autor: D.Fedele   * autor: D.Fedele
5   * version v1r04   * version v1r06
6   * Parameters:   * Parameters:
7   *      file - the data file to analyze   *      file - the data file to analyze
8   *      step - select =1 in order to analyze one event at time   *      step - select =1 in order to analyze one event at time
# Line 58  void FTrkCalibQLook_EXPERT(TString file, Line 58  void FTrkCalibQLook_EXPERT(TString file,
58  {    {  
59    //    //
60    //   obtain information about the data file and select the output dir    //   obtain information about the data file and select the output dir
   const string filepath=file.Data();  
61    Int_t dwpos = file.Last('/');    Int_t dwpos = file.Last('/');
62    Int_t dwpos1 = file.Last('.');    Int_t dwpos1 = file.Last('.');
63    TString base,ffile ;    TString base,ffile ;
# Line 78  void FTrkCalibQLook_EXPERT(TString file, Line 77  void FTrkCalibQLook_EXPERT(TString file,
77    Int_t nevents=0;    Int_t nevents=0;
78    Int_t minevent = 0;    Int_t minevent = 0;
79    Int_t maxevent = 0;    Int_t maxevent = 0;
80    ULong64_t FOBT[2], HOBT=0, TOBT=0;    ULong64_t FOBT[2];
81        
82    FOBT[0]=0;    FOBT[0]=0;
83    FOBT[1]=0;    FOBT[1]=0;
# Line 122  void FTrkCalibQLook_EXPERT(TString file, Line 121  void FTrkCalibQLook_EXPERT(TString file,
121    pamela::EventHeader *eh1=0,*eh2=0,*eh4=0,*eh3=0;    pamela::EventHeader *eh1=0,*eh2=0,*eh4=0,*eh3=0;
122    pamela::PscuHeader *ph=0;    pamela::PscuHeader *ph=0;
123    pamela::CalibTrk1Event *trk1 = 0;    pamela::CalibTrk1Event *trk1 = 0;
124    pamela::CalibTrk2Event *trk2 = 0;        pamela::CalibTrk2Event *trk2 = 0;
125      pamela::EventCounter *cod=0;  
126      
127      pamela::PacketType *pctp=0;  
128        
129    hotr = (TTree*)calibFile->Get("CalibHeader");    hotr = (TTree*)calibFile->Get("CalibHeader");
130    hotr->SetBranchAddress("Header", &eh4);    hotr->SetBranchAddress("Header", &eh4);
# Line 184  void FTrkCalibQLook_EXPERT(TString file, Line 186  void FTrkCalibQLook_EXPERT(TString file,
186    //    //
187    //**********************************************************************    //**********************************************************************
188            
189      Int_t hcevent=hotr->GetEntries();
190      printf("\n%d\n",hcevent);
191      ULong64_t HOBT[hcevent], TOBT[hcevent];
192      for (Int_t i = 0; i < hcevent; i++){
193        totr->GetEntry(i);
194        hotr->GetEntry(i);
195        ph = eh4->GetPscuHeader();
196        HOBT[i]= ph->GetOrbitalTime();
197        ph = eh3->GetPscuHeader();
198        TOBT[i]= ph->GetOrbitalTime();
199      }
200        
201    printf("\n Scan of calibration packets from %i to %i ... \n\n",minevent+1,maxevent);    printf("\n Scan of calibration packets from %i to %i ... \n\n",minevent+1,maxevent);
202    for (Int_t i = minevent; i < maxevent; i++){        for (Int_t i = minevent; i < maxevent; i++){    
203            
204      otr1->GetEntry(i);      otr1->GetEntry(i);
205      otr2->GetEntry(i);      otr2->GetEntry(i);
206      totr->GetEntry(i);      
     hotr->GetEntry(i);  
     ph = eh4->GetPscuHeader();  
     HOBT= ph->GetOrbitalTime();  
     ph = eh3->GetPscuHeader();  
     TOBT= ph->GetOrbitalTime();  
         
207      ctrk.good0[0]=trk1->good0;      ctrk.good0[0]=trk1->good0;
208      ctrk.good0[1]=trk2->good0;      ctrk.good0[1]=trk2->good0;
209      for (Int_t m = 0; m < 6; m++){      for (Int_t m = 0; m < 6; m++){
210        ph = eh1->GetPscuHeader();        ph = eh1->GetPscuHeader();
211          cod = eh1->GetCounter();
212        FOBT[0]= ph->GetOrbitalTime();        FOBT[0]= ph->GetOrbitalTime();
213        ctrk.daqmode[trk1->DSPnumber[m]-1]=trk1->DAQmode[m];        ctrk.daqmode[trk1->DSPnumber[m]-1]=trk1->DAQmode[m];
214        ctrk.dspnum[trk1->DSPnumber[m]-1]=trk1->DSPnumber[m];        ctrk.dspnum[trk1->DSPnumber[m]-1]=trk1->DSPnumber[m];
# Line 248  void FTrkCalibQLook_EXPERT(TString file, Line 257  void FTrkCalibQLook_EXPERT(TString file,
257          ctrk.dspped[trk2->DSPnumber[m]-1][j]=trk2->DSPped_par[m][j];          ctrk.dspped[trk2->DSPnumber[m]-1][j]=trk2->DSPped_par[m][j];
258          ctrk.dspsig[trk2->DSPnumber[m]-1][j]=trk2->DSPsig_par[m][j];          ctrk.dspsig[trk2->DSPnumber[m]-1][j]=trk2->DSPsig_par[m][j];
259          ctrk.dspbad[trk2->DSPnumber[m]-1][j]=trk2->DSPbad_par[m][j];          ctrk.dspbad[trk2->DSPnumber[m]-1][j]=trk2->DSPbad_par[m][j];
260        };        }
261      };      }
262                                
263    
264      //      //
# Line 257  void FTrkCalibQLook_EXPERT(TString file, Line 266  void FTrkCalibQLook_EXPERT(TString file,
266      Int_t risposta=0;      Int_t risposta=0;
267      stringstream fromfile;      stringstream fromfile;
268    
269      fromfile<<"FTrkCalibQLook_EXPERT      File: "<<ffile<<"        -- CalibHeader OBT= "<<HOBT<<" -- Calib pkt OBT= "<<FOBT[0]<<" -- CalibTrailer OBT= "<<TOBT<<" --";      printf("\n\t%d\n",cod->Get(pctp->CalibHeader));
270        fromfile<<"FTrkCalibQLook_EXPERT      File: "<<ffile<<"        -- CalibHeader OBT= "<<HOBT[(cod->Get(pctp->CalibHeader))-1]<<" -- Calib pkt OBT= "<<FOBT[0]<<" -- CalibTrailer OBT= "<<TOBT[(cod->Get(pctp->CalibHeader))-1]<<" --";
271            
272      gStyle->SetLabelSize(0.08,"x");      gStyle->SetLabelSize(0.08,"x");
273      gStyle->SetLabelSize(0.08,"y");      gStyle->SetLabelSize(0.08,"y");

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.23