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

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

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

revision 1.2 by pam-fi, Thu Jun 1 15:23:13 2006 UTC revision 1.10 by pam-fi, Tue Aug 22 15:47:52 2006 UTC
# Line 2  Line 2 
2   * FTrkQLook_EXPERT.cc   * FTrkQLook_EXPERT.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   */   */
# Line 26  void usage(){   Line 26  void usage(){  
26    printf("\t -v:           be verbose \n");      printf("\t -v:           be verbose \n");  
27    printf("\t -fromev:      first event to analyze [default = 0] \n");    printf("\t -fromev:      first event to analyze [default = 0] \n");
28    printf("\t -toev:        last event to analyze  [default = 0] \n");    printf("\t -toev:        last event to analyze  [default = 0] \n");
29    printf("\t -outdir:      output directory [default = ./] \n");    printf("\t -outDir:      path of the output directory [default = ./] (with or without final '/')\n");
30    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");
31    printf("\nExamples:\n\tFTrkQLook_EXPERT /home/pamela/filesfromyoda/DW_050523_01600.root -v \n\n");    printf("\nExamples:\n\tFTrkQLook_EXPERT /home/pamela/filesfromyoda/DW_050523_01600.root -v \n\n");
32    printf("\tFTrkQLook_EXPERT /home/pamela/filesfromyoda/DW_050523_01600.root -v -format jpg\n\n");    printf("\tFTrkQLook_EXPERT /home/pamela/filesfromyoda/DW_050523_01600.root -v -format jpg\n\n");
33    printf("\tFTrkQLook_EXPERT /home/pamela/filesfromyoda/DW_050523_01600.root -v -format jpg -outdir ~/tmp/ \n\n");    printf("\tFTrkQLook_EXPERT /home/pamela/filesfromyoda/DW_050523_01600.root -v -format jpg -outDir ~/tmp/ \n\n");
34  }  }
35    
36  int main(int argc, char* argv[]){  int main(int argc, char* argv[]){
# Line 62  int main(int argc, char* argv[]){ Line 62  int main(int argc, char* argv[]){
62          if ( !strcmp(argv[i],"-v") || !strcmp(argv[i],"--verbose") )          if ( !strcmp(argv[i],"-v") || !strcmp(argv[i],"--verbose") )
63            beverbose = true;            beverbose = true;
64                                    
65          if (!strcmp(argv[i], "-outdir")){          if (!strcmp(argv[i], "-outDir")){
66            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")){
67              printf( "\n-outdir needs arguments. \n");              printf( "\n-outDir needs arguments. \n");
68              usage();              usage();
69              return(0);              return(0);
70            }            }
# Line 75  int main(int argc, char* argv[]){ Line 75  int main(int argc, char* argv[]){
75          }          }
76                    
77          if (!strcmp(argv[i], "-fromev")){          if (!strcmp(argv[i], "-fromev")){
78            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")){
79              printf( "\n-fromev needs arguments. \n");              printf( "\n-fromev needs arguments. \n");
80              usage();              usage();
81              return(0);              return(0);
# Line 87  int main(int argc, char* argv[]){ Line 87  int main(int argc, char* argv[]){
87          }          }
88                    
89          if (!strcmp(argv[i], "-toev")){          if (!strcmp(argv[i], "-toev")){
90            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")){
91              printf( "\n-toev needs arguments. \n");              printf( "\n-toev needs arguments. \n");
92              usage();              usage();
93              return(0);              return(0);
# Line 99  int main(int argc, char* argv[]){ Line 99  int main(int argc, char* argv[]){
99          }          }
100    
101          if (!strcmp(argv[i], "-format")){          if (!strcmp(argv[i], "-format")){
102            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")){
103              printf( "\n-format needs arguments. \n");              printf( "\n-format needs arguments. \n");
104              usage();              usage();
105              return(0);              return(0);
# Line 109  int main(int argc, char* argv[]){ Line 109  int main(int argc, char* argv[]){
109              continue;              continue;
110            }            }
111          }          }
112    
113            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")){
114              printf( "\n------>Warning: WRONG OPTIONS!\n");
115              usage();
116              return(0);
117            }
118        }        }
119      }      }
120    }    }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.23