/[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.4 by mocchiut, Thu Dec 18 12:58:37 2008 UTC revision 1.5 by mocchiut, Thu Dec 18 14:47:02 2008 UTC
# Line 1  Line 1 
1  //============================================================================  //============================================================================
2  // $Id: PamOffLineSW_Main.cpp,v 1.52 2008-09-12 14:03:55 messineo Exp $  // $Id: PamOffLineSW_Main.cpp,v 1.4 2008/12/18 12:58:37 mocchiut Exp $
3  // Description : Pamela Off-Line Software  // Description : Pamela Off-Line Software
4  //============================================================================  //============================================================================
5    
# Line 42  short int CRC_Cadre_Check(char dataVRL[] Line 42  short int CRC_Cadre_Check(char dataVRL[]
42    
43  //global variables  //global variables
44  bool simulated_data = false;  bool simulated_data = false;
45  bool do_vrl_check = false;  //bool do_vrl_check = false; //EMI
46    bool do_vrl_check = true; //EMI
47    
48  char*  db_host = "";  char*  db_host = "";
49  int        db_port = 0;  int        db_port = 0;
# Line 76  namespace PamOffLineSW Line 77  namespace PamOffLineSW
77  //      char *outDir = ".";  //      char *outDir = ".";
78          char *outDir = "";          char *outDir = "";
79    
80          char * nome_output="chewbacca";    //    char * nome_output="chewbacca"; //EMI
81            char * nome_output="L0PAM";//EMI
82          bool multiFile = 0;              bool multiFile = 0;    
83          unsigned long int step_pkt_number=0;    //    unsigned long int step_pkt_number=0; // EMI
84          unsigned long int step_pkt_obt=0;          unsigned long int step_pkt_number=3000;
85      //    unsigned long int step_pkt_obt=0; // EMI
86            unsigned long int step_pkt_obt=7200000; // EMI
87          LogUtil* mainLogUtil = NULL;          LogUtil* mainLogUtil = NULL;
88          TSQLServer* sqlServer = NULL;          TSQLServer* sqlServer = NULL;
89          unsigned long int max_pkt_number =   16777215;//biggest value before reset          unsigned long int max_pkt_number =   16777215;//biggest value before reset
90          unsigned long int max_pkt_obt    = 4294967295u;//biggest value before reset          unsigned long int max_pkt_obt    = 4294967295u;//biggest value before reset
91    
92          bool is_new_route = false;          //    bool is_new_route = false;      // EMI
93            bool is_new_route = true;       // EMI ??????????? VA BENE? SECONDO ME SI`
94          unsigned int download = 0;          unsigned int download = 0;
95          unsigned int orbit_number=0;          unsigned int orbit_number=0;
96          unsigned int mmm_number = 0;//session_number          unsigned int mmm_number = 0;//session_number
97          unsigned long int time_Offset=0;          unsigned long int time_Offset=0;
98          bool tryMerge = false;    //    bool tryMerge = false;
99            bool tryMerge = true;
100                                    
101          bool do_cont_check=true;//if do_cont_check is false do not use a DB ...          bool do_cont_check=true;//if do_cont_check is false do not use a DB ...
102    
# Line 178  void readOptions(int argc, char *argv[]) Line 184  void readOptions(int argc, char *argv[])
184          cout << "\t -session_number  Value of the session number. If 0 this is retrieved from the input file name.  [default = 0]\n";                          cout << "\t -session_number  Value of the session number. If 0 this is retrieved from the input file name.  [default = 0]\n";                
185          cout << "\t -time_Offset  Value of the timeOffset. If 0 this is retrieved using the orbital number.  [default = 0]\n";          cout << "\t -time_Offset  Value of the timeOffset. If 0 this is retrieved using the orbital number.  [default = 0]\n";
186          cout << "\t -tryMerge if you want to try to Merge ROOT files\n";          cout << "\t -tryMerge if you want to try to Merge ROOT files\n";
187            cout << "\t -dontMerge if you don not want to try to Merge ROOT files\n";
188          //marco_new_01          //marco_new_01
189          cout << "\t -single_connection if you want to open only one connection to DB.\n";          cout << "\t -single_connection if you want to open only one connection to DB.\n";
190          cout << "\t -tag if you want add the 'The owner of the file' - the tag lenght is 4 char\n";          cout << "\t -tag if you want add the 'The owner of the file' - the tag lenght is 4 char\n";
# Line 215  void readOptions(int argc, char *argv[]) Line 222  void readOptions(int argc, char *argv[])
222                          tryMerge = true;                          tryMerge = true;
223                  continue;                  continue;
224              }              }
225    
226              if (!strcmp(argv[i], "-dontMerge")) // EMI
227                {
228                            tryMerge = false;
229                    continue;
230                }
231                        
232            if (!strcmp(argv[i], "-time_Offset")){            if (!strcmp(argv[i], "-time_Offset")){
233                          if (++i >= argc){                          if (++i >= argc){
# Line 303  void readOptions(int argc, char *argv[]) Line 316  void readOptions(int argc, char *argv[])
316            continue;            continue;
317        }        }
318                
319          if (!strcmp(argv[i], "-no-vrl")) //EMI
320            {
321              do_vrl_check = false;
322          }
323        if (!strcmp(argv[i], "-vrl"))        if (!strcmp(argv[i], "-vrl"))
324        {        {
325            do_vrl_check = true;            do_vrl_check = true;
# Line 366  void readOptions(int argc, char *argv[]) Line 383  void readOptions(int argc, char *argv[])
383                   exit(1);                   exit(1);
384               }               }
385               DIR* tempdir;               DIR* tempdir;
386               if ((tempdir = opendir(argv[i])) != 0) {               if ((tempdir = opendir(gSystem->ExpandPathName(argv[i]))) != 0) { // EMI
387                   outDir = argv[i];                   outDir = argv[i];
388                   closedir(tempdir);                   closedir(tempdir);
389               } else {               } else {
# Line 647  void firstLog(){ Line 664  void firstLog(){
664          string msg = "Input file: " + (string)fni;          string msg = "Input file: " + (string)fni;
665          mainLogUtil->logAlways(msg);          mainLogUtil->logAlways(msg);
666    
667          msg = "Output directory for the generated root file(s): " + (string)outDir;          msg = "Output directory for the generated root file(s): " + (string)outDir;
668          mainLogUtil->logAlways(msg);              mainLogUtil->logAlways(msg);    
669            msg = "Output directory for the generated root file(s) expanded: " + (string)gSystem->ExpandPathName(outDir); // EMI
670            mainLogUtil->logAlways(msg);    //EMI
671    
672          msg = "Output root name for the generated root file(s): " + (string)nome_output;          msg = "Output root name for the generated root file(s): " + (string)nome_output;
673          mainLogUtil->logAlways(msg);              mainLogUtil->logAlways(msg);    

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

  ViewVC Help
Powered by ViewVC 1.1.23