/[PAMELA software]/calo/flight/MyDetector2Level2/src/MyDetector2Level2.cpp
ViewVC logotype

Diff of /calo/flight/MyDetector2Level2/src/MyDetector2Level2.cpp

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

revision 1.1.1.1 by mocchiut, Tue Apr 18 13:12:40 2006 UTC revision 1.2 by mocchiut, Fri Apr 21 12:39:36 2006 UTC
# Line 25  void usage(){ Line 25  void usage(){
25    printf("\n -v | --verbose  be verbose [default: print nothing on STDOUT]\n");    printf("\n -v | --verbose  be verbose [default: print nothing on STDOUT]\n");
26    printf("\n -idRun          ID_RUN: ID number of the run to be processed \n");    printf("\n -idRun          ID_RUN: ID number of the run to be processed \n");
27    printf("\n -processFile    filename : output filename [default ID_RUN.Level2.root]\n");    printf("\n -processFile    filename : output filename [default ID_RUN.Level2.root]\n");
28    printf("\n -processFolder  not used [default \"\"]\n");    printf("\n -processFolder  default \"mydetector2Folder\"\n");
29    printf("\n Notice that parameter order does not matter. \n");    printf("\n Notice that parameter order does not matter. \n");
30    printf("\nExample: \n\nMyDetector2Level2 -idRun 1085 -processFile nomefile.root\n\n");    printf("\nExample: \n\nMyDetector2Level2 -idRun 1085 -processFile nomefile.root\n\n");
31  };  };
# Line 43  int main(int numinp, char *inps[]){ Line 43  int main(int numinp, char *inps[]){
43    TString filename;    TString filename;
44    TSQLServer *dbc = 0;    TSQLServer *dbc = 0;
45    Bool_t givenid = false;    Bool_t givenid = false;
46      TString processFolder = "mydetector2Folder";
47    //    //
48    // Checking input parameters    // Checking input parameters
49    //    //
# Line 57  int main(int numinp, char *inps[]){ Line 58  int main(int numinp, char *inps[]){
58          exit(0);          exit(0);
59        };        };
60        if ( !strcmp(inps[i],"-idRun") ) {        if ( !strcmp(inps[i],"-idRun") ) {
61          if ( numinp-1 < i+1 ) exit(-3);          if ( numinp-1 < i+1 ){
62              usage();
63              exit(-3);
64            };
65          givenid = true;          givenid = true;
66          char *pEnd;              char *pEnd;    
67          run = strtoull(inps[i+1],&pEnd,0);                run = strtoull(inps[i+1],&pEnd,0);      
68        };        };
69        if ( !strcmp(inps[i],"-processFile") ) {        if ( !strcmp(inps[i],"-processFile") ) {
70          if ( numinp-1 < i+1 ) exit(-3);          if ( numinp-1 < i+1 ){
71              usage();
72              exit(-3);
73            };
74          filename = (TString)inps[i+1];            filename = (TString)inps[i+1];  
75        };        };
76          if ( !strcmp(inps[i],"-processFolder") ) {
77            if ( numinp-1 < i+1 ){
78              usage();
79              exit(-3);
80            };
81            processFolder = (TString)inps[i+1];    
82          };
83        if ( !strcmp(inps[i],"-v") || !strcmp(inps[i],"--verbose") ) beverbose = true;        if ( !strcmp(inps[i],"-v") || !strcmp(inps[i],"--verbose") ) beverbose = true;
84      };      };
85    } else {    } else {
# Line 116  int main(int numinp, char *inps[]){ Line 130  int main(int numinp, char *inps[]){
130    //    //
131    // Run the core program, put any output error in the "error" variable    // Run the core program, put any output error in the "error" variable
132    //    //
133    error = MyDect2Core(run,filename,dbc);    error = MyDect2Core(run,filename,processFolder,dbc);
134    //    //
135    // Close the DB connection    // Close the DB connection
136    //    //

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

  ViewVC Help
Powered by ViewVC 1.1.23