Changeset 8441
- Timestamp:
- 04/24/07 15:02:50 (18 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/ganymed.cc
r8088 r8441 201 201 // 202 202 MDataSet seq(kSequences, kPathSequences, kPathDataFiles); 203 if (!seq.IsMonteCarlo()) 204 seq.SetMonteCarlo(kIsMc); 203 205 if (kNumAnalysis>=0) 204 206 seq.SetNumAnalysis(kNumAnalysis); … … 267 269 //if (kFullDisplay) 268 270 // job.EnableFullDisplay(kFullDisplay); 269 job.EnableMonteCarloMode(kIsMc);270 271 job.EnableStorageOfResult(!kSkipResult); 271 272 if (kWriteSummary) // Don't change flag set in SetNameSummaryFile -
trunk/MagicSoft/Mars/mjobs/MDataSet.cc
r8389 r8441 18 18 ! Author(s): Thomas Bretz, 1/2005 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2004-200 520 ! Copyright: MAGIC Software Development, 2004-2007 21 21 ! 22 22 ! … … 67 67 // * Sequence filenames should also have names allowing to order them 68 68 // in time, but it is not necessary. 69 // 70 // Class Version 2: 71 // + fMonteCarlo 72 // + fWobbleMode 73 // - fIsWobbleMode 69 74 // 70 75 ///////////////////////////////////////////////////////////////////////////// … … 97 102 using namespace std; 98 103 99 const TString MDataSet::fgCatalog = "/magic/datacenter/setup/magic_favorites.edb"; 100 const TString MDataSet::fgPathDataFiles = "/magic/data/star"; 101 const TString MDataSet::fgPathSequences = "/magic/sequences"; 104 const TString MDataSet::fgCatalog = "/magic/datacenter/setup/magic_favorites.edb"; 102 105 103 106 // -------------------------------------------------------------------------- … … 217 220 Split(str, fNumSequencesOff); 218 221 219 SetupDefaultPath(sequences, fgPathSequences); 220 SetupDefaultPath(data, fgPathDataFiles); 222 fNameSource = env.GetValue("SourceName", ""); 223 fCatalog = env.GetValue("Catalog", fgCatalog); 224 fWobbleMode = env.GetValue("WobbleMode", kFALSE); 225 fMonteCarlo = env.GetValue("MonteCarlo", kFALSE); 226 fComment = env.GetValue("Comment", ""); 227 228 SetupDefaultPath(sequences, GetDefPathSequences()); 229 SetupDefaultPath(data, GetDefPathDataFiles()); 221 230 222 231 fPathSequences = sequences; … … 225 234 ResolveSequences(env, fNumSequencesOn, fSequencesOn); 226 235 ResolveSequences(env, fNumSequencesOff, fSequencesOff); 227 228 fNameSource = env.GetValue("SourceName", "");229 fCatalog = env.GetValue("Catalog", fgCatalog);230 fIsWobbleMode = env.GetValue("WobbleMode", kFALSE);231 fComment = env.GetValue("Comment", "");232 236 233 237 fNameSource = fNameSource.Strip(TString::kBoth); … … 287 291 gLog << "Catalog: " << fCatalog << endl; 288 292 289 gLog << "WobbleMode: " << (fIsWobbleMode?"On":"Off") << endl << endl; 290 291 293 gLog << "WobbleMode: " << (fWobbleMode?"On":"Off") << endl << endl; 294 gLog << "MonteCarlo: " << (fMonteCarlo?"Yes":"No") << endl << endl; 292 295 293 296 gLog << "Comment: " << fComment << endl; -
trunk/MagicSoft/Mars/mjobs/MDataSet.h
r8398 r8441 20 20 { 21 21 private: 22 static const TString fgCatalog; //! Default Catalog path 23 static const TString fgPathDataFiles; //! Default path to data files 24 static const TString fgPathSequences; //! Default path to sequences 22 static const TString fgCatalog; //! Default Catalog path 25 23 26 24 UInt_t fNumAnalysis; // Analysis number (artificial) … … 40 38 TString fComment; // Comment from DS file 41 39 42 Bool_t fIsWobbleMode; // Wobble Mode for this dataset? 40 Bool_t fWobbleMode; // Wobble Mode for this dataset? 41 Bool_t fMonteCarlo; // For default paths use MC or data path 43 42 44 43 void Split(TString &runs, TArrayI &data) const; … … 78 77 ds.fCatalog = fCatalog; 79 78 ds.fComment = fComment; 80 ds.fIsWobbleMode = fIsWobbleMode; 79 ds.fWobbleMode = fWobbleMode; 80 ds.fMonteCarlo = fMonteCarlo; 81 81 82 82 TObject *o=0; … … 112 112 Bool_t GetSourcePos(MPointingPos &pos) const; 113 113 114 Bool_t IsWobbleMode() const { return fIsWobbleMode; } 114 Bool_t IsWobbleMode() const { return fWobbleMode; } 115 Bool_t IsMonteCarlo() const { return fMonteCarlo; } 116 117 const char *GetDefPathDataFiles() const { return fMonteCarlo ? "/magic/montecarlo/star" : "/magic/data/star"; } 118 const char *GetDefPathSequences() const { return fMonteCarlo ? "/magic/montecarlo/sequences" : "/magic/sequences"; } 115 119 116 120 // Setter 121 void SetMonteCarlo(Bool_t ismc=kTRUE) { fMonteCarlo=ismc; } 122 117 123 static Bool_t AddSequencesFromList(const TList &list, MDirIter &files); 118 124 static Int_t AddFilesToChain(MDirIter &files, TChain &chain); … … 144 150 void Print(Option_t *o="") const; //*MENU* 145 151 146 ClassDef(MDataSet, 1)152 ClassDef(MDataSet, 2) 147 153 }; 148 154 -
trunk/MagicSoft/Mars/mjobs/MJCut.cc
r8440 r8441 91 91 MJCut::MJCut(const char *name, const char *title) 92 92 : fStoreSummary(kFALSE), fStoreResult(kTRUE), fWriteOnly(kFALSE), 93 fIsWobble(kFALSE), f IsMonteCarlo(kFALSE), fFullDisplay(kTRUE),93 fIsWobble(kFALSE), fFullDisplay(kTRUE), 94 94 fRndmSrcPos(kFALSE), fNameHist("MHThetaSq"), fCalcHadronness(0), fCalcDisp(0) 95 95 { … … 331 331 EnableStorageOfResult(GetEnv("ResultFile", fStoreResult)); 332 332 EnableWobbleMode(GetEnv("WobbleMode", fIsWobble)); 333 EnableMonteCarloMode(GetEnv("MonteCarlo", fIsMonteCarlo));334 333 EnableFullDisplay(GetEnv("FullDisplay", fFullDisplay)); 335 334 EnableRandomSrcPos(GetEnv("RandomSourcePosition", fRndmSrcPos)); … … 643 642 readoffmc.DisableAutoScheme(); 644 643 645 MRead &readoff = fIsMonteCarlo? (MRead&)readoffmc : (MRead&)readoffdata;644 MRead &readoff = set.IsMonteCarlo() ? (MRead&)readoffmc : (MRead&)readoffdata; 646 645 const Bool_t setrc = fIsWobble ? set.AddFilesOn(readoff) : set.AddFilesOff(readoff); 647 646 if (!setrc && set.HasOffSequences()) … … 831 830 readonmc.DisableAutoScheme(); 832 831 833 MRead &readon = fIsMonteCarlo? (MRead&)readonmc : (MRead&)readondata;832 MRead &readon = set.IsMonteCarlo() ? (MRead&)readonmc : (MRead&)readondata; 834 833 if (!set.AddFilesOn(readon)) 835 834 return kFALSE; … … 873 872 hvs.SetTitle("Effective On-Time vs. Zenith Angle;\\Theta [\\circ];T_{on} [s]"); 874 873 MFillH fillvs(&hvs, "", "FillOnTime"); 875 if (! fIsMonteCarlo)874 if (!set.IsMonteCarlo()) 876 875 fillvs.SetWeight("MEffectiveOnTime"); 877 876 fillvs.SetNameTab("OnTime"); … … 946 945 } 947 946 948 if (! fIsMonteCarlo)947 if (!set.IsMonteCarlo()) 949 948 tlist.AddToList(&fillvs, "EffectiveOnTime"); 950 949 else -
trunk/MagicSoft/Mars/mjobs/MJCut.h
r8244 r8441 22 22 Bool_t fWriteOnly; 23 23 Bool_t fIsWobble; 24 Bool_t fIsMonteCarlo;25 24 Bool_t fFullDisplay; 26 25 Bool_t fRndmSrcPos; … … 61 60 void EnableWriteOnly(Bool_t b=kTRUE) { fWriteOnly = b; } 62 61 void EnableWobbleMode(Bool_t b=kTRUE) { fIsWobble = b; } 63 void EnableMonteCarloMode(Bool_t b=kTRUE) { fIsMonteCarlo = b; }64 62 void EnableFullDisplay(Bool_t b=kTRUE) { fFullDisplay = b; } 65 63 void EnableRandomSrcPos(Bool_t b=kTRUE) { fRndmSrcPos = b; }
Note:
See TracChangeset
for help on using the changeset viewer.