/[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.22 by mocchiut, Tue Nov 28 13:29:37 2006 UTC revision 1.26 by mocchiut, Sat Jan 27 06:22:24 2007 UTC
# Line 64  void usage(){ Line 64  void usage(){
64    printf(" Process only RunInfo and Tracker (be verbose for tracker):\n            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(" Process all and be verbose for calorimeter:\n            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    Bool_t CheckDBC(TSQLServer *dbc, TString host, TString user, TString psw){
69        //
70        Bool_t connect = dbc->IsConnected();
71        //
72        if( !dbc || !connect ){
73            dbc = TSQLServer::Connect(host.Data(),user.Data(),psw.Data());
74        };
75        //
76        connect = dbc->IsConnected();
77        //
78        return(connect);
79        //
80    };
81  //  //
82  // Here the main  // Here the main
83  //  //
# Line 584  int main(int numinp, char *inps[]){ Line 598  int main(int numinp, char *inps[]){
598      processFile = new TFile(filename.Data(),"UPDATE");      processFile = new TFile(filename.Data(),"UPDATE");
599      if ( !processFile->IsOpen() ) throw -15;          if ( !processFile->IsOpen() ) throw -15;    
600      //      //
601        Long64_t maxsize = 10000000000LL;  
602        TTree::SetMaxTreeSize(maxsize);
603        processFile->SetCompressionLevel(1);
604        //
605        //
606      // Run the core program, put any output error in the "error" variable      // Run the core program, put any output error in the "error" variable
607      //      //
608      if ( debug ) printf("\n\n Pre-processing:\n\n");      if ( debug ) printf("\n\n Pre-processing:\n\n");
# Line 674  int main(int numinp, char *inps[]){ Line 693  int main(int numinp, char *inps[]){
693      //      //
694      timer.Start(kTRUE);      timer.Start(kTRUE);
695      if ( TRK ) {      if ( TRK ) {
696          CheckDBC(dbc,host,user,psw);
697        printf(" TrackerLevel2 called\n");                        printf(" TrackerLevel2 called\n");                
698        if ( debug ) printf("                      >>>>>>>>>>>>>>>>>>>| start TrkCore STDOUT |<<<<<<<<<<<<<<<<<<<\n");        if ( debug ) printf("                      >>>>>>>>>>>>>>>>>>>| start TrkCore STDOUT |<<<<<<<<<<<<<<<<<<<\n");
699        TRKSGN = TrkCore(run,processFile,dbc,trkargc,trkargv);        TRKSGN = TrkCore(run,processFile,dbc,trkargc,trkargv);
# Line 686  int main(int numinp, char *inps[]){ Line 706  int main(int numinp, char *inps[]){
706      //      //
707      timer.Start(kTRUE);      timer.Start(kTRUE);
708      if ( TOF ) {      if ( TOF ) {
709          CheckDBC(dbc,host,user,psw);
710        printf(" ToFLevel2 called\n");        printf(" ToFLevel2 called\n");
711        if ( debug ) printf("                      >>>>>>>>>>>>>>>>>>>| start ToFCore STDOUT |<<<<<<<<<<<<<<<<<<<\n");        if ( debug ) printf("                      >>>>>>>>>>>>>>>>>>>| start ToFCore STDOUT |<<<<<<<<<<<<<<<<<<<\n");
712        TOFSGN = ToFCore(run,processFile,dbc,tofargc,tofargv);        TOFSGN = ToFCore(run,processFile,dbc,tofargc,tofargv);
# Line 697  int main(int numinp, char *inps[]){ Line 718  int main(int numinp, char *inps[]){
718      //      //
719      timer.Start(kTRUE);      timer.Start(kTRUE);
720      if ( CAL ) {      if ( CAL ) {
721          CheckDBC(dbc,host,user,psw);
722        printf(" CalorimeterLevel2 called\n");        printf(" CalorimeterLevel2 called\n");
723        if ( debug ) printf("                      >>>>>>>>>>>>>>>>>>>| start CaloCore STDOUT |<<<<<<<<<<<<<<<<<<<\n");        if ( debug ) printf("                      >>>>>>>>>>>>>>>>>>>| start CaloCore STDOUT |<<<<<<<<<<<<<<<<<<<\n");
724        CALSGN = CaloCore(run,processFile,dbc,calargc,calargv);        CALSGN = CaloCore(run,processFile,dbc,calargc,calargv);
# Line 708  int main(int numinp, char *inps[]){ Line 730  int main(int numinp, char *inps[]){
730      //      //
731      timer.Start(kTRUE);      timer.Start(kTRUE);
732      if ( TRG ) {      if ( TRG ) {
733          CheckDBC(dbc,host,user,psw);
734        printf(" TriggerLevel2 called\n");        printf(" TriggerLevel2 called\n");
735        if ( debug ) printf("                      >>>>>>>>>>>>>>>>>>>| start TrigCore STDOUT |<<<<<<<<<<<<<<<<<<<\n");        if ( debug ) printf("                      >>>>>>>>>>>>>>>>>>>| start TrigCore STDOUT |<<<<<<<<<<<<<<<<<<<\n");
736        TRGSGN = TrigCore(run,processFile,dbc,trgargc,trgargv);        TRGSGN = TrigCore(run,processFile,dbc,trgargc,trgargv);
# Line 719  int main(int numinp, char *inps[]){ Line 742  int main(int numinp, char *inps[]){
742      //      //
743      timer.Start(kTRUE);      timer.Start(kTRUE);
744      if ( AC ) {      if ( AC ) {
745          CheckDBC(dbc,host,user,psw);
746        printf(" AnticounterLevel2 called\n");        printf(" AnticounterLevel2 called\n");
747        if ( debug ) printf("                      >>>>>>>>>>>>>>>>>>>| start AcCore STDOUT |<<<<<<<<<<<<<<<<<<<\n");        if ( debug ) printf("                      >>>>>>>>>>>>>>>>>>>| start AcCore STDOUT |<<<<<<<<<<<<<<<<<<<\n");
748        ACSGN = AcCore(run,processFile,dbc,acargc,acargv);        ACSGN = AcCore(run,processFile,dbc,acargc,acargv);
# Line 730  int main(int numinp, char *inps[]){ Line 754  int main(int numinp, char *inps[]){
754      //      //
755      timer.Start(kTRUE);      timer.Start(kTRUE);
756      if ( S4 ) {      if ( S4 ) {
757          CheckDBC(dbc,host,user,psw);
758        printf(" S4Level2 called\n");        printf(" S4Level2 called\n");
759        if ( debug ) printf("                      >>>>>>>>>>>>>>>>>>>| start S4Core STDOUT  |<<<<<<<<<<<<<<<<<<<\n");        if ( debug ) printf("                      >>>>>>>>>>>>>>>>>>>| start S4Core STDOUT  |<<<<<<<<<<<<<<<<<<<\n");
760        S4SGN = S4Core(run,processFile,dbc,s4argc,s4argv);        S4SGN = S4Core(run,processFile,dbc,s4argc,s4argv);
# Line 741  int main(int numinp, char *inps[]){ Line 766  int main(int numinp, char *inps[]){
766      //      //
767      timer.Start(kTRUE);      timer.Start(kTRUE);
768      if ( ND ) {      if ( ND ) {
769          CheckDBC(dbc,host,user,psw);
770        printf(" NDLevel2 called\n");        printf(" NDLevel2 called\n");
771        if ( debug ) printf("                      >>>>>>>>>>>>>>>>>>>| start NDCore STDOUT  |<<<<<<<<<<<<<<<<<<<\n");        if ( debug ) printf("                      >>>>>>>>>>>>>>>>>>>| start NDCore STDOUT  |<<<<<<<<<<<<<<<<<<<\n");
772        NDSGN = NDCore(run,processFile,dbc,ndargc,ndargv);        NDSGN = NDCore(run,processFile,dbc,ndargc,ndargv);
# Line 752  int main(int numinp, char *inps[]){ Line 778  int main(int numinp, char *inps[]){
778      //      //
779      timer.Start(kTRUE);      timer.Start(kTRUE);
780      if ( ORB ) {      if ( ORB ) {
781          CheckDBC(dbc,host,user,psw);
782        printf(" OrbitalInfo called\n");        printf(" OrbitalInfo called\n");
783        if ( debug ) printf("                      >>>>>>>>>>>>>>>>>>>| start OrbitalInfoCore STDOUT  |<<<<<<<<<<<<<<<<<<<\n");        if ( debug ) printf("                      >>>>>>>>>>>>>>>>>>>| start OrbitalInfoCore STDOUT  |<<<<<<<<<<<<<<<<<<<\n");
784        ORBSGN = OrbitalInfoCore(run,processFile,dbc,orbargc,orbargv);        ORBSGN = OrbitalInfoCore(run,processFile,dbc,orbargc,orbargv);
# Line 793  int main(int numinp, char *inps[]){ Line 820  int main(int numinp, char *inps[]){
820      case -53:  message += " GLTABLES - No entries matching GL_TRK_CALIB query"; break;      case -53:  message += " GLTABLES - No entries matching GL_TRK_CALIB query"; break;
821      case -54:  message += " GLTABLES - No entries matching GL_CALO_CALIB query"; break;      case -54:  message += " GLTABLES - No entries matching GL_CALO_CALIB query"; break;
822      case -55:  message += " GLTABLES - No entries matching GL_CALO_CALIB query"; break;      case -55:  message += " GLTABLES - No entries matching GL_CALO_CALIB query"; break;
823        case -56:  message += " GLTABLES - No entries matching GL_TLE query"; break;
824        //              //      
825      case -100: message += " CALORIMETERLEVEL2 - No Level2 input file"; break;      case -100: message += " CALORIMETERLEVEL2 - No Level2 input file"; break;
826      case -101: message += " CALORIMETERLEVEL2 -  Cannot open Level2 file"; break;      case -101: message += " CALORIMETERLEVEL2 -  Cannot open Level2 file"; break;
# Line 901  int main(int numinp, char *inps[]){ Line 929  int main(int numinp, char *inps[]){
929    };    };
930    if ( processFile ){    if ( processFile ){
931      processFile->cd();      processFile->cd();
932        processFile->WriteStreamerInfo();
933      processFile->Close();      processFile->Close();
934    };    };
935    //    //

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.26

  ViewVC Help
Powered by ViewVC 1.1.23