/[PAMELA software]/quicklook/tracker/flight/src/FTrkQLook_BASIC.cc
ViewVC logotype

Diff of /quicklook/tracker/flight/src/FTrkQLook_BASIC.cc

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

revision 1.1 by pam-fi, Wed May 10 09:47:44 2006 UTC revision 1.11 by mocchiut, Fri Jan 17 15:10:44 2014 UTC
# Line 2  Line 2 
2   * FTrkQLook_BASIC.cc   * FTrkQLook_BASIC.cc
3   *   *
4   * autor: D.Fedele   * autor: D.Fedele
5   * version 2.0   * version v1r..
6   * Parameters:   * Parameters:
7   *      file - path of the root file to analyze (give at least this parameter)     *      file - path of the root file to analyze (give at least this parameter)  
8   *      fromevent - first event to analyze   *      fromevent - first event to analyze
9   *      toevent - last event to analyze   *      toevent - last event to analyze
10   *      outdir - total path of output file   *      outDir - total path of output file
11   *      format - extension of output file (pdf,ps,gif,jpg)   *      format - extension of output file (pdf,ps,gif,jpg)
12   *   *
13   */   */
14  #include <TString.h>  #include <TString.h>
15    #include <TAxis.h>
16    #include <TROOT.h>
17  #include <fcntl.h>  #include <fcntl.h>
18    #include <unistd.h>
19    #include <sys/stat.h>
20    #include <cstdlib>
21  extern void FTrkQLook_BASIC(TString file, Int_t fromevent, Int_t toevent, TString outdir, TString format);  extern void FTrkQLook_BASIC(TString file, Int_t fromevent, Int_t toevent, TString outdir, TString format);
22  extern void info();  extern void info();
23    
# Line 25  void usage(){   Line 29  void usage(){  
29    printf("\t -v:           be verbose \n");      printf("\t -v:           be verbose \n");  
30    printf("\t -fromev:      first event to analyze [default = 0] \n");    printf("\t -fromev:      first event to analyze [default = 0] \n");
31    printf("\t -toev:        last event to analyze  [default = 0] \n");    printf("\t -toev:        last event to analyze  [default = 0] \n");
32    printf("\t -outdir:      output directory [default = ./] \n");    printf("\t -outDir:      path of the output directory [default = ./] (with or without final '/')\n");
33    printf("\t -format:      format for output file (without . )[default = pdf] \n");    printf("\t -format:      format for output file (without . )[default = pdf] (accepted formats: pdf, ps, png, jpg, gif)\n");
34    printf("\nExamples:\n\tFTrkQLook_BASIC /home/pamela/filesfromyoda/DW_050523_01600.root -v \n\n");    printf("\nExamples:\n\tFTrkQLook_BASIC /home/pamela/filesfromyoda/DW_050523_01600.root -v \n\n");
35    printf("\tFTrkQLook_BASIC /home/pamela/filesfromyoda/DW_050523_01600.root -v -format jpg\n\n");    printf("\tFTrkQLook_BASIC /home/pamela/filesfromyoda/DW_050523_01600.root -v -format jpg\n\n");
36    printf("\tFTrkQLook_BASIC /home/pamela/filesfromyoda/DW_050523_01600.root -v -format jpg -outdir ~/tmp/ \n\n");    printf("\tFTrkQLook_BASIC /home/pamela/filesfromyoda/DW_050523_01600.root -v -format jpg -outDir ~/tmp/ \n\n");
37  }  }
38    
39  int main(int argc, char* argv[]){  int main(int argc, char* argv[]){
# Line 60  int main(int argc, char* argv[]){ Line 64  int main(int argc, char* argv[]){
64          if ( !strcmp(argv[i],"-v") || !strcmp(argv[i],"--verbose") )          if ( !strcmp(argv[i],"-v") || !strcmp(argv[i],"--verbose") )
65            beverbose = true;            beverbose = true;
66                                    
67          if (!strcmp(argv[i], "-outdir")){          if (!strcmp(argv[i], "-outDir")){
68            if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-format") || !strcmp(argv[i], "-fromev") || !strcmp(argv[i], "-toev")){            if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-format") || !strcmp(argv[i], "-fromev") || !strcmp(argv[i], "-toev")){
69              printf( "\n-outdir needs arguments. \n");              printf( "\n-outDir needs arguments. \n");
70              usage();              usage();
71              return(0);              return(0);
72            }            }
# Line 73  int main(int argc, char* argv[]){ Line 77  int main(int argc, char* argv[]){
77          }          }
78                    
79          if (!strcmp(argv[i], "-fromev")){          if (!strcmp(argv[i], "-fromev")){
80            if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-format") || !strcmp(argv[i], "-toev") || !strcmp(argv[i], "-outdir")){            if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-format") || !strcmp(argv[i], "-toev") || !strcmp(argv[i], "-outDir")){
81              printf( "\n-fromev needs arguments. \n");              printf( "\n-fromev needs arguments. \n");
82              usage();              usage();
83              return(0);              return(0);
# Line 85  int main(int argc, char* argv[]){ Line 89  int main(int argc, char* argv[]){
89          }          }
90                    
91          if (!strcmp(argv[i], "-toev")){          if (!strcmp(argv[i], "-toev")){
92            if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-format") || !strcmp(argv[i], "-fromev") || !strcmp(argv[i], "-outdir")){            if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-format") || !strcmp(argv[i], "-fromev") || !strcmp(argv[i], "-outDir")){
93              printf( "\n-toev needs arguments. \n");              printf( "\n-toev needs arguments. \n");
94              usage();              usage();
95              return(0);              return(0);
# Line 97  int main(int argc, char* argv[]){ Line 101  int main(int argc, char* argv[]){
101          }          }
102    
103          if (!strcmp(argv[i], "-format")){          if (!strcmp(argv[i], "-format")){
104            if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-fromev") || !strcmp(argv[i], "-toev") || !strcmp(argv[i], "-outdir")){            if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-fromev") || !strcmp(argv[i], "-toev") || !strcmp(argv[i], "-outDir")){
105              printf( "\n-format needs arguments. \n");              printf( "\n-format needs arguments. \n");
106              usage();              usage();
107              return(0);              return(0);
# Line 107  int main(int argc, char* argv[]){ Line 111  int main(int argc, char* argv[]){
111              continue;              continue;
112            }            }
113          }          }
114    
115            if(strcmp(argv[i], "-format") && strcmp(argv[i], "-outDir") && strcmp(argv[i],"-v") && strcmp(argv[i],"--verbose") && strcmp(argv[i], "-fromev") && strcmp(argv[i], "-toev") ){
116              printf( "\n------>Warning: WRONG OPTIONS!\n");
117              usage();
118              return(0);
119            }
120        }        }
121      }      }
122    }    }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.23