Changeset 11431 for trunk/Mars/mraw
- Timestamp:
- 07/18/11 09:27:48 (13 years ago)
- Location:
- trunk/Mars/mraw
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mraw/MRawFileRead.cc
r9433 r11431 162 162 } 163 163 164 istream *MRawFileRead::OpenFile(const char *filename) 165 { 166 return new MZlib(filename); 167 } 168 169 Bool_t MRawFileRead::ReadRunHeader(istream &fin) 170 { 171 // 172 // Read RUN HEADER (see specification) from input stream 173 // 174 if (!fRawRunHeader->ReadEvt(fin)) 175 if (!fForce) 176 return kFALSE; 177 178 return kTRUE; 179 } 180 164 181 // -------------------------------------------------------------------------- 165 182 // … … 188 205 189 206 const char *expname = gSystem->ExpandPathName(name); 190 fIn = new MZlib(expname);207 fIn = OpenFile(expname); 191 208 192 209 const Bool_t noexist = !(*fIn); … … 220 237 MRawRunHeader h(*fRawRunHeader); 221 238 222 // 223 // Read RUN HEADER (see specification) from input stream 224 // 225 if (!fRawRunHeader->ReadEvt(*fIn)) 226 if (!fForce) 227 return kERROR; 239 if (!ReadRunHeader(*fIn)) 240 return kERROR; 228 241 229 242 if (!(*fIn)) 230 243 { 231 244 *fLog << err << "Error: Accessing file '" << name << "'" << endl; 232 return k ERROR;245 return kFALSE; 233 246 } 234 247 -
trunk/Mars/mraw/MRawFileRead.h
r7579 r11431 7 7 8 8 class TList; 9 class MZlib;10 9 class MTaskList; 11 10 … … 18 17 UInt_t fNumTotalEvents; //! total number of events in all files 19 18 20 MZlib*fIn; //! input stream (file to read from)19 istream *fIn; //! input stream (file to read from) 21 20 22 21 MParList *fParList; //! tasklist to call ReInit from … … 25 24 26 25 Bool_t fForce; 26 27 virtual istream *OpenFile(const char *filename); 28 virtual Bool_t ReadRunHeader(istream &fin); 27 29 28 30 Int_t OpenNextFile(Bool_t print=kTRUE);
Note:
See TracChangeset
for help on using the changeset viewer.