Changeset 9441 for trunk/MagicSoft
- Timestamp:
- 05/10/09 11:52:17 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9436 r9441 18 18 19 19 -*-*- END OF LINE -*-*- 20 2009/05/10 Thomas Bretz 21 22 * ceres.cc: 23 - added usage of sequence files 24 - added new options for pedestal and calibration mode 25 26 * mbase/MDirIter.[h,cc]: 27 - added AddFile member function 28 29 * mgeom/MGeomPix.h: 30 - added Getter for Width in x and y 31 32 * mjobs/MJSimulation.[h,cc]: 33 - added fOperationMode 34 - added use of sequence 35 - name ceres file according to sequence number 36 - changes to the binnings 37 38 * mjobs/MSequence.[h,cc]: 39 - unified the usual and the default constructor 40 - don't output default values in Print 41 - added kCorsika files 42 43 44 20 45 2009/04/29 Thomas Bretz 21 46 -
trunk/MagicSoft/Mars/NEWS
r9434 r9441 41 41 initialized. The effect might be random but seems to be small. 42 42 43 * Now accepts sequence files as input 44 45 * creation of pedestal and calibration files is now steered by 46 --mode (see ceres help) 47 43 48 ;callisto: 44 49 … … 46 51 calibrated (ceres files worked) 47 52 48 ;star ;53 ;star: 49 54 50 55 * allow to run thru even if discriminator threshold are missing -
trunk/MagicSoft/Mars/ceres.cc
r9345 r9441 15 15 #include "MEnv.h" 16 16 #include "MArgs.h" 17 #include "MDirIter.h" 17 18 18 19 #include "MJSimulation.h" … … 39 40 gLog << all << endl; 40 41 gLog << "Sorry the usage is:" << endl; 41 gLog << " ceres [options] inputfile" << endl << endl; 42 gLog << " inputfile MMCS (CORSIKA) binary (cherenkov) file." << endl; 42 gLog << " ceres [options] [inputfiles|sequence.txt]" << endl << endl; 43 gLog << " inputfiles MMCS (CORSIKA) binary (cherenkov) files, wildcards allowed." << endl; 44 gLog << " sequence.txt A sequence file." << endl; 43 45 gLog << " Root Options:" << endl; 44 46 gLog << " -b Batch mode (no graphical output to screen)" << endl<<endl; … … 49 51 gLog << " --debug-env=2 Display untouched resources after eventloop setup" << endl; 50 52 gLog << " --debug-env=3 Debug setting resources from resource file and" << endl; 51 gLog << " command line" << endl;53 gLog << " command line" << endl; 52 54 gLog << " --debug-mem Debug memory usage" << endl << endl; 53 55 gLog << " --rc=Name:option Set or overwrite a resource of the resource file." << endl; … … 59 61 gLog << " -ff Force reading of file even if problems occur" << endl; 60 62 gLog << " --out=path Path to write the all results to [def=local path]" << endl; 63 gLog << " --ind=path Input path of Corsika files if sequence used" << endl; 64 gLog << " [def=standard path in datacenter]" << endl; 61 65 gLog << " --dev-null Suppress output of files (for test purpose)" << endl; 66 gLog << " --print-seq Print Sequence information [sequence only]" << endl; 67 gLog << " --print-files Print Files taken from Sequence" << endl; 68 gLog << " --print-found Print Files found from Sequence" << endl; 62 69 gLog << " --config=ceres.rc Resource file [default=reflector.rc]" << endl; 70 gLog << endl; 71 gLog << " --mode=pedestal Execution mode. Produce either pedestals," << endl; 72 gLog << " --mode=calibration calibration data (no input files required) or" << endl; 73 gLog << " --mode=data process data files [default]" << endl; 63 74 gLog << endl; 64 75 // gLog << " -f: force reading of runheader" << endl; … … 86 97 } 87 98 99 static void PrintFiles(const MArgs &arg, Bool_t allopt) 100 { 101 const char *prep = allopt ? "Found" : "Scheduled"; 102 103 gLog << all; 104 gLog.Separator(Form("%s Data Files", prep)); 105 for (int i=0; i<arg.GetNumArguments(); i++) 106 if (!allopt || gSystem->AccessPathName(arg.GetArgumentStr(i), kFileExists)==0) 107 gLog << arg.GetArgumentStr(i) << endl; 108 gLog << endl; 109 } 110 111 112 static void PrintFiles(const MSequence &seq, const TString &kInpathD, Bool_t allopt) 113 { 114 const char *prep = allopt ? "Found" : "Scheduled"; 115 116 MDirIter Next; 117 seq.GetRuns(Next, MSequence::kCorsika, kInpathD); 118 119 gLog << all; 120 gLog.Separator(Form("%s Data Files", prep)); 121 Next.Print(allopt?"all":""); 122 gLog << endl; 123 } 124 88 125 int main(int argc, char **argv) 89 126 { … … 110 147 } 111 148 112 const Bool_t kBatch = arg.HasOnlyAndRemove("-b");149 const Bool_t kBatch = arg.HasOnlyAndRemove("-b"); 113 150 //const Int_t kCompLvl = arg.GetIntAndRemove("--comp=", 1); 114 const Bool_t kForce = arg.HasOnlyAndRemove("-ff");115 const Bool_t kDebugMem = arg.HasOnlyAndRemove("--debug-mem");116 const Bool_t kNullOut = arg.HasOnlyAndRemove("--dev-null");151 const Bool_t kForce = arg.HasOnlyAndRemove("-ff"); 152 const Bool_t kDebugMem = arg.HasOnlyAndRemove("--debug-mem"); 153 const Bool_t kNullOut = arg.HasOnlyAndRemove("--dev-null"); 117 154 Int_t kDebugEnv = arg.HasOnlyAndRemove("--debug-env") ? 1 : 0; 118 155 kDebugEnv = arg.GetIntAndRemove("--debug-env=", kDebugEnv); 119 156 120 const Bool_t kQuit = arg.HasOnlyAndRemove("-q"); 121 const Bool_t kOverwrite = arg.HasOnlyAndRemove("-f"); 122 123 const TString kConfig = arg.GetStringAndRemove("--config=", "ceres.rc"); 124 const TString kOutpath = arg.GetStringAndRemove("--out=", "."); 157 const Bool_t kPrintSeq = arg.HasOnlyAndRemove("--print-seq"); 158 const Bool_t kPrintFiles = arg.HasOnlyAndRemove("--print-files"); 159 const Bool_t kPrintFound = arg.HasOnlyAndRemove("--print-found"); 160 161 const Bool_t kQuit = arg.HasOnlyAndRemove("-q"); 162 const Bool_t kOverwrite = arg.HasOnlyAndRemove("-f"); 163 164 const TString kConfig = arg.GetStringAndRemove("--config=", "ceres.rc"); 165 const TString kInpath = arg.GetStringAndRemove("--ind=", ""); 166 const TString kOutpath = arg.GetStringAndRemove("--out=", "."); 167 168 const TString kOpMode = arg.GetStringAndRemove("--mode=", "data"); 169 170 Int_t opmode = -1; 171 if (TString("data").BeginsWith(kOpMode, TString::kIgnoreCase)) 172 opmode = MJSimulation::kModeData; 173 if (TString("pointrun").BeginsWith(kOpMode, TString::kIgnoreCase)) 174 opmode = MJSimulation::kModePointRun; 175 if (TString("pedestal").BeginsWith(kOpMode, TString::kIgnoreCase)) 176 opmode = MJSimulation::kModePed; 177 if (TString("calibration").BeginsWith(kOpMode, TString::kIgnoreCase)) 178 opmode = MJSimulation::kModeCal; 179 180 if (opmode<0) 181 { 182 gLog << err << "ERROR - Wrong mode specified..." << endl; 183 Usage(); 184 return 2; 185 } 125 186 126 187 // 127 188 // check for the right usage of the program (number of arguments) 128 if (arg.GetNumArguments()<1 /* || arg.GetNumArguments()>2*/)189 if (arg.GetNumArguments()<1 && opmode==MJSimulation::kModeData) 129 190 { 130 191 gLog << warn << "WARNING - Wrong number of arguments..." << endl; 192 Usage(); 193 return 2; 194 } 195 196 // 197 // for compatibility with the first version of ceres 198 // 199 if (arg.GetNumArguments()==1 && opmode==MJSimulation::kModeData) 200 { 201 if (arg.GetArgumentStr(0)=="pedestal") 202 { 203 opmode = MJSimulation::kModePed; 204 arg.RemoveArgument(0); 205 } 206 if (arg.GetArgumentStr(0)=="calibration") 207 { 208 opmode = MJSimulation::kModeCal; 209 arg.RemoveArgument(0); 210 } 211 } 212 213 if (arg.GetNumArguments()>0 && opmode!=MJSimulation::kModeData) 214 { 215 gLog << warn << "WARNING - No arguments allowed in this mode..." << endl; 131 216 Usage(); 132 217 return 2; … … 160 245 161 246 // 247 // Setup sequence file and check for its existance 248 // 249 TString kSequence = arg.GetNumArguments()==1 ? arg.GetArgumentStr(0) : ""; 250 251 // 252 // Check if the first argument (if any) is a sequence file or not 253 // 254 if (!kSequence.EndsWith(".txt")) 255 kSequence = ""; 256 257 // 258 // Something special for datacenter access 259 // 260 if (!kSequence.IsNull() && !MSequence::InflateSeq(kSequence, kTRUE)) 261 return 2; 262 263 // 264 // Setup sequence and check its validity 265 // 266 MSequence seq(kSequence, kInpath); 267 if (!kSequence.IsNull()) 268 { 269 if (kPrintSeq) 270 { 271 gLog << all; 272 gLog.Separator(kSequence); 273 seq.Print(); 274 gLog << endl; 275 } 276 if (seq.IsValid() && !seq.IsMonteCarlo()) 277 { 278 gLog << err << "Sequence is not a Monte Carlo Sequence." << endl << endl; 279 return 2; 280 } 281 if (!seq.IsValid()) 282 { 283 gLog << err << "Sequence read but not valid!" << endl << endl; 284 return 2; 285 } 286 287 // 288 // Process print options 289 // 290 if (kPrintFiles) 291 PrintFiles(seq, kInpath, kFALSE); 292 if (kPrintFound) 293 PrintFiles(seq, kInpath, kTRUE); 294 } 295 else 296 { 297 if (kPrintFiles) 298 PrintFiles(arg, kFALSE); 299 if (kPrintFound) 300 PrintFiles(arg, kTRUE); 301 } 302 303 // 162 304 // Initialize root 163 305 // … … 180 322 // From now on each 'Exit' means: Terminate the application 181 323 d->SetBit(MStatusDisplay::kExitLoopOnExit); 182 d->SetTitle( Form("-- Ceres: %s --", ""/*kNamein.Data()*/));324 d->SetTitle(seq.IsValid() ? Form("-- Ceres: %s --", kSequence.Data()) : "-- Ceres --"); 183 325 184 326 if (kDebugMem) … … 189 331 // 190 332 { 191 192 MJSimulation job("Ceres"/*Form("MJSimulation #%d", seq.GetSequence())*/); 333 MJSimulation job(seq.IsValid() ? Form("Ceres #%d", seq.GetSequence()) : "Ceres"); 193 334 //job.SetSequence(seq); 194 335 job.SetEnv(&env); … … 199 340 job.SetNullOut(kNullOut); 200 341 job.SetForceMode(kForce); 342 job.SetMode(opmode); 201 343 // job.SetPathIn(kInpath); // not yet needed 202 344 203 if (!job.Process(arg ))345 if (!job.Process(arg, seq)) 204 346 { 205 347 gLog << err << "Calculation of ceres failed." << endl << endl; -
trunk/MagicSoft/Mars/mbase/MDirIter.cc
r8907 r9441 152 152 // -------------------------------------------------------------------------- 153 153 // 154 // Add a single file to the iterator 155 // 156 Int_t MDirIter::AddFile(const char *name) 157 { 158 return AddDirectory(gSystem->DirName(name), gSystem->BaseName(name)); 159 } 160 161 // -------------------------------------------------------------------------- 162 // 154 163 // Adds all entries from iter to this object 155 164 // -
trunk/MagicSoft/Mars/mbase/MDirIter.h
r7808 r9441 52 52 53 53 Int_t AddDirectory(const char *dir, const char *filter="", Int_t recursive=0); 54 Int_t AddFile(const char *name); 54 55 void Add(const MDirIter &iter); 55 56 void Reset(); -
trunk/MagicSoft/Mars/mgeom/MGeomPix.h
r9385 r9441 45 45 Float_t GetT() const { return fD/gsTan60; } // Distance between two opposite edges (traverse) 46 46 47 Float_t GetDx() const { return fD; } // Distance of two rows in x-direction (without rotation) 48 Float_t GetDy() const { return fD*gsTan60/2; } // Distance of two rows in y-direction (without rotation) 49 47 50 Bool_t IsInside(Float_t px, Float_t py) const; 48 51 void PaintPrimitive(const TAttLine &line, const TAttFill &fill, Double_t scalexy=1, Double_t scaled=1) const; -
trunk/MagicSoft/Mars/mjobs/MJSimulation.cc
r9428 r9441 62 62 63 63 #include "MArgs.h" 64 //#include "MDirIter.h"64 #include "MDirIter.h" 65 65 #include "MParList.h" 66 66 #include "MTaskList.h" … … 126 126 // 127 127 MJSimulation::MJSimulation(const char *name, const char *title) 128 : fForceMode(kFALSE), fCamera(kTRUE) ,fForceTrigger(kFALSE) 128 : fForceMode(kFALSE), fCamera(kTRUE), fForceTrigger(kFALSE), 129 fOperationMode(kModeData) 129 130 { 130 131 fName = name ? name : "MJSimulation"; … … 140 141 return kTRUE; 141 142 } 142 143 Bool_t MJSimulation::WriteResult(const MParList &plist) 143 /* 144 TString MJSimulation::GetOutFile(const MSequence &seq) const 145 { 146 return seq.IsValid() ? Form("ceres%08d.root", seq.GetSequence()) : "ceres.root"; 147 } 148 */ 149 150 Bool_t MJSimulation::WriteResult(const MParList &plist, const MSequence &seq) 144 151 { 145 152 if (fPathOut.IsNull()) … … 151 158 TObjArray cont; 152 159 cont.Add(const_cast<TEnv*>(GetEnv())); 153 //cont.Add(const_cast<MSequence*>(&fSequence)); 160 if (seq.IsValid()) 161 cont.Add(const_cast<MSequence*>(&seq)); 154 162 155 163 cont.Add(plist.FindObject("PulseShape")); … … 160 168 if (fDisplay) 161 169 { 162 // TString title = "-- Reflector: "; 163 // title += fSequence.GetSequence(); 164 // title += " --"; 165 // fDisplay->SetTitle(title, kFALSE); 170 TString title = "-- Ceres"; 171 if (seq.IsValid()) 172 { 173 title += ": "; 174 title += seq.GetSequence(); 175 } 176 title += " --"; 166 177 fDisplay->SetTitle("Ceres", kFALSE); 167 178 … … 169 180 } 170 181 171 // const TString oname = Form("reflector%08d.root", fSequence.GetSequence()); 172 const TString oname = "ceres.root"; 173 return WriteContainer(cont, oname, "RECREATE"); 182 const TString name = seq.IsValid() ? Form("ceres%08d.root", seq.GetSequence()) : "ceres.root"; 183 return WriteContainer(cont, name, "RECREATE"); 174 184 } 175 185 … … 235 245 } 236 246 237 Bool_t MJSimulation::Process(const MArgs &args )247 Bool_t MJSimulation::Process(const MArgs &args, const MSequence &seq) 238 248 { 239 249 /* … … 245 255 */ 246 256 247 //if (!HasWritePermission(GetPathOut()))248 //return kFALSE;257 // if (!HasWritePermission(CombinePath(fPathOut, GetOutFile(seq)))) 258 // return kFALSE; 249 259 250 260 *fLog << inf; … … 254 264 return kFALSE; 255 265 256 *fLog << warn << "FIXME: Monte Carlo simulation: Sequences not supported yet."; 257 //*fLog << fSequence.GetFileName() << endl; 266 if (seq.IsValid()) 267 *fLog << fSequence.GetFileName() << endl; 268 else 269 *fLog << args.GetNumArguments() << "-files" << endl; 258 270 *fLog << endl; 259 271 272 MDirIter iter; 273 if (seq.IsValid() && seq.GetRuns(iter, MSequence::kCorsika)<=0) 274 { 275 *fLog << err << "ERROR - Sequence valid but without files." << endl; 276 return kFALSE; 277 } 278 260 279 // -------------------------------------------------------------------------------- 261 262 //MDirIter iter;263 //if (fSequence.GetRuns(iter, MSequence::kCalibrated)<=0)264 // return kFALSE;265 280 266 281 // Setup Parlist … … 297 312 //header.InitFadcType(3); 298 313 299 header.SetRunType(MRawRunHeader::kRTMonteCarlo|MRawRunHeader::kRTData); 300 if (args.GetNumArguments()==1) 301 { 302 if (!args.GetArgumentStr(0).CompareTo("pedestal", TString::kIgnoreCase)) 303 { 304 header.SetRunType(MRawRunHeader::kRTMonteCarlo|MRawRunHeader::kRTPedestal); 305 header.SetSourceInfo("Pedestal"); 306 } 307 if (!args.GetArgumentStr(0).CompareTo("calibration", TString::kIgnoreCase)) 308 { 309 header.SetRunType(MRawRunHeader::kRTMonteCarlo|MRawRunHeader::kRTCalibration); 310 header.SetSourceInfo("Calibration"); 311 } 312 if (!args.GetArgumentStr(0).CompareTo("pointrun", TString::kIgnoreCase)) 313 header.SetRunType(MRawRunHeader::kRTMonteCarlo|MRawRunHeader::kRTPointRun); 314 switch (fOperationMode) 315 { 316 case kModeData: 317 header.SetRunType(MRawRunHeader::kRTMonteCarlo|MRawRunHeader::kRTData); 318 break; 319 320 case kModePed: 321 header.SetRunType(MRawRunHeader::kRTMonteCarlo|MRawRunHeader::kRTPedestal); 322 header.SetSourceInfo("Pedestal"); 323 break; 324 325 case kModeCal: 326 header.SetRunType(MRawRunHeader::kRTMonteCarlo|MRawRunHeader::kRTCalibration); 327 header.SetSourceInfo("Calibration"); 328 break; 329 330 case kModePointRun: 331 header.SetRunType(MRawRunHeader::kRTMonteCarlo|MRawRunHeader::kRTPointRun); 332 break; 314 333 } 315 334 … … 333 352 read.SetForceMode(fForceMode); 334 353 335 for (int i=0; i<args.GetNumArguments(); i++) 336 read.AddFile(args.GetArgumentStr(i)); 354 if (!seq.IsValid()) 355 { 356 for (int i=0; i<args.GetNumArguments(); i++) 357 read.AddFile(args.GetArgumentStr(i)); 358 } 359 else 360 read.AddFiles(iter); 337 361 338 362 MSimMMCS simmmcs; … … 366 390 // ------------------------------------------------------------------- 367 391 368 MBinning binse( 1 00, 1, 100000, "BinningEnergy", "log");369 MBinning binsth( 70, 0.9, 900000, "BinningThreshold", "log");370 MBinning binsee( 3 5, 0.9, 900000, "BinningEnergyEst", "log");392 MBinning binse( 120, 1, 1000000, "BinningEnergy", "log"); 393 MBinning binsth( 60, 0.9, 900000, "BinningThreshold", "log"); 394 MBinning binsee( 36, 0.9, 900000, "BinningEnergyEst", "log"); 371 395 MBinning binss( 100, 1, 10000000, "BinningSize", "log"); 372 396 // MBinning binsi( 100, -500, 500, "BinningImpact"); 373 MBinning binsi( 55, 0, 1100, "BinningImpact");397 MBinning binsi( 32, 0, 800, "BinningImpact"); 374 398 MBinning binsh( 150, 0, 50, "BinningHeight"); 375 399 MBinning binsaz(720, -360, 360, "BinningAz"); 376 400 MBinning binszd( 70, 0, 70, "BinningZd"); 377 MBinning binsvc( 45, 0, 9, "BinningViewCone");401 MBinning binsvc( 35, 0, 7, "BinningViewCone"); 378 402 MBinning binsel(150, 0, 50, "BinningTotLength"); 379 403 MBinning binsew(150, 0, 15, "BinningMedLength"); … … 845 869 //------------------------------------------- 846 870 847 if (!WriteResult(plist ))871 if (!WriteResult(plist, seq)) 848 872 return kFALSE; 849 873 -
trunk/MagicSoft/Mars/mjobs/MJSimulation.h
r9343 r9441 9 9 class MArgs; 10 10 class MParList; 11 class MSequence; 11 12 class MWriteRootFile; 12 13 13 14 class MJSimulation : public MJob 14 15 { 16 public: 17 enum Mode_t { kModeData, kModePed, kModeCal, kModePointRun }; 18 15 19 private: 16 20 Bool_t fForceMode; // Force execution even if RUNE-section was not foundm … … 19 23 Bool_t fForceTrigger; // Force the use of the trigger "electronics" 20 24 21 Bool_t WriteResult(const MParList &plist); 25 Int_t fOperationMode; // Operation mode (data, ped, cal, pointrun) 26 27 Bool_t WriteResult(const MParList &plist, const MSequence &seq); 22 28 Bool_t CheckEnvLocal(); 23 29 … … 30 36 void SetForceMode(Bool_t force=kTRUE) { fForceMode = force; } 31 37 38 void SetMode(Int_t mode) { fOperationMode = mode; } 39 32 40 // Process 33 Bool_t Process(const MArgs &args );41 Bool_t Process(const MArgs &args, const MSequence &seq); 34 42 35 43 ClassDef(MJSimulation, 0) // Job to run the simulation (ceres) -
trunk/MagicSoft/Mars/mjobs/MSequence.cc
r9333 r9441 447 447 TString MSequence::InflateFileName(const MTime &night, UShort_t tel, Int_t run, Int_t file, Int_t type) 448 448 { 449 if (!night && type==kCorsika) 450 return MString::Format("cer%06d", -run); 451 449 452 const char *id="_"; 450 453 switch ((RunType_t)(type&kRunType)) … … 711 714 const TArrayI *r=0, *f=0; 712 715 GetArrays(r, f, type); 713 return GetRuns(iter, *r, *f, type, path);716 return r==0 ? 0 : GetRuns(iter, *r, *f, type, path); 714 717 } 715 718 … … 859 862 const Bool_t rc = !fDataPath.IsNull() && gSystem->AccessPathName(fDataPath, kFileExists); 860 863 if (rc) 861 gLog << err << "ERROR - Directory '" << path << "' doesn't exist." << endl;864 gLog << err << "ERROR - Directory '" << fDataPath << "' doesn't exist." << endl; 862 865 863 866 return !rc; … … 942 945 // 943 946 MSequence::MSequence(const char *fname, const char *path, UInt_t seq) 944 { 947 : fTelescope(1), fSequence((UInt_t)-1), fLastRun((UInt_t)-1), 948 fNumEvents((UInt_t)-1), fPeriod((UInt_t)-1), fLightCondition(kNA), 949 fMonteCarlo(kFALSE) 950 { 951 fName = "MSequence"; 952 fTitle = "Sequence file"; 953 954 if (TString(fname).IsNull() && TString(path).IsNull() && seq==(UInt_t)-1) 955 return; 956 945 957 // regular expression to distinguish beween a mysql-path and 946 958 // a filename from where the sequence should be retrieved … … 951 963 const Bool_t rc1 = db.IsNull() ? ReadFile(fname, seq) : ReadDatabase(fname, seq); 952 964 const Bool_t rc2 = SetDataPath(path); 953 954 fName = "MSequence";955 fTitle = "Sequence file";956 965 957 966 if (!rc1 || !rc2) … … 1353 1362 out << pre << "Night: " << fNight.GetStringFmt("%Y-%m-%d") << endl; 1354 1363 out << endl; 1355 out << pre << "LightCondition: "; 1356 switch (fLightCondition) 1357 { 1358 case kNA: out << "n/a" << endl; break; 1359 case kNoMoon: out << "NoMoon" << endl; break; 1360 case kTwilight: out << "Twilight" << endl; break; 1361 case kMoon: out << "Moon" << endl; break; 1362 case kDay: out << "Day" << endl; break; 1364 if (fLightCondition!=kNA) 1365 { 1366 out << pre << "LightCondition: "; 1367 switch (fLightCondition) 1368 { 1369 case kNA: out << "n/a" << endl; break; 1370 case kNoMoon: out << "NoMoon" << endl; break; 1371 case kTwilight: out << "Twilight" << endl; break; 1372 case kMoon: out << "Moon" << endl; break; 1373 case kDay: out << "Day" << endl; break; 1374 } 1363 1375 } 1364 1376 1365 1377 if (fStart!=MTime()) 1366 1378 out << pre << "Start: " << fStart.GetSqlDateTime() << endl; 1367 if (fLastRun >=0)1379 if (fLastRun!=(UInt_t)-1) 1368 1380 out << pre << "LastRun: " << fLastRun << endl; 1369 if (fNumEvents >=0)1381 if (fNumEvents!=(UInt_t)-1) 1370 1382 out << pre << "NumEvents: " << fNumEvents << endl; 1371 1383 if (!fProject.IsNull()) -
trunk/MagicSoft/Mars/mjobs/MSequence.h
r9039 r9441 23 23 kRoot =BIT(1), 24 24 kReport=BIT(2), 25 kCer =BIT(3), // Corsika files 25 26 }; 26 27 enum RunType_t { 27 kPed =BIT( 3),28 kCal =BIT( 4),29 kDat =BIT( 5),30 kExcl =BIT( 6),28 kPed =BIT(4), // Don't use overlapping bits! 29 kCal =BIT(5), 30 kDat =BIT(6), 31 kExcl =BIT(7), 31 32 kAll =kPed|kDat|kCal, 32 kImage =BIT( 7),33 kCalib =BIT( 8)33 kImage =BIT(8), 34 kCalib =BIT(9) 34 35 }; 35 36 36 37 enum { kRunType = kPed|kCal|kDat|kImage|kCalib }; 37 enum { kFileType = kRaw|kRoot|kReport };38 enum { kFileType = kRaw|kRoot|kReport|kCer }; 38 39 enum { kFilePaths = kFileType|kImage|kCalib }; 39 40 … … 53 54 kCalibrated = kRoot |kCalib, 54 55 kImages = kRoot |kImage, 56 kCorsika = kCer |kDat, 55 57 }; 56 58 … … 131 133 132 134 public: 135 /* 133 136 MSequence() : fTelescope(1), fSequence((UInt_t)-1), fLastRun((UInt_t)-1), 134 137 fNumEvents((UInt_t)-1), fPeriod((UInt_t)-1), fLightCondition(kNA), fMonteCarlo(kFALSE) … … 137 140 fTitle = "Sequence file"; 138 141 } 139 MSequence(const char *fname, const char *path="", UInt_t id=(UInt_t)-1); 142 */ 143 MSequence(const char *fname=0, const char *path=0, UInt_t id=(UInt_t)-1); 140 144 MSequence(const char *fname, UInt_t seq, UShort_t tel=0); 141 145 MSequence(const MSequence &s) : MParContainer(s),
Note:
See TracChangeset
for help on using the changeset viewer.