/[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.5 by pam-fi, Thu Jun 8 17:03:57 2006 UTC revision 1.6 by pam-fi, Thu Jun 29 11:11:59 2006 UTC
# Line 1  Line 1 
1  /**  /**
2   * FTrkCalibQLookExpert.cpp   * FTrkCalibQLookExpert.cxx
3   *   *
4   * autor: D.Fedele   * autor: D.Fedele
5   * version 3.0   * version v1r04
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 18  Line 18 
18  #include <TPaveText.h>  #include <TPaveText.h>
19  #include <TLatex.h>  #include <TLatex.h>
20  #include <TCanvas.h>  #include <TCanvas.h>
21    #include <TFile.h>
22  #include <TTree.h>  #include <TTree.h>
23  #include <TGraph.h>  #include <TGraph.h>
24  #include <TStyle.h>  #include <TStyle.h>
# Line 29  Line 30 
30  #include <CalibTrk2Event.h>  #include <CalibTrk2Event.h>
31  //  //
32    
33    typedef struct caltrk_def{
 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; i<to; i++){  
         s1.Append(s2[i],1);  
     };  
 };  
   
  typedef struct caltrk_def{  
34    Int_t good0[2];    Int_t good0[2];
35    Int_t daqmode[12];    Int_t daqmode[12];
36    Int_t dspnum[12];    Int_t dspnum[12];
# Line 70  void FTrkCalibQLook_EXPERT(TString file, Line 59  void FTrkCalibQLook_EXPERT(TString file,
59    //    //
60    //   obtain information about the data file and select the output dir    //   obtain information about the data file and select the output dir
61    const string filepath=file.Data();    const string filepath=file.Data();
62    Int_t dwpos = filepath.rfind("/");    Int_t dwpos = file.Last('/');
63    Int_t dwpos1 = filepath.rfind(".root");    Int_t dwpos1 = file.Last('.');
64    TString fpath=(filepath.c_str());    TString base,ffile ;
65    TString base,ffile;    ffile=file(dwpos+1,dwpos1-(dwpos+1));
66    stringcopy(base,fpath,0,dwpos);    if(dwpos>0) base=file(0,dwpos);
   stringcopy(ffile,fpath,dwpos+1,dwpos1);  
   if(dwpos>0) base+="/";  
67    
68    TString out;    TString out;
69    if(outdir.Length()==0){    if(outdir.Length()==0){
# Line 84  void FTrkCalibQLook_EXPERT(TString file, Line 71  void FTrkCalibQLook_EXPERT(TString file,
71    }else{    }else{
72      out = outdir;      out = outdir;
73    }    }
74      if(out.Last('/')+1<out.Length()) out+="/";
75    
76    //    //
77    // inizialise the variables and open the file    // inizialise the variables and open the file

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

  ViewVC Help
Powered by ViewVC 1.1.23