Changeset 1342 for trunk/MagicSoft
- Timestamp:
- 06/03/02 15:43:45 (22 years ago)
- Location:
- trunk/MagicSoft
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1341 r1342 92 92 * mdata/MReadTree.cc: 93 93 - fixed a root bug for root versions<3.03/00 (the open file in 94 the TChain was not deleted (closed)) 94 the TChain was not deleted (closed)) 95 96 * mbase/MReadMarsFile.[h,cc]: 97 - store parlist instead of tasklist 98 - check for run types between files 99 - check for used reflector version (because of a bug in the program) 100 101 * mmc/MMcRunheader.hxx: 102 - added GetReflVersion() 103 104 * mmontecarlo/MMcTriggerRateCalc.cc: 105 - changed particle Id numbers to predefined constants 95 106 96 107 -
trunk/MagicSoft/Mars/mbase/MReadMarsFile.cc
r1337 r1342 41 41 #include "MParList.h" 42 42 #include "MTaskList.h" 43 44 #include "MRawRunHeader.h" 45 46 #include "MMcRunHeader.hxx" 43 47 44 48 ClassImp(MReadMarsFile); … … 109 113 { 110 114 Int_t runtype = -1; 111 /* 112 const MRawRunHeader *r unheader = (MRawRunHeader*)fParList->FindObject("MRawRunHeader");113 if (r unheader)114 runtype = r unheader->GetRunType();115 */ 115 116 const MRawRunHeader *rawheader = (MRawRunHeader*)fParList->FindObject("MRawRunHeader"); 117 if (rawheader) 118 runtype = rawheader->GetRunType(); 119 116 120 // 117 121 // Try to read the new run headers. If reading the new run header … … 120 124 const Int_t idx = GetFileIndex(); 121 125 fRun->SetEventNum(idx<0?0:idx); // Assumption: One Entry per File! 122 if ( fRun->Process())126 if (!fRun->Process()) 123 127 { 124 *fLog << inf << "MReadMarsFile: Switching to #" << GetFileIndex(); 125 *fLog << " '" << GetFileName() << "' (before event #"; 126 *fLog << GetEventNum()-1 << ")" << endl; 127 /* 128 if (runheader) 129 if (runtype != runheader->GetRunType()) 130 *fLog << warn << "Warning - You are mixing files with different run types!" << endl; 131 */ 132 if (fTaskList->ReInit()) 133 return kTRUE; 128 *fLog << err << "ERROR - Cannot read new runheaders #" << idx; 129 *fLog << " after reading event #" << GetEventNum() << endl; 130 return kFALSE; 131 } 134 132 135 //MReadTree::Notify(); 133 *fLog << inf << "MReadMarsFile: Switching to #" << GetFileIndex(); 134 *fLog << " '" << GetFileName() << "' (before event #"; 135 *fLog << GetEventNum()-1 << ")" << endl; 136 136 137 *fLog << err << "ERROR - ReInit of '" << fTaskList->GetName() << "' failed." << endl; 137 if (rawheader) 138 { 139 if (runtype != rawheader->GetRunType()) 140 *fLog << warn << "Warning - You are mixing files with different run types!" << endl; 138 141 } 139 else140 *fLog << err << "ERROR - Cannot read new runheaders after reading event #" << GetEventNum() << endl;141 142 143 const MMcRunHeader *mcheader = (MMcRunHeader*)fParList->FindObject("MMcRunHeader"); 144 if (mcheader) 145 { 146 if (mcheader->GetReflVersion()<=40 && mcheader->GetTelesTheta()>15) 147 { 148 *fLog << warn << "Warning - You may use Monte Carlo data produced with a version" << endl; 149 *fLog << "of the reflector program < 0.4 and a zenith angle > 15," << endl; 150 *fLog << "in this case you may get less photons than you would expect." << endl; 151 } 152 } 153 154 MTaskList *tlist = (MTaskList*)fParList->FindObject("MTaskList"); 155 if (!tlist) 156 { 157 *fLog << err << dbginf << "ERROR - Task List not found in Parameter List." << endl; 158 return kFALSE; 159 } 160 161 if (tlist->ReInit()) 162 return kTRUE; 163 164 //MReadTree::Notify(); 165 166 *fLog << err << "ERROR - ReInit of '" << tlist->GetName() << "' failed." << endl; 142 167 return kFALSE; 143 168 } … … 151 176 { 152 177 fParList = pList; 153 fTaskList = (MTaskList*)pList->FindObject("MTaskList");154 178 155 179 if (!fRun->PreProcess(pList)) -
trunk/MagicSoft/Mars/mbase/MReadMarsFile.h
r1337 r1342 14 14 MReadTree *fRun; 15 15 MParList *fParList; //! Parlist for reinitialization 16 MTaskList *fTaskList; //! Tasklist for reinitialization17 16 18 17 Bool_t Notify(); -
trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.cc
r1166 r1342 159 159 160 160 rate.SetParticle(fPartId); 161 if (fPartId ==14) 162 rate.SetFlux(0.1091, 2.75); 163 else if (fPartId == 402) 164 rate.SetFlux(0.0660, 2.62); 165 else { 161 switch (fPartId) 162 { 163 case kPROTON: 164 rate.SetFlux(0.1091, 2.75); 165 break; 166 case kHELIUM: 167 rate.SetFlux(0.0660, 2.62); 168 break; 169 default: 166 170 *fLog << err << dbginf << "Unknown incident flux parameters for "; 167 171 *fLog << fPartId<< " particle Id ... aborting." << endl; -
trunk/MagicSoft/include-Classes/MMcFormat/MMcRunHeader.hxx
r1301 r1342 138 138 Float_t GetTelesTheta() const { return fTelesTheta; } 139 139 UShort_t GetCamVersion() const { return fCamVersion; } 140 UShort_t GetReflVersion() const { return fReflVersion; } 140 141 UInt_t GetNumSimulatedShowers() const { return fNumSimulatedShowers; } 141 142 UInt_t GetCorsikaVersion() const { return fCorsikaVersion; }
Note:
See TracChangeset
for help on using the changeset viewer.