--- DarthVader/TrackerLevel2/src/TrkProcess.cpp 2006/09/28 14:04:39 1.5 +++ DarthVader/TrackerLevel2/src/TrkProcess.cpp 2006/10/26 16:22:37 1.6 @@ -11,14 +11,14 @@ TrkProcess::TrkProcess(){ idrun = 0; -// DEBUG = false; -// VERBOSE = false; dbg_mode.SetNone(); get1 = 0; + geth = 0; get2 = 1; standalone = false; frame2 = "root"; - frame1 = "hbook"; + frame1 = "root"; + frameh = "root"; outdir = gSystem->WorkingDirectory(); pfolder = "/TrackerFolder"; if (!frame2.CompareTo("root", TString::kIgnoreCase)) ifroot2 = true; @@ -27,6 +27,9 @@ if (!frame1.CompareTo("root", TString::kIgnoreCase)) ifroot1 = true; else if (!frame1.CompareTo("hbook", TString::kIgnoreCase)) ifroot1 = false; + if (!frameh.CompareTo("root", TString::kIgnoreCase)) ifrooth = true; + else if (!frameh.CompareTo("hbook", TString::kIgnoreCase)) ifrooth = false; + file1 = ""; file2 = ""; @@ -46,22 +49,22 @@ dbg_mode.SetWarning(); get1 = 0; get2 = 1; + geth = 0; standalone = false; frame2 = "root"; frame1 = "root"; -// ifroot1 = false; -// ifroot2 = true; - pfolder = "/TrackerFolder"; - file1 = ""; + frameh = "root"; + pfolder = "/TrackerFolder"; + file1 = ""; if(f2->IsOpen()){ - file2 = f2->GetPath(); - outdir = gSystem->DirName(gSystem->DirName(file2)); + file2 = f2->GetPath(); + outdir = gSystem->DirName(gSystem->DirName(file2)); // check if the indicated output directory exists - FileStat_t t; - if( gSystem->GetPathInfo(outdir.Data(),t) )throw -12; + FileStat_t t; + if( gSystem->GetPathInfo(outdir.Data(),t) )throw -12; }else{ - file2 = ""; - outdir = gSystem->WorkingDirectory(); + file2 = ""; + outdir = gSystem->WorkingDirectory(); }; if (!frame2.CompareTo("root", TString::kIgnoreCase)) ifroot2 = true; @@ -70,6 +73,9 @@ if (!frame1.CompareTo("root", TString::kIgnoreCase)) ifroot1 = true; else if (!frame1.CompareTo("hbook", TString::kIgnoreCase)) ifroot1 =false; + if (!frameh.CompareTo("root", TString::kIgnoreCase)) ifrooth = true; + else if (!frameh.CompareTo("hbook", TString::kIgnoreCase)) ifrooth =false; + ostatus = 0; }; @@ -87,12 +93,17 @@ continue; } // -----------------------------------------------------// - if (!strcmp(vcustom[i], "--get1")){ + if (!strcmp(vcustom[i], "--get1") || !strcmp(vcustom[i], "--get-level1") ){ get1 = 1; continue; } // -----------------------------------------------------// - if (!strcmp(vcustom[i], "--dontget2")){ + if (!strcmp(vcustom[i], "--geth") || !strcmp(vcustom[i], "--get-hough") ){ + geth = 1; + continue; + } + // -----------------------------------------------------// + if (!strcmp(vcustom[i], "--dontget2") ||!strcmp(vcustom[i], "--dontget-level2") ){ get2 = 0; continue; } @@ -144,28 +155,9 @@ else if (!frame1.CompareTo("hbook", TString::kIgnoreCase)) ifroot1 =false; else throw -201; -// if(get1){ -// -// TString filety; -// if ( ifroot1) filety=".root"; -// else if (!ifroot1) filety=".rz"; -// else throw -200; -// -// TString base = file2; -// if(base.Contains(".Level2.root"))base = base(0,base.Index(".Level2.root")); -// else base = base(0,base.Index(".root")); -// base = gSystem->BaseName(base); -// file1 = outdir + "/"+ gSystem->BaseName(pfolder) + "/" + base +".Level1"+filety; -// // cout << "Requested Level1 output. "<< endl << "Level1 File: "<< file1 << endl; -// TString path = gSystem->DirName(file1); -// FileStat_t t; -// // check if processFolder directory exists, and possibly create it -// if( gSystem->GetPathInfo(path.Data(),t) ) { -// if( gSystem->MakeDirectory(path.Data()) == -1)throw -13; -// }; -// // if it does, open/create teh putput file -// -// }; + if (!frameh.CompareTo("root", TString::kIgnoreCase)) ifrooth = true; + else if (!frameh.CompareTo("hbook", TString::kIgnoreCase)) ifrooth =false; + else throw -201; ostatus = 0; @@ -200,10 +192,12 @@ cout <