/[PAMELA software]/PadmeAmidala/src/PadmeAmidala.cpp
ViewVC logotype

Diff of /PadmeAmidala/src/PadmeAmidala.cpp

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

revision 1.11 by mocchiut, Fri Oct 10 13:50:57 2014 UTC revision 1.14 by mocchiut, Mon Oct 20 12:27:56 2014 UTC
# Line 42  void amidalausage(){ Line 42  void amidalausage(){
42    printf(" --version        print informations about compilation and exit\n");    printf(" --version        print informations about compilation and exit\n");
43    printf(" -h | --help      print this help and exit \n");    printf(" -h | --help      print this help and exit \n");
44    printf(" -g | --debug     set debug flag\n");    printf(" -g | --debug     set debug flag\n");
45      printf(" -p | --pedantic  merge only when all level2 run files are present (default NOT pedantic, merge whatever it finds)\n");
46    printf(" -idRun run       merge all runs in the directory which have the same date of run \"run\"\n");    printf(" -idRun run       merge all runs in the directory which have the same date of run \"run\"\n");
47    printf(" -outdir dir      output directory \"dir\"\n");    printf(" -outdir dir      output directory \"dir\"\n");
48    printf(" -dir dir         merge all runs in the directory \"dir\"\n");    printf(" -dir dir         merge all runs in the directory \"dir\"\n");
# Line 76  int main(int numinp, char *inps[]){ Line 77  int main(int numinp, char *inps[]){
77    Bool_t debug = false;    Bool_t debug = false;
78    Bool_t delop = false;    Bool_t delop = false;
79    Bool_t dbup = true;    Bool_t dbup = true;
80      Bool_t pedantic = false;
81    //    //
82    const char *pamdbhost=gSystem->Getenv("PAM_DBHOST");    const char *pamdbhost=gSystem->Getenv("PAM_DBHOST");
83    const char *pamdbuser=gSystem->Getenv("PAM_DBUSER");    const char *pamdbuser=gSystem->Getenv("PAM_DBUSER");
# Line 108  int main(int numinp, char *inps[]){ Line 110  int main(int numinp, char *inps[]){
110        if ( !strcmp(inps[i],"-d") || !strcmp(inps[i],"-delete") ){        if ( !strcmp(inps[i],"-d") || !strcmp(inps[i],"-delete") ){
111          delop = true;          delop = true;
112        };        };
113          if ( !strcmp(inps[i],"-p") || !strcmp(inps[i],"--pedantic") ){
114            pedantic = true;
115          }
116        if ( !strcmp(inps[i],"-no-DBupdate") ){        if ( !strcmp(inps[i],"-no-DBupdate") ){
117          dbup = false;          dbup = false;
118        };        };
# Line 273  int main(int numinp, char *inps[]){ Line 278  int main(int numinp, char *inps[]){
278    };        };    
279    //    //
280    myquery.str("");    myquery.str("");
281    myquery << "SET time_zone='+0:00'; SET sql_mode = 'NO_UNSIGNED_SUBTRACTION';";    myquery << "SET time_zone='+0:00';";
282    dbc->Query(myquery.str().c_str());    delete dbc->Query(myquery.str().c_str());
283      delete dbc->Query("SET sql_mode = 'NO_UNSIGNED_SUBTRACTION';");
284    //    //
285    RunGlue *rg = new RunGlue(dbc,run,dir,outdir);    RunGlue *rg = new RunGlue(dbc,run,dir,outdir);
286    //    //
# Line 292  int main(int numinp, char *inps[]){ Line 298  int main(int numinp, char *inps[]){
298      //      //
299      l = rg->GetRunList();      l = rg->GetRunList();
300      //      //
301      if ( l ){      if ( l && !(rg->HasDiscardedRuns() && pedantic) ){
302        //        //
 //      if ( rg->OpenFile() ){  
303        if ( rg->FileIsOpen() ){        if ( rg->FileIsOpen() ){
304          //          //
305          rg->MergeRootfile(l);          rg->MergeRootfile(l);
# Line 310  int main(int numinp, char *inps[]){ Line 315  int main(int numinp, char *inps[]){
315        };        };
316      } else {      } else {
317        RET = 255;        RET = 255;
318      };        if (rg->HasDiscardedRuns() && pedantic){
319            printf(" Missing runs (and pedantic selected), cannot merge file %s \n",rg->GetFilename().Data());
320            rg->Clean();
321          }
322        }
323      delete l;      delete l;
324      //      //
325    };    }
326    //    //
327    delete rg;    delete rg;
328    //    //

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

  ViewVC Help
Powered by ViewVC 1.1.23