Changeset 6466
- Timestamp:
- 02/14/05 19:29:41 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r6464 r6466 27 27 - added some more information to '--help' output 28 28 - replaced MSequences by MDataSet 29 - implemented new debugging options (maybe not perfect yet) 30 --print-files and --print-found 29 31 30 32 * mjobs/MJCut.[h,cc]: … … 32 34 - write MEnergyEst 33 35 - recalculate MHillasSrc 36 - made sure both MWriteRootFile have different names 37 - don't use "same" option if no off-data 34 38 35 39 * mjobs/MSequences.[h,cc]: … … 60 64 - the same for the calibration factor - with the same argument 61 65 - adapted to change in MWriteRootFile 66 - use MReadMarsFile for Monte Carlo flag set 62 67 63 68 * mhist/MHCamera.cc: … … 92 97 - added a pattern independant trigger algorithm 93 98 94 * mjobs/MJCut.cc: 95 - made sure both MWriteRootFile have different names 96 - don't use "same" option if no off-data 99 * mbase/MDirIter.cc: 100 - implemented option 'dbg' in Print() 101 102 * mjobs/MJCalib.h: 103 - added a getter for data-flag (should be renamed 104 to 'datatype' soon) 97 105 98 106 -
trunk/MagicSoft/Mars/callisto.cc
r6453 r6466 76 76 gLog << " --print-seq Print Sequence information" << endl; 77 77 gLog << " --print-files Print Files taken from Sequence" << endl; 78 gLog << " --print- only Do not execute anything except print" << endl;78 gLog << " --print-found Print Files found from Sequence" << endl; 79 79 gLog << " --use-test Apply calibration constants to same calibration" << endl; 80 80 gLog << " file (for testing, calibration mode only)" << endl; … … 103 103 } 104 104 105 static void PrintFiles(const MSequence &seq, const TString &kInpathD, Bool_t raw, Bool_t all) 106 { 107 const char *prep = all ? "Found" : "Scheduled"; 108 109 MDirIter Next1, Next2, Next3; 110 seq.SetupPedRuns(Next1, kInpathD, "P", raw); 111 seq.SetupCalRuns(Next2, kInpathD, "C", raw); 112 seq.SetupDatRuns(Next3, kInpathD, "D", raw); 113 114 gLog << all; 115 gLog.Separator(Form("%s Pedestal Files", prep)); 116 Next1.Print(all?"all":""); 117 gLog << endl; 118 gLog.Separator(Form("%s Calibration Files", prep)); 119 Next2.Print(all?"all":""); 120 gLog << endl; 121 gLog.Separator(Form("%s Data Files", prep)); 122 Next3.Print(all?"all":""); 123 gLog << endl; 124 } 125 105 126 int main(int argc, char **argv) 106 127 { … … 126 147 127 148 const Bool_t kPrintSeq = arg.HasOnlyAndRemove("--print-seq"); 128 //const Bool_t kPrintFiles = arg.HasOnlyAndRemove("--print-files");129 //const Bool_t kPrintOnly = arg.HasOnlyAndRemove("--print-only");149 const Bool_t kPrintFiles = arg.HasOnlyAndRemove("--print-files"); 150 const Bool_t kPrintFound = arg.HasOnlyAndRemove("--print-found"); 130 151 const Bool_t kUseTest = arg.HasOnlyAndRemove("--use-test"); 131 152 const Bool_t kDebugEnv = arg.HasOnlyAndRemove("--debug-env"); … … 236 257 return -1; 237 258 } 259 260 // 261 // Process print options 262 // 263 if (kPrintFiles) 264 PrintFiles(seq, kInpathD, kDataType==MJCalib::kIsUseRawData, kFALSE); 265 if (kPrintFound) 266 PrintFiles(seq, kInpathD, kDataType==MJCalib::kIsUseRawData, kTRUE); 238 267 /* 239 //240 // Process print options241 //242 if (kPrintFiles)243 {244 MDirIter Next1, Next2, Next3;245 seq.SetupPedRuns(Next1, kInpathD);246 seq.SetupCalRuns(Next2, kInpathD);247 seq.SetupDatRuns(Next3, kInpathD);248 249 gLog << all;250 gLog.Separator("Pedestal Files");251 Next1.Print("all");252 gLog << endl;253 gLog.Separator("Calibration Files");254 Next2.Print("all");255 gLog << endl;256 gLog.Separator("Data Files");257 Next3.Print("all");258 gLog << endl;259 }260 261 268 // 262 269 // Check for existance of all files -
trunk/MagicSoft/Mars/mbase/MDirIter.cc
r5307 r6466 351 351 { 352 352 TString s(o); 353 if (s.Contains("dbg", TString::kIgnoreCase)) 354 fList.Print(); 355 353 356 if (!s.Contains("all", TString::kIgnoreCase)) 354 357 { -
trunk/MagicSoft/Mars/mjobs/MJCalib.h
r6282 r6466 31 31 void SetInput(MRunIter *iter) { fRuns = iter; } 32 32 33 Byte_t GetDataFlag() const { return fDataFlag; } 34 33 35 Bool_t IsUseRawData() const { return fDataFlag==kIsUseRawData; } 34 36 Bool_t IsUseRootData() const { return fDataFlag==kIsUseRootData; } -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r6459 r6466 352 352 readreal.AddTree("Currents"); 353 353 354 //MReadMarsFile read("Events"); 355 //read.DisableAutoScheme(); 354 MReadMarsFile readmc("Events"); 355 readmc.DisableAutoScheme(); 356 356 357 MRawFileRead rawread(NULL); 357 if (IsUseRawData()) 358 359 switch (GetDataFlag()) 360 { 361 case kIsUseRawData: 358 362 rawread.AddFiles(fSequence.IsValid() ? iter : *fRuns); 359 else 363 break; 364 case kIsUseMC: 365 readmc.AddFiles(fSequence.IsValid() ? iter : *fRuns); 366 break; 367 case kIsUseRootData: 360 368 readreal.AddFiles(fSequence.IsValid() ? iter : *fRuns); 369 break; 370 } 361 371 362 372 MPointingPosInterpolate pextr; … … 672 682 673 683 // Now setup main tasklist 674 tlist.AddToList(IsUseRawData() ? (MTask*)&rawread : (MTask*)&readreal); 684 switch (GetDataFlag()) 685 { 686 case kIsUseRawData: 687 tlist.AddToList(&rawread); 688 break; 689 case kIsUseMC: 690 tlist.AddToList(&readmc); 691 break; 692 case kIsUseRootData: 693 tlist.AddToList(&readreal); 694 break; 695 } 696 //tlist.AddToList(IsUseRawData() ? (MTask*)&rawread : (MTask*)&readreal); 675 697 if (IsUseRootData()) 676 698 tlist2.AddToList(&pextr); -
trunk/MagicSoft/Mars/star.cc
r6453 r6466 64 64 gLog << " --print-seq Print Sequence information" << endl; 65 65 gLog << " --print-files Print Files taken from Sequence" << endl; 66 gLog << " --print- only Do not excute anything except print" << endl;66 gLog << " --print-found Print Files found from Sequence" << endl; 67 67 gLog << " --config=star.rc Resource file [default=star.rc]" << endl; 68 68 gLog << endl; … … 71 71 } 72 72 73 static void PrintFiles(const MSequence &seq, const TString &kInpathD, Bool_t allopt) 74 { 75 const char *prep = allopt ? "Found" : "Scheduled"; 76 77 MDirIter Next; 78 seq.SetupDatRuns(Next, kInpathD, "Y"); 79 80 gLog << all; 81 gLog.Separator(Form("%s Data Files", prep)); 82 Next.Print(allopt?"all":""); 83 gLog << endl; 84 } 85 73 86 int main(int argc, char **argv) 74 87 { … … 94 107 95 108 const Bool_t kPrintSeq = arg.HasOnlyAndRemove("--print-seq"); 96 //const Bool_t kPrintFiles = arg.HasOnlyAndRemove("--print-files");97 //const Bool_t kPrintOnly = arg.HasOnlyAndRemove("--print-only");109 const Bool_t kPrintFiles = arg.HasOnlyAndRemove("--print-files"); 110 const Bool_t kPrintFound = arg.HasOnlyAndRemove("--print-found"); 98 111 const Bool_t kDebugEnv = arg.HasOnlyAndRemove("--debug-env"); 99 112 const Bool_t kDebugMem = arg.HasOnlyAndRemove("--debug-mem"); … … 156 169 // Process print options 157 170 // 158 /*159 MDirIter iter;160 161 const Int_t n0 = seq.SetupDatRuns(iter, kInpath);162 const Int_t n1 = seq.GetNumDatRuns();163 164 171 if (kPrintFiles) 165 { 166 gLog << all; 167 gLog.Separator("Data Files"); 168 iter.Print("all"); 169 gLog << endl; 170 } 171 172 // 173 // Check for existance of all files 174 // 175 if (n0 != n1) 176 { 177 if (kForceExec) 178 gLog << warn << "WARNING"; 179 else 180 gLog << err << "ERROR"; 181 gLog << " - " << n1 << " files in sequence defined, but " << n0 << " found in "; 182 gLog << (kInpath.IsNull() ? "<defaultpath>" : kInpath.Data()) << endl; 183 if (!kForceExec) 184 return -1; 185 } 186 187 if (kPrintOnly) 188 return 0; 189 */ 172 PrintFiles(seq, kInpath, kFALSE); 173 if (kPrintFound) 174 PrintFiles(seq, kInpath, kTRUE); 190 175 191 176 //
Note:
See TracChangeset
for help on using the changeset viewer.