Changeset 17866
- Timestamp:
- 05/16/14 11:51:28 (10 years ago)
- Location:
- trunk/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/ceres.cc
r15049 r17866 63 63 gLog << " --ind=path Input path of Corsika files if sequence used" << endl; 64 64 gLog << " [def=standard path in datacenter]" << endl; 65 gLog << " --outf=filename Output filename. Combines all input files into" << endl; 66 gLog << " one output file. (Note that the output file will" << endl; 67 gLog << " contain only the headers corresponding to the" << endl; 68 gLog << " first input file)" << endl; 65 69 gLog << " --dev-null Suppress output of files (for test purpose)" << endl; 66 70 gLog << " --print-seq Print Sequence information [sequence only]" << endl; … … 167 171 const TString kInpath = arg.GetStringAndRemove("--ind=", ""); 168 172 const TString kOutpath = arg.GetStringAndRemove("--out=", "."); 173 const TString kOutfile = arg.GetStringAndRemove("--outf=", ""); 169 174 170 175 const Int_t kRunNumber = arg.GetIntAndRemove("--run-number=", -1); … … 343 348 job.SetOverwrite(kOverwrite); 344 349 job.SetPathOut(kOutpath); 350 job.SetFileOut(kOutfile); 345 351 job.SetNullOut(kNullOut); 346 352 job.SetForceMode(kForce); -
trunk/Mars/mjobs/MJSimulation.cc
r17855 r17866 233 233 { 234 234 // Common run headers 235 write.AddContainer("MMcCorsikaRunHeader", "RunHeaders", kFALSE );236 write.AddContainer("MCorsikaRunHeader", "RunHeaders", kFALSE );237 write.AddContainer("MRawRunHeader", "RunHeaders" );238 write.AddContainer("MGeomCam", "RunHeaders" );239 write.AddContainer("MMcRunHeader", "RunHeaders" );235 write.AddContainer("MMcCorsikaRunHeader", "RunHeaders", kFALSE, 1); 236 write.AddContainer("MCorsikaRunHeader", "RunHeaders", kFALSE, 1); 237 write.AddContainer("MRawRunHeader", "RunHeaders", kTRUE, 1); 238 write.AddContainer("MGeomCam", "RunHeaders", kTRUE, 1); 239 write.AddContainer("MMcRunHeader", "RunHeaders", kTRUE, 1); 240 240 241 241 // Common events … … 584 584 // ------------------------------------------------------------------- 585 585 586 const char *fmt = Form("s/cer([0-9]+)([0-9][0-9][0-9])/%s\\/%08d.$2_%%c_MonteCarlo$1.root/", Esc(fPathOut).Data(), header.GetRunNumber()); 587 588 const TString rule1(Form(fmt, 'R')); 589 const TString rule2(Form(fmt, 'Y')); 590 const TString rule4(Form(fmt, 'I')); 591 TString rule3(Form(fmt, header.GetRunTypeChar())); 586 if (!fFileOut.IsNull()) 587 { 588 const Ssiz_t dot = fFileOut.Last('.'); 589 const Ssiz_t slash = fFileOut.Last('/'); 590 if (dot>slash) 591 fFileOut = fFileOut.Remove(dot); 592 } 593 594 // ------------------------------------------------------------------- 595 596 const char *fmt = fFileOut.IsNull() ? 597 Form("s/cer([0-9]+)([0-9][0-9][0-9])/%s\\/%08d.$2%%s_MonteCarlo$1.root/", Esc(fPathOut).Data(), header.GetRunNumber()) : 598 Form("%s/%s%%s.root", Esc(fPathOut).Data(), Esc(fFileOut).Data()); 599 600 const TString rule1(Form(fmt, fFileOut.IsNull()?"_R":"")); 601 const TString rule2(Form(fmt, "_Y")); 602 const TString rule4(Form(fmt, "_I")); 603 TString rule3(Form(fmt, Form("_%c", header.GetRunTypeChar()))); 592 604 593 605 MWriteRootFile write4a( 2, rule4, fOverwrite?"RECREATE":"NEW", "Star file"); … … 600 612 601 613 if (fWriteFitsFile) 602 rule3.ReplaceAll(" $1.root/", "$1.fits/");614 rule3.ReplaceAll(".root", ".fits"); 603 615 604 616 MWriteFitsFile write3af( 2, rule3, fOverwrite?"RECREATE":"NEW", "Camera file"); … … 631 643 632 644 // Y: Dedicated file structure 633 write2a.AddContainer("MPedPhotFromExtractorRndm", "RunHeaders" ); // FIXME: Needed for the signal files to be display in MARS645 write2a.AddContainer("MPedPhotFromExtractorRndm", "RunHeaders", kTRUE, 1); // FIXME: Needed for the signal files to be display in MARS 634 646 write2a.AddContainer("MSignalCam", "Events"); 635 647 636 648 // D: Dedicated file structure 637 write3af.AddContainer("ElectronicNoise", "RunHeaders" );638 write3af.AddContainer("IntendedPulsePos", "RunHeaders" );649 write3af.AddContainer("ElectronicNoise", "RunHeaders", kTRUE, 1); 650 write3af.AddContainer("IntendedPulsePos", "RunHeaders", kTRUE, 1); 639 651 write3af.AddContainer("MRawEvtData", "Events"); 640 652 write3af.AddContainer("MTruePhotonsPerPixelCont", "Events"); 641 653 write3af.AddContainer("MPhotonEvent","Events"); 642 654 643 write3ar.AddContainer("ElectronicNoise", "RunHeaders" );644 write3ar.AddContainer("IntendedPulsePos", "RunHeaders" );655 write3ar.AddContainer("ElectronicNoise", "RunHeaders", kTRUE, 1); 656 write3ar.AddContainer("IntendedPulsePos", "RunHeaders", kTRUE, 1); 645 657 write3ar.AddContainer("MRawEvtData", "Events"); 646 658 // It doesn't make much sene to write this information -
trunk/Mars/mjobs/MJSimulation.h
r17737 r17866 29 29 Int_t fRunNumber; // 8 digits run number to be used for the file names 30 30 31 TString fFileOut; // Output file name if all runs should be combines 32 31 33 Bool_t WriteResult(const MParList &plist, const MSequence &seq, Int_t run); 32 34 Bool_t CheckEnvLocal(); … … 45 47 void SetMode(Int_t mode) { fOperationMode = mode; } 46 48 void SetWriteFitsFile(Bool_t fits) { fWriteFitsFile = fits; } 49 void SetFileOut(const char *file="") { fFileOut = file; } 47 50 48 51 void SetRunNumber(Int_t n=-1) { fRunNumber = n%100000000; }
Note:
See TracChangeset
for help on using the changeset viewer.