Changeset 1342 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 06/03/02 15:43:45 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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();
Note:
See TracChangeset
for help on using the changeset viewer.