Changeset 9482 for trunk/MagicSoft/Mars
- Timestamp:
- 07/29/09 15:15:59 (15 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9481 r9482 27 27 - added getter for command line 28 28 29 * mjobs/MJCalibration.cc, mjobs/MJCut.cc: 29 * mjobs/MJCalibration.cc, mjobs/MJCut.cc, mjobs/MJSpectrum.cc, 30 mjobs/MJStar.cc, mjobs/MJCalibrateSignal.cc: 30 31 - write command line to output 31 32 … … 36 37 - added efault argumtn to Print() 37 38 38 * mjobs/MJCalibrateSignal.cc: 39 - write command line to output 39 * mjobs/MJStar.cc: 40 - added a sanity check for empty sequences 41 - write MCorsikaEvtHeader and MCorsikaRunHeader to output 42 43 * mjobs/MJSimulation.cc: 44 - use a MParameterCalc to calculate and later store the 45 incident angle 40 46 41 47 -
trunk/MagicSoft/Mars/NEWS
r9467 r9482 17 17 * Added a new camera layout MGeomCamFact which is the "four rectangular 18 18 pixels ordered in a hexagonal geometry" layout 19 20 * All programs now store the command line as TNamed "CommandLine" 19 21 20 22 ;showplot: -
trunk/MagicSoft/Mars/callisto.cc
r9345 r9482 441 441 job3.SetOverwrite(kOverwrite); 442 442 job3.SetPathOut(kOutpathC); 443 job3.SetCommandLine(MArgs::GetCommandLine(argc, argv)); 443 444 // job2.SetPathIn(kInpathC); // not yet needed 444 445 … … 625 626 job4.SetMovieMode(kMovie); 626 627 job4.SetNullOut(kNullOut); 628 job4.SetCommandLine(MArgs::GetCommandLine(argc, argv)); 627 629 if (!seq.IsMonteCarlo()) 628 630 job4.SetExtractor(job2.GetExtractor()); -
trunk/MagicSoft/Mars/ceres.cc
r9441 r9482 341 341 job.SetForceMode(kForce); 342 342 job.SetMode(opmode); 343 job.SetCommandLine(MArgs::GetCommandLine(argc, argv)); 343 344 // job.SetPathIn(kInpath); // not yet needed 344 345 -
trunk/MagicSoft/Mars/ganymed.cc
r9345 r9482 287 287 job.SetNameOutFile(kOutfile); 288 288 job.SetNameSummaryFile(kNameSummary); 289 job.SetCommandLine(MArgs::GetCommandLine(argc, argv)); 289 290 //job.SetNameResultFile(kNameResult); 290 291 job.EnableWriteOnly(kWriteOnly); -
trunk/MagicSoft/Mars/mbase/MArgs.cc
r9442 r9482 506 506 return rc; 507 507 } 508 509 // -------------------------------------------------------------------------- 510 // 511 // Return all arguments and options in the order as they are stored 512 // in memory. 513 // 514 TString MArgs::GetCommandLine() const 515 { 516 TString rc; 517 518 TIter Next(&fArgv); 519 TString *s = NULL; 520 while ((s=dynamic_cast<TString*>(Next()))) 521 { 522 rc += *s; 523 rc += " "; 524 } 525 526 return rc.Strip(TString::kBoth); 527 } -
trunk/MagicSoft/Mars/mbase/MArgs.h
r9442 r9482 31 31 32 32 MArgsEntry *GetArgument(Int_t i) const; 33 MArgsEntry *GeOption(Int_t i) const; 33 34 34 35 public: … … 70 71 Bool_t RemoveArgument(Int_t i); 71 72 73 TString GetCommandLine() const; 74 75 static TString GetCommandLine(int argc, char **argv) { return MArgs(argc, argv).GetCommandLine(); } 76 72 77 ClassDef(MArgs, 0) //Class to parse command line arguments 73 78 }; -
trunk/MagicSoft/Mars/mjobs/MJSimulation.cc
r9462 r9482 74 74 #include "MFillH.h" 75 75 #include "MGeomApply.h" 76 #include "MParameterCalc.h" 76 77 #include "MHillasCalc.h" 77 78 #include "MImgCleanStd.h" … … 166 167 cont.Add(plist.FindObject("GeomCones")); 167 168 169 TNamed cmdline("CommandLine", fCommandLine.Data()); 170 cont.Add(&cmdline); 171 168 172 if (fDisplay) 169 173 { … … 219 223 hist.SetAutoRange(); 220 224 221 TString sin2 = "sin(MCorsikaEvtHeader.fZd)*sin(MCorsikaRunHeader.fZdMin*TMath::DegToRad())"; 222 TString cos2 = "cos(MCorsikaEvtHeader.fZd)*cos(MCorsikaRunHeader.fZdMin*TMath::DegToRad())"; 223 TString cos = "cos(MCorsikaEvtHeader.fAz-MCorsikaRunHeader.fAzMin*TMath::DegToRad())"; 224 225 TString form = "acos("+sin2+"*"+cos+"+"+cos2+")*TMath::RadToDeg()"; 226 227 hist.AddHist(form); 225 hist.AddHist("IncidentAngle.fVal"); 228 226 hist.InitName("ViewCone"); 229 227 hist.InitTitle("Incident Angle;\\alpha [\\deg]"); … … 243 241 write.AddContainer("MRawEvtHeader", "Events"); 244 242 write.AddContainer("MMcEvt", "Events"); 243 write.AddContainer("IncidentAngle", "Events", kFALSE); 245 244 } 246 245 … … 372 371 plist.AddToList(&splinemirror); 373 372 plist.AddToList(&splinecones); 373 374 const TString sin2 = "sin(MCorsikaEvtHeader.fZd)*sin(MCorsikaRunHeader.fZdMin*TMath::DegToRad())"; 375 const TString cos2 = "cos(MCorsikaEvtHeader.fZd)*cos(MCorsikaRunHeader.fZdMin*TMath::DegToRad())"; 376 const TString cos = "cos(MCorsikaEvtHeader.fAz-MCorsikaRunHeader.fAzMin*TMath::DegToRad())"; 377 378 const TString form = "acos("+sin2+"*"+cos+"+"+cos2+")*TMath::RadToDeg()"; 379 380 MParameterCalc calcangle(form, "CalcIncidentAngle"); 381 calcangle.SetNameParameter("IncidentAngle"); 374 382 375 383 MSimAtmosphere simatm; … … 637 645 if (1) 638 646 tasks.AddToList(&simatm); // Here because before fillh1 647 tasks.AddToList(&calcangle); 639 648 tasks.AddToList(&fillh1); 640 649 tasks.AddToList(&fillG); -
trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc
r9367 r9482 1963 1963 { 1964 1964 TNamed ganame("ganymed.root", fPathIn.Data()); 1965 TNamed cmdline("CommandLine", fCommandLine.Data()); 1965 1966 1966 1967 // Write the output … … 1974 1975 cont.Add(&hest); 1975 1976 cont.Add(&ganame); 1977 cont.Add(&cmdline); 1976 1978 1977 1979 if (fDisplay) -
trunk/MagicSoft/Mars/mjobs/MJStar.cc
r9434 r9482 118 118 cont.Add(const_cast<MSequence*>(&fSequence)); 119 119 120 TNamed cmdline("CommandLine", fCommandLine.Data()); 121 cont.Add(&cmdline); 122 120 123 if (fDisplay) 121 124 { … … 155 158 MDirIter iter; 156 159 if (fSequence.GetRuns(iter, MSequence::kCalibrated)<=0) 160 { 161 *fLog << err << "ERROR - Sequence valid but without files." << endl; 157 162 return kFALSE; 163 } 158 164 159 165 // Setup Parlist … … 267 273 plist.AddToList(&par); // without MTriggerPattern stored in the file 268 274 269 // For the effective on-time calculation we don't want SUM-only events 275 // For the effective on-time calculation and the muon statistics 276 // we don't want SUM-only events 270 277 MFTriggerPattern fsum; 271 278 fsum.SetDefault(kTRUE); … … 336 343 write.AddContainer("MMcEvt", "Events"); 337 344 write.AddContainer("MMcTrig", "Events", kFALSE); 345 write.AddContainer("MCorsikaEvtHeader", "Events", kFALSE); 338 346 write.AddContainer("MSrcPosCam", "Events"); 339 347 // Monte Carlo Run Headers … … 342 350 write.AddContainer("MMcFadcHeader", "RunHeaders", kFALSE); 343 351 write.AddContainer("MMcConfigRunHeader", "RunHeaders", kFALSE); 344 write.AddContainer("MMcCorsikaRunHeader", "RunHeaders"); 352 write.AddContainer("MMcCorsikaRunHeader", "RunHeaders", kFALSE); 353 write.AddContainer("MCorsikaRunHeader", "RunHeaders", kFALSE); 345 354 } 346 355 else -
trunk/MagicSoft/Mars/mjobs/MJob.h
r9245 r9482 38 38 // FIXME: Split into MJobSequence and MJobDataSet 39 39 MSequence fSequence; // Sequence 40 41 TString fCommandLine; // Command line for possible storage 40 42 41 43 const TEnv *GetEnv() const; … … 79 81 void SetNullOut(Bool_t b=kTRUE) { fNullOut=b; } 80 82 83 void SetCommandLine(const TString &s) { fCommandLine = s; } 84 81 85 // Getter 82 86 TString GetPathOut() const { return fPathOut; } -
trunk/MagicSoft/Mars/mtrigger/MTriggerPattern.h
r9462 r9482 12 12 public: 13 13 enum Pattern_t { 14 // kUndefined1 = BIT(0), // 1 1: Level 1 from L2 board15 14 kTriggerLvl1 = BIT(0), // 1 1: Level 1 from L2 board 16 15 kCalibration = BIT(1), // 2 2: Pulse Trigger … … 19 18 kPinDiode = BIT(4), // 10 16: 20 19 kSumTrigger = BIT(5), // 20 32: Flag for an event taken with sum trigger 21 // kTriggerLvl1 = BIT(6), // 40 64: Trigger lvl1 directly from L1 without going through L222 20 kUndefined1 = BIT(6), // 40 64: Trigger lvl1 directly from L1 without going through L2 23 kUndefined2 = BIT(7) // 80 128: Undefined? 21 kUndefined2 = BIT(7) // 80 128: Undefined? (L3?) 24 22 }; 25 23 … … 31 29 MTriggerPattern(const char *name=0, const char *title=0); 32 30 33 void Print(Option_t * ) const;31 void Print(Option_t *o="") const; 34 32 void Copy(TObject &obj) const; 35 33 -
trunk/MagicSoft/Mars/sponde.cc
r9345 r9482 258 258 job.SetPathOut(kOutfile); 259 259 job.SetPathIn(kInfile); 260 job.SetCommandLine(MArgs::GetCommandLine(argc, argv)); 260 261 261 262 job.ForceTheta(kForceTheta); -
trunk/MagicSoft/Mars/star.cc
r9345 r9482 246 246 job.SetPathOut(kOutpath); 247 247 job.SetNullOut(kNullOut); 248 job.SetCommandLine(MArgs::GetCommandLine(argc, argv)); 248 249 // job.SetPathIn(kInpath); // not yet needed 249 250 if (kNoMuons)
Note:
See TracChangeset
for help on using the changeset viewer.