/[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.13 by pam-fi, Tue Nov 27 11:43:50 2007 UTC revision 1.18 by pam-ts, Mon Jun 23 08:34:18 2014 UTC
# Line 16  TrkProcess::TrkProcess(){ Line 16  TrkProcess::TrkProcess(){
16      full1 = 0;      full1 = 0;
17      geth  = 0;      geth  = 0;
18      get2  = 1;      get2  = 1;
19        gete  = 1;
20        gete_ncheck = 10;
21        getn  = 1;
22        extAlgID = 202;
23      standalone = false;      standalone = false;
24      frame2 = "root";      frame2 = "root";
25      frame1 = "root";      frame1 = "root";
26      frameh = "root";      frameh = "root";
27        framee = "root";
28      outdir =  gSystem->WorkingDirectory();      outdir =  gSystem->WorkingDirectory();
29      pfolder = "/TrackerFolder";      pfolder = "/TrackerFolder";
30      if      (!frame2.CompareTo("root", TString::kIgnoreCase))  ifroot2 = true;                if      (!frame2.CompareTo("root", TString::kIgnoreCase))  ifroot2 = true;          
# Line 36  TrkProcess::TrkProcess(){ Line 41  TrkProcess::TrkProcess(){
41            
42      ostatus = 0;      ostatus = 0;
43    
44      npar=0;      npar = 0;
45    
46        nskip = 0;
47    
48        watch = false;
49    
50  //     TrkParams::SetTrackingMode();  //     TrkParams::SetTrackingMode();
51  //     TrkParams::SetPrecisionFactor();  //     TrkParams::SetPrecisionFactor();
# Line 60  TrkProcess::TrkProcess(ULong64_t run, TF Line 69  TrkProcess::TrkProcess(ULong64_t run, TF
69      full1 = 0;      full1 = 0;
70      get2 = 1;      get2 = 1;
71      geth = 0;      geth = 0;
72        gete = 1;
73        gete_ncheck = 10;
74        getn = 1;
75        extAlgID = 202;
76      standalone = false;      standalone = false;
77      frame2 = "root";      frame2 = "root";
78      frame1 = "root";      frame1 = "root";
79      frameh = "root";      frameh = "root";
80        framee = "root";
81      pfolder = "/TrackerFolder";      pfolder = "/TrackerFolder";
82      file1 = "";      file1 = "";
83      if(f2->IsOpen()){      if(f2->IsOpen()){
# Line 90  TrkProcess::TrkProcess(ULong64_t run, TF Line 104  TrkProcess::TrkProcess(ULong64_t run, TF
104            
105      npar=0;      npar=0;
106                    
107        nskip = 0;
108    
109        watch = false;
110    
111  //     TrkParams::SetTrackingMode();  //     TrkParams::SetTrackingMode();
112  //     TrkParams::SetPrecisionFactor();  //     TrkParams::SetPrecisionFactor();
113  //     TrkParams::SetStepMin();    //     TrkParams::SetStepMin();  
# Line 104  int TrkProcess::HandleCustomPar(int ncus Line 122  int TrkProcess::HandleCustomPar(int ncus
122    
123      for (int i=0; i< ncustom; i++){      for (int i=0; i< ncustom; i++){
124    
125          cout << "Handling Parameter " << i+1  << " of " << ncustom << ": "  << vcustom[i] << endl;
126    
127            // -----------------------------------------------------//
128            if (!strcmp(vcustom[i], "--simu")){
129                cout << "Setting DarthVader to use Simulated Data\n";
130                TrkParams::SetSimuFlag(kTRUE);
131                continue;
132            }  
133          // -----------------------------------------------------//          // -----------------------------------------------------//
134          if (!strcmp(vcustom[i], "-processFolder")){          if (!strcmp(vcustom[i], "-processFolder")){
135              if (++i >= ncustom) throw -3;              if (++i >= ncustom) throw -3;
# Line 128  int TrkProcess::HandleCustomPar(int ncus Line 154  int TrkProcess::HandleCustomPar(int ncus
154              continue;              continue;
155          }            }  
156          // -----------------------------------------------------//              // -----------------------------------------------------//    
157          if (!strcmp(vcustom[i], "--dontget2") ||!strcmp(vcustom[i], "--dontget-level2") ){  //      if (!strcmp(vcustom[i], "--dontget2") ||!strcmp(vcustom[i], "--dontget-level2") ){
158              get2 = 0;  //          get2 = 0;
159    //          gete = 0;
160    //          getn = 0;
161    //          continue;
162    //      }  
163            // -----------------------------------------------------//    
164            if (!strcmp(vcustom[i], "--dontgete") ||!strcmp(vcustom[i], "--dontget-exttrack") ){
165                gete = 0;
166                continue;
167            }  
168            // -----------------------------------------------------//    
169            if (!strcmp(vcustom[i], "-extalg")){
170                if (++i >= ncustom) throw -3;
171                gete = 1;      
172                get2 = 1;      
173                extAlgID = atoi(vcustom[i]);
174                continue;
175            }  
176            // -----------------------------------------------------//    
177            if (!strcmp(vcustom[i], "-extalg-check")){
178                if (++i >= ncustom) throw -3;
179                gete_ncheck = atoi(vcustom[i]);
180                continue;
181            }  
182            // -----------------------------------------------------//    
183            if (!strcmp(vcustom[i], "--dontgetn") ||!strcmp(vcustom[i], "--dontget-nuclei") ){
184                getn = 0;
185              continue;              continue;
186          }            }  
187          // -----------------------------------------------------//              // -----------------------------------------------------//    
# Line 144  int TrkProcess::HandleCustomPar(int ncus Line 196  int TrkProcess::HandleCustomPar(int ncus
196              file1 = vcustom[i];              file1 = vcustom[i];
197              continue;              continue;
198          }            }  
199    //      // -----------------------------------------------------//    
200    //      if (!strcmp(vcustom[i], "-frame1")){
201    //          if (++i >= ncustom)throw -3;
202    //          get1 = 1;
203    //          frame1 = vcustom[i];                                                
204    //          continue;
205    //      }  
206    //      // -----------------------------------------------------//    
207    //      if (!strcmp(vcustom[i], "-frame2")){
208    //          if (++i >= ncustom)throw -3;
209    //          get2 = 1;
210    //          frame2 = vcustom[i];
211    //          continue;
212    //      }  
213    //      // -----------------------------------------------------//    
214    //      if (!strcmp(vcustom[i], "-framee")){
215    //          if (++i >= ncustom)throw -3;
216    //          gete = 1;
217    //          framee = vcustom[i];
218    //          continue;
219    //      }  
220          // -----------------------------------------------------//              // -----------------------------------------------------//    
221          if (!strcmp(vcustom[i], "-frame1")){          if (!strcmp(vcustom[i], "-pfa")){
             if (++i >= ncustom)throw -3;  
             get1 = 1;  
             frame1 = vcustom[i];                                                  
             continue;  
         }    
         // -----------------------------------------------------//      
         if (!strcmp(vcustom[i], "-frame2")){  
222              if (++i >= ncustom)throw -3;              if (++i >= ncustom)throw -3;
223              get2 = 1;              TrkParams::SetPFA(atoi(vcustom[i]));
             frame2 = vcustom[i];  
224              continue;              continue;
225          }            }  
226          // -----------------------------------------------------//              // -----------------------------------------------------//    
227          if (!strcmp(vcustom[i], "-pfa")){          if (!strcmp(vcustom[i], "-skip")){
228              if (++i >= ncustom)throw -3;              if (++i >= ncustom)throw -3;
229              TrkParams::SetPFA(atoi(vcustom[i]));              nskip = atoi(vcustom[i]);
230              continue;              continue;
231          }            }  
232          // -----------------------------------------------------//              // -----------------------------------------------------//    
# Line 188  int TrkProcess::HandleCustomPar(int ncus Line 253  int TrkProcess::HandleCustomPar(int ncus
253              return 1;              return 1;
254          }          }
255          // -----------------------------------------------------//              // -----------------------------------------------------//    
256            if (!strcmp(vcustom[i], "--watch") ){
257                watch = true;
258                continue;
259            }
260            // -----------------------------------------------------//    
261          else if (!strcmp(vcustom[i], "--debug") || !strcmp(vcustom[i], "-d")){          else if (!strcmp(vcustom[i], "--debug") || !strcmp(vcustom[i], "-d")){
262              TrkParams::SetDebugMode();              TrkParams::SetDebugMode();
263              continue;              continue;
# Line 206  int TrkProcess::HandleCustomPar(int ncus Line 276  int TrkProcess::HandleCustomPar(int ncus
276      else if (!frameh.CompareTo("hbook", TString::kIgnoreCase)) ifrooth =false;      else if (!frameh.CompareTo("hbook", TString::kIgnoreCase)) ifrooth =false;
277      else    throw -201;      else    throw -201;
278    
279        if      (!framee.CompareTo("root", TString::kIgnoreCase))  ifroote = true;          
280        else if (!framee.CompareTo("hbook", TString::kIgnoreCase)) ifroote =false;
281        else    throw -201;
282    
283      if(get1 && !get2)full1=true;      if(get1 && !get2)full1=true;
284    
285      ostatus = 0;      ostatus = 0;
# Line 231  void TrkProcess::ProcessEvent(TrkLevel0 Line 305  void TrkProcess::ProcessEvent(TrkLevel0
305      //      //
306      if(get2) analysisflight_();      if(get2) analysisflight_();
307      //      //
308    
309      ostatus = F77err;      ostatus = F77err;
310            
311  };  };
# Line 240  void TrkProcess::Dump(){ Line 315  void TrkProcess::Dump(){
315      cout << " |-------------------------------------| "<<endl;      cout << " |-------------------------------------| "<<endl;
316      cout << "   tracker-processing input-parameters   "<< endl;      cout << "   tracker-processing input-parameters   "<< endl;
317      cout << " |-------------------------------------| "<<endl;      cout << " |-------------------------------------| "<<endl;
318      cout << "   idRun           " << idrun << endl;      cout << "   idRun            " << idrun << endl;
319      cout << "   get level1      " << get1 << endl;      cout << "                    (skip " << nskip <<" events)"<< endl;    
320      cout << "   full level1     " << full1 << endl;      cout << "   get level1       " << get1 << endl;
321      cout << "   get level2      " << get2 << endl;      cout << "   full level1      " << full1 << endl;
322      cout << "   get hough       " << geth << endl;      cout << "   get level2       " << get2 << endl;
323  //    cout << " frame1          " << frame1 << endl;      cout << "   get hough        " << geth << endl;
324  //    cout << " frame2          " << frame2 << endl;      cout << "   get ext.tracking " << gete << endl;
325  //    cout << " frameh          " << frame2 << endl;      if(gete)
326  //    cout << " file1           " << file1 << endl;      cout << "   ext.tracking alg " << extAlgID << endl;
327      cout << "   output file     " << file2 << endl;      cout << "   get nuclei       " << getn << endl;
328  //    cout << " outdir          " << outdir << endl;  //    cout << " frame1           " << frame1 << endl;
329  //    cout << " process folder  " << pfolder << endl;  //    cout << " frame2           " << frame2 << endl;
330  //    cout << " standalone mode " << standalone << endl;  //    cout << " frameh           " << frame2 << endl;
331    //    cout << " file1            " << file1 << endl;
332        cout << "   output file      " << file2 << endl;
333    //    cout << " outdir           " << outdir << endl;
334    //    cout << " process folder   " << pfolder << endl;
335    //    cout << " standalone mode  " << standalone << endl;
336      for(int i=0; i<npar; i++)      for(int i=0; i<npar; i++)
337          cout << "   force loading parameters of type "<<partype[i]<<" from <--- "<<parpath[i]<<endl;          cout << "   force loading parameters of type "<<partype[i]<<" from <--- "<<parpath[i]<<endl;
338      cout<<endl;      cout<<endl;
# Line 279  void TrkProcess::PrintHelp(){ Line 359  void TrkProcess::PrintHelp(){
359      printf( "\n --get1, --get-level1           : get LEVEL1 output (store only cluster associated to tracks) [default (no LEVEL1 output) ]  ");      printf( "\n --get1, --get-level1           : get LEVEL1 output (store only cluster associated to tracks) [default (no LEVEL1 output) ]  ");
360      printf( "\n --get1-full, --get-level1-full : get LEVEL1 output (store all clusters)                      [default (no LEVEL1 output) ]  ");      printf( "\n --get1-full, --get-level1-full : get LEVEL1 output (store all clusters)                      [default (no LEVEL1 output) ]  ");
361      printf( "\n --dontget2, --dontget-level2   : do not get LEVEL2 output                                    [default (get LEVEL2 output)]");      printf( "\n --dontget2, --dontget-level2   : do not get LEVEL2 output                                    [default (get LEVEL2 output)]");
362        printf( "\n --dontgete, --dontget-exttrack : do not get ext.tracking output                              [default (ext.algorythm 202)]");
363        printf( "\n --dontgetn, --dontget-nuclei   : do not get nuclei cleaned tracks                            [default (get nuclei output)]");
364        printf( "\n --extalg ID                    : apply ext.tracking algorythm n.ID                           [default (ID=202) ]  ");
365      printf( "\n --geth,, --get-hough           : get Hough-transform output                                  [default (no Hough-t. output) ]  ");      printf( "\n --geth,, --get-hough           : get Hough-transform output                                  [default (no Hough-t. output) ]  ");
366      printf( "\n -pfa PFAID                     : type of output for LEVEL2, root/hbook                       [default 14 (COG4)  ] ");                printf( "\n -pfa PFAID                     : type of output for LEVEL2, root/hbook                       [default 14 (COG4)  ] ");          
367      printf( "\n -N PATH                        : load parameter of type N=1,2... from PATH                   [default (from DB)  ] ");        printf( "\n -N PATH                        : load parameter of type N=1,2... from PATH                   [default (from DB)  ] ");  
368      printf( "\n --verbose, -v                  : verbose mode ");            printf( "\n --verbose, -v                  : verbose mode ");      
369      printf( "\n --debug, -d                    : debug mode ");      printf( "\n --debug, -d                    : debug mode ");
370      printf( "\n --warning, -w                  : warning mode ");            printf( "\n --warning, -w                  : warning mode ");      
371        printf( "\n -skip NEV                      : skip first NEV events from each run ");        
372  //    printf( "\n --standalone, -s   : standalone mode (without RunInfo) ... but it might not work \n");          //    printf( "\n --standalone, -s   : standalone mode (without RunInfo) ... but it might not work \n");        
373  //    printf( "\n -host HOST         : Name for the host                                      [default mysql://localhost/pamelaprod ]");  //    printf( "\n -host HOST         : Name for the host                                      [default mysql://localhost/pamelaprod ]");
374  //    printf( "\n -user USER         : Username for the DB                                    [default anonymous] ");  //    printf( "\n -user USER         : Username for the DB                                    [default anonymous] ");

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.23