/[PAMELA software]/chewbacca/PamOffLineSW/PamOffLineSW_Main.cpp
ViewVC logotype

Diff of /chewbacca/PamOffLineSW/PamOffLineSW_Main.cpp

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

revision 1.5 by mocchiut, Thu Dec 18 14:47:02 2008 UTC revision 1.7 by pam-fi, Wed Aug 5 18:48:43 2009 UTC
# Line 1  Line 1 
1  //============================================================================  //============================================================================
2  // $Id: PamOffLineSW_Main.cpp,v 1.4 2008/12/18 12:58:37 mocchiut Exp $  // $Id: PamOffLineSW_Main.cpp,v 1.6 2009-02-01 16:38:26 mocchiut Exp $
3  // Description : Pamela Off-Line Software  // Description : Pamela Off-Line Software
4  //============================================================================  //============================================================================
5    
# Line 45  bool simulated_data = false; Line 45  bool simulated_data = false;
45  //bool do_vrl_check = false; //EMI  //bool do_vrl_check = false; //EMI
46  bool do_vrl_check = true; //EMI  bool do_vrl_check = true; //EMI
47    
48  char*  db_host = "";  const char*  db_host = "";
49  int        db_port = 0;  int        db_port = 0;
50  char*  db_name = "";  const char*  db_name = "";
51  char conn[100]="";  char conn[100]="";
52    
53  LogUtil::logLevel loglevel=LogUtil::LOGERROR;  LogUtil::logLevel loglevel=LogUtil::LOGERROR;
54  char* logfilename = "chewbacca.log";  const char* logfilename = "chewbacca.log";
55  //current route  //current route
56  int route = 999;  int route = 999;
57  //previous route  //previous route
# Line 63  long int iNumGoodCadres=0; //total numbe Line 63  long int iNumGoodCadres=0; //total numbe
63  // global variables used in all the project  // global variables used in all the project
64  namespace PamOffLineSW  namespace PamOffLineSW
65  {        {      
66          char*  db_user = "";          const char*  db_user = "";
67          char*  db_pwd  = "";          const char*  db_pwd  = "";
68          char* connection = NULL;                  char* connection = NULL;        
69          //marco_new_01          //marco_new_01
70          bool single_connection=false;            bool single_connection=false;  
# Line 75  namespace PamOffLineSW Line 75  namespace PamOffLineSW
75          char* fni; //path completo          char* fni; //path completo
76          short compression = 3;          short compression = 3;
77  //      char *outDir = ".";  //      char *outDir = ".";
78          char *outDir = "";          const char *outDir = "";
79    
80    //    char * nome_output="chewbacca"; //EMI    //    char * nome_output="chewbacca"; //EMI
81          char * nome_output="L0PAM";//EMI          const char * nome_output="L0PAM";//EMI
82          bool multiFile = 0;              bool multiFile = 0;    
83    //    unsigned long int step_pkt_number=0; // EMI    //    unsigned long int step_pkt_number=0; // EMI
84          unsigned long int step_pkt_number=3000;          unsigned long int step_pkt_number=3000;
# Line 166  void readOptions(int argc, char *argv[]) Line 166  void readOptions(int argc, char *argv[])
166          cout << "\t  (-help | --help | -h) print this help and exit \n";          cout << "\t  (-help | --help | -h) print this help and exit \n";
167          cout << "\t -simu       if the input file contains simulated data instead of real data\n";          cout << "\t -simu       if the input file contains simulated data instead of real data\n";
168          cout << "\t -vrl    if you want to perform the vrl check\n";          cout << "\t -vrl    if you want to perform the vrl check\n";
169            cout << "\t -no-vrl    if you DO NOT want to perform the vrl check\n";
170            cout << "\t -gpamela    gpamela data as input\n";
171          cout << "\t -filelog     set the log filename. [default: chewbacca.log]\n";          cout << "\t -filelog     set the log filename. [default: chewbacca.log]\n";
172          cout << "\t -loglevel     set the log level. Values: [0,3] (error,warning,info,all) [default:0]\n";          cout << "\t -loglevel     set the log level. Values: [0,3] (error,warning,info,all) [default:0]\n";
173          cout << "\t -c      set the compression level for the generated ROOT file(s). Values: [0,9] [default = 3]\n";          cout << "\t -c      set the compression level for the generated ROOT file(s). Values: [0,9] [default = 3]\n";
# Line 207  void readOptions(int argc, char *argv[]) Line 209  void readOptions(int argc, char *argv[])
209          exit(1);          exit(1);
210      }      }
211    
212      //input file
213      fni= argv[1];
214      
215    for (int i = 2; i < argc; i++)    for (int i = 2; i < argc; i++)
216    {          {      
217          //marco_new_01          //marco_new_01
# Line 315  void readOptions(int argc, char *argv[]) Line 320  void readOptions(int argc, char *argv[])
320            simulated_data = true;            simulated_data = true;
321            continue;            continue;
322        }        }
323    
324          if (!strcmp(argv[i], "-gpamela"))
325          {
326              simulated_data = true;
327              do_vrl_check = false;
328              nome_output = (char *)gSystem->BaseName(fni);
329              tryMerge = false;
330              continue;
331          }
332                
333        if (!strcmp(argv[i], "-no-vrl")) //EMI        if (!strcmp(argv[i], "-no-vrl")) //EMI
334          {          {
# Line 523  void readOptions(int argc, char *argv[]) Line 537  void readOptions(int argc, char *argv[])
537         //       if (!strcmp(argv[i], "-multi")){multiFile = 1; cout<<"debug: multi= "<<multiFile<<endl;}                 //       if (!strcmp(argv[i], "-multi")){multiFile = 1; cout<<"debug: multi= "<<multiFile<<endl;}        
538     }     }
539        
   //input file  
   fni= argv[1];  
     
540    //TODO: maybe if simulated data I don't need nothig so I can skip the following lines    //TODO: maybe if simulated data I don't need nothig so I can skip the following lines
541    // and use instead something similar to:    // and use instead something similar to:
542    //if(simulated data){orbit_number=99999; mmm_number=999; download=999; }    if (simulated_data) {orbit_number=99999; mmm_number=999; download=999; }
543        
544    //I need the following lines only to retrieve orbit_number and mmm_number (session_number)from the filename    //I need the following lines only to retrieve orbit_number and mmm_number (session_number)from the filename
545    if((!orbit_number)||(!mmm_number))    if((!orbit_number)||(!mmm_number))

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.23