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

Diff of /DarthVader/src/DarthVader.cpp

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

revision 1.19 by mocchiut, Mon Nov 20 12:08:54 2006 UTC revision 1.24 by mocchiut, Tue Jan 9 10:17:27 2007 UTC
# Line 36  using namespace std; Line 36  using namespace std;
36  void usage(){  void usage(){
37    printf("\nUsage:\n");    printf("\nUsage:\n");
38    printf("\n DarthVader [ options ] -idRun ID_RUN [+-all] [+-detector [ detector options ] ] \n");    printf("\n DarthVader [ options ] -idRun ID_RUN [+-all] [+-detector [ detector options ] ] \n");
39    printf("\n Options are: \n");    printf("\n Options are: \n\n");
40    printf("\n --version         print informations about compilation and exit\n");    printf(" --version         print informations about compilation and exit\n");
41    printf("\n -h | --help       print this help and exit \n");    printf(" -h | --help       print this help and exit \n");
42    printf("\n -v | --verbose    be verbose [default]\n");    printf(" -v | --verbose    be verbose [default]\n");
43    printf("\n -s | --silent     print nothing on STDOUT\n");    printf(" -s | --silent     print nothing on STDOUT\n");
44    printf("\n -c | --clean      remove file if exiting with errors\n");    printf(" -c | --clean      remove file if exiting with errors\n");
45    printf("\n -b | --benchmark  perform and print benchmark test\n");    printf(" -b | --benchmark  perform and print a benchmark test\n");
46    printf("\n -auto | -AUTO     exclude from processing detector which are NOT in the acquisition [default]\n");    printf(" -auto | -AUTO     exclude from processing detector which are NOT in the acquisition [default]\n");
47    printf("\n -zerofill         if a detector is not in the acquisition the routine is called anyway \n");    printf(" -zerofill         if a detector is not in the acquisition the routine is called anyway \n");
48    printf("\n                   but all detector's data will be marked as bad\n");    printf("                   but all detector's data will be marked as bad\n");
49    printf("\n -tedious          exit with error if a detector is not in the acquisition and \n");    printf(" -tedious          exit with error if a detector is not in the acquisition and \n");
50    printf("\n                   it has not been excluded from processing\n");    printf("                   it has not been excluded from processing\n");
51    printf("\n -host             name for the host [default = $PAM_DBHOST or mysql://localhost/pamelaprod]\n");    printf(" -host             name of the DB host [default = $PAM_DBHOST or mysql://localhost/pamelaprod]\n");
52    printf("\n -user             username for the DB [default = $PAM_DBUSER or \"anonymous\"] \n");    printf(" -user             username for the DB connection [default = $PAM_DBUSER or \"anonymous\"] \n");
53    printf("\n -psw              password for the DB [default = $PAM_DBPSW or \"\"]\n");    printf(" -psw              password for the DB connection [default = $PAM_DBPSW or \"\"]\n");
54    printf("\n -processFile file output filename [default ID_RUN.Level2.root]\n");    printf(" -idRun ID_RUN     ID number (from the DB) of the run to be processed \n");
55    printf("\n -idRun            ID_RUN: ID number of the run to be processed \n");    printf(" -processFile file output filename [default ID_RUN.Level2.root]\n");
56    printf("\n +all | +ALL       call all detectors software [default]\n");    printf(" +all | +ALL       call all detectors software [default]\n");
57    printf("\n -all | -ALL       call nothing\n");    printf(" -all | -ALL       call nothing\n");
58    printf("\n +detector         process detector; detector can be: TOF,TRK,CAL,TRG,ORB,S4,ND,AC,RUN\n");    printf(" +detector         process detector; detector can be: TOF,TRK,CAL,TRG,ORB,S4,ND,AC,RUN\n");
59    printf("\n -detector         do not process detector (as above)\n");    printf(" -detector         do not process detector (as above)\n");
60    printf("\n                   detector options must be included in square parenthesis with spaces, for example:\n");    printf("                   detector options must be included in square parenthesis with spaces, for example:\n");
61    printf("\n                   +CAL [ --verbose -g ] +TRK [ -v --level1 ] \n");      printf("                   +CAL [ --verbose -g ] +TRK [ -v --level1 ] \n");  
62    printf("\nExamples: \n");    printf("\n Examples: \n");
63    printf("\nStandard call: DarthVader -idRun 1085 \n");    printf(" Standard call:\n            DarthVader -idRun 1085 \n");
64    printf("\nProcess only RunInfo and Tracker (be verbose for tracker): DarthVader -idRun 1085 -all +RUN +TRK [ --verbose ] \n");    printf(" Process only RunInfo and Tracker (be verbose for tracker):\n            DarthVader -idRun 1085 -all +RUN +TRK [ --verbose ] \n");
65    printf("\nProcess all and be verbose for calorimeter: DarthVader -idRun 1085 +CAL [ --verbose ] \n\n");    printf(" Process all and be verbose for calorimeter:\n            DarthVader -idRun 1085 +CAL [ --verbose ] \n\n");
66  };  };
67  //  //
68  // Here the main  // Here the main
# Line 545  int main(int numinp, char *inps[]){ Line 545  int main(int numinp, char *inps[]){
545      // Start:      // Start:
546      //      //
547      printf("\n Welcome to the PAMELA LEVEL2 flight software, version %s \n\n",version.Data());      printf("\n Welcome to the PAMELA LEVEL2 flight software, version %s \n\n",version.Data());
548        if ( run )  printf("\n Processing run number %u \n\n",run);
549      //      //
550      // Connect to the DB      // Connect to the DB
551      //      //
# Line 583  int main(int numinp, char *inps[]){ Line 584  int main(int numinp, char *inps[]){
584      processFile = new TFile(filename.Data(),"UPDATE");      processFile = new TFile(filename.Data(),"UPDATE");
585      if ( !processFile->IsOpen() ) throw -15;          if ( !processFile->IsOpen() ) throw -15;    
586      //      //
587        Long64_t maxsize = 10000000000LL;  
588        TTree::SetMaxTreeSize(maxsize);
589        processFile->SetCompressionLevel(1);
590        //
591        //
592      // Run the core program, put any output error in the "error" variable      // Run the core program, put any output error in the "error" variable
593      //      //
594      if ( debug ) printf("\n\n Pre-processing:\n\n");      if ( debug ) printf("\n\n Pre-processing:\n\n");
# Line 810  int main(int numinp, char *inps[]){ Line 816  int main(int numinp, char *inps[]){
816      case -114: message += " CALORIMETERLEVEL2 -  Help called"; break;      case -114: message += " CALORIMETERLEVEL2 -  Help called"; break;
817      case -115: message += " CALORIMETERLEVEL2 -  No Calorimeter bad strip offline mask file"; break;      case -115: message += " CALORIMETERLEVEL2 -  No Calorimeter bad strip offline mask file"; break;
818      case -116: message += " CALORIMETERLEVEL2 -  DB connection problems"; break;      case -116: message += " CALORIMETERLEVEL2 -  DB connection problems"; break;
819        case -117: message += " CALORIMETERLEVEL2 -  Cannot reprocess file with Level1 data without calling Level1 routine"; break;
820        case -118: message += " CALORIMETERLEVEL2 -  Cannot reprocess file without Level1 data calling Level1 routine"; break;
821        //        //
822      case -200: message += " TRACKERLEVEL2 - LEVEL1 framework unknown (HBOOK/ROOT)"; break;      case -200: message += " TRACKERLEVEL2 - LEVEL1 framework unknown (HBOOK/ROOT)"; break;
823      case -201: message += " TRACKERLEVEL2 - LEVEL2 framework unknown (HBOOK/ROOT)"; break;      case -201: message += " TRACKERLEVEL2 - LEVEL2 framework unknown (HBOOK/ROOT)"; break;
# Line 898  int main(int numinp, char *inps[]){ Line 906  int main(int numinp, char *inps[]){
906    };    };
907    if ( processFile ){    if ( processFile ){
908      processFile->cd();      processFile->cd();
909        processFile->WriteStreamerInfo();
910      processFile->Close();      processFile->Close();
911    };    };
912    //    //

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.24

  ViewVC Help
Powered by ViewVC 1.1.23