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

Diff of /DarthVader/TrackerLevel2/src/TrkProcess.cpp

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

revision 1.11 by pam-fi, Mon Aug 20 16:07:16 2007 UTC revision 1.14 by pam-fi, Wed Mar 5 17:00:19 2008 UTC
# Line 36  TrkProcess::TrkProcess(){ Line 36  TrkProcess::TrkProcess(){
36            
37      ostatus = 0;      ostatus = 0;
38    
39      npar=0;      npar = 0;
40    
41        nskip = 0;
42    
43      TrkParams::SetTrackingMode();  //     TrkParams::SetTrackingMode();
44      TrkParams::SetPrecisionFactor();  //     TrkParams::SetPrecisionFactor();
45      TrkParams::SetStepMin();    //     TrkParams::SetStepMin();  
46        TrkParams::SetMiniDefault();
47      TrkParams::SetPFA();      TrkParams::SetPFA();
48  };  };
49                    
# Line 89  TrkProcess::TrkProcess(ULong64_t run, TF Line 92  TrkProcess::TrkProcess(ULong64_t run, TF
92            
93      npar=0;      npar=0;
94                    
95      TrkParams::SetTrackingMode();      nskip = 0;
96      TrkParams::SetPrecisionFactor();  
97      TrkParams::SetStepMin();    //     TrkParams::SetTrackingMode();
98    //     TrkParams::SetPrecisionFactor();
99    //     TrkParams::SetStepMin();  
100        TrkParams::SetMiniDefault();
101      TrkParams::SetPFA();      TrkParams::SetPFA();
102    
103  };  };
104  /**  /**
105   * Set processing variables according to input custom parameters   * Set processing variables according to input custom parameters
106   */       */    
107  void TrkProcess::HandleCustomPar(int ncustom, char *vcustom[]){  int TrkProcess::HandleCustomPar(int ncustom, char *vcustom[]){
108    
109      for (int i=0; i< ncustom; i++){      for (int i=0; i< ncustom; i++){
110    
# Line 157  void TrkProcess::HandleCustomPar(int ncu Line 163  void TrkProcess::HandleCustomPar(int ncu
163              continue;              continue;
164          }            }  
165          // -----------------------------------------------------//              // -----------------------------------------------------//    
166            if (!strcmp(vcustom[i], "-pfa")){
167                if (++i >= ncustom)throw -3;
168                TrkParams::SetPFA(atoi(vcustom[i]));
169                continue;
170            }  
171            // -----------------------------------------------------//    
172            if (!strcmp(vcustom[i], "-skip")){
173                if (++i >= ncustom)throw -3;
174                nskip = atoi(vcustom[i]);
175                continue;
176            }  
177            // -----------------------------------------------------//    
178          if ( atoi(vcustom[i]) < 0){          if ( atoi(vcustom[i]) < 0){
179              if (++i >= ncustom)throw -3;              if (++i >= ncustom)throw -3;
180              partype[npar]=-1*atoi(vcustom[i-1]);              partype[npar]=-1*atoi(vcustom[i-1]);
# Line 170  void TrkProcess::HandleCustomPar(int ncu Line 188  void TrkProcess::HandleCustomPar(int ncu
188              continue;              continue;
189          }          }
190          // -----------------------------------------------------//              // -----------------------------------------------------//    
191            if (!strcmp(vcustom[i], "--warning") || !strcmp(vcustom[i], "-w")){
192                TrkParams::SetWarningMode();
193                continue;
194            }
195            // -----------------------------------------------------//    
196            if (!strcmp(vcustom[i], "--help") || !strcmp(vcustom[i], "-h")){
197                PrintHelp();
198                return 1;
199            }
200            // -----------------------------------------------------//    
201          else if (!strcmp(vcustom[i], "--debug") || !strcmp(vcustom[i], "-d")){          else if (!strcmp(vcustom[i], "--debug") || !strcmp(vcustom[i], "-d")){
202              TrkParams::SetDebugMode();              TrkParams::SetDebugMode();
203              continue;              continue;
# Line 192  void TrkProcess::HandleCustomPar(int ncu Line 220  void TrkProcess::HandleCustomPar(int ncu
220    
221      ostatus = 0;      ostatus = 0;
222    
223        return 0;
224    
225  };  };
226  /**  /**
227   * \brief Process Level0 event   * \brief Process Level0 event
# Line 221  void TrkProcess::Dump(){ Line 251  void TrkProcess::Dump(){
251      cout << "   tracker-processing input-parameters   "<< endl;      cout << "   tracker-processing input-parameters   "<< endl;
252      cout << " |-------------------------------------| "<<endl;      cout << " |-------------------------------------| "<<endl;
253      cout << "   idRun           " << idrun << endl;      cout << "   idRun           " << idrun << endl;
254        cout << "                   (skip " << nskip <<" events)"<< endl;    
255      cout << "   get level1      " << get1 << endl;      cout << "   get level1      " << get1 << endl;
256      cout << "   full level1     " << full1 << endl;      cout << "   full level1     " << full1 << endl;
257      cout << "   get level2      " << get2 << endl;      cout << "   get level2      " << get2 << endl;
# Line 242  void TrkProcess::Dump(){ Line 273  void TrkProcess::Dump(){
273  //     cout << " debug mode      debug   " << dbg_mode.debug << endl << endl;  //     cout << " debug mode      debug   " << dbg_mode.debug << endl << endl;
274            
275  }  }
276    
277    void TrkProcess::PrintHelp(){
278    
279        printf( "\n\n +TRK [ options ] \n \n");
280    //    printf( "\n --version          : Print tracker software version and exit ");      
281        printf( "Options:");
282        printf( "\n --help, -h                     : Print this help and exit ");  
283    //    printf( "\n -idRun RUN         : ID number of the run to be processed (for reprocessing RUN=0) \n");
284    //    printf( "\n -outDir OUTDIR     : Path where to put the LEVEL2 output                    [default ./ ] ");
285    //    printf( "\n -processFolder DIR   : Directory (relative to OUTDIR) for other output files  [default TrackerFolder/ ] ");
286    //    printf( "\n -processFile FILE  : Name of the LEVEL2 output file                         [default RUN.Level2.root]");
287    //    printf( "\n -processFile1 FILE   : Name of the LEVEL1 output file                         [default RUN.Level1.rz]");
288    //    printf( "\n -frame1 FRAME        : type of output for LEVEL1, root/hbook                  [default hbook ] ");
289    //    printf( "\n -frame2 FRAME        : type of output for LEVEL2, root/hbook                  [default root  ] ");            
290        printf( "\n --get1, --get-level1           : get LEVEL1 output (store only cluster associated to tracks) [default (no LEVEL1 output) ]  ");
291        printf( "\n --get1-full, --get-level1-full : get LEVEL1 output (store all clusters)                      [default (no LEVEL1 output) ]  ");
292        printf( "\n --dontget2, --dontget-level2   : do not get LEVEL2 output                                    [default (get LEVEL2 output)]");
293        printf( "\n --geth,, --get-hough           : get Hough-transform output                                  [default (no Hough-t. output) ]  ");
294        printf( "\n -pfa PFAID                     : type of output for LEVEL2, root/hbook                       [default 14 (COG4)  ] ");          
295        printf( "\n -N PATH                        : load parameter of type N=1,2... from PATH                   [default (from DB)  ] ");  
296        printf( "\n --verbose, -v                  : verbose mode ");      
297        printf( "\n --debug, -d                    : debug mode ");
298        printf( "\n --warning, -w                  : warning mode ");      
299        printf( "\n -skip NEV                      : skip first NEV events from each run ");        
300    //    printf( "\n --standalone, -s   : standalone mode (without RunInfo) ... but it might not work \n");        
301    //    printf( "\n -host HOST         : Name for the host                                      [default mysql://localhost/pamelaprod ]");
302    //    printf( "\n -user USER         : Username for the DB                                    [default anonymous] ");
303    //    printf( "\n -psw  PSW          : Password for the DB                                    [default (none)]\n \n \n");
304        
305    
306    }

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

  ViewVC Help
Powered by ViewVC 1.1.23