Changeset 9433 for trunk/MagicSoft/Mars
- Timestamp:
- 04/26/09 13:15:08 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9429 r9433 18 18 19 19 -*-*- END OF LINE -*-*- 20 2009/04/26 Thomas Bretz 21 22 * mraw/MRawFileRead.cc: 23 - added consistency check for two consecutive headers 24 25 * mraw/MRawRunHeader.[h,cc]: 26 - added copy constructor 27 - added member function for conistency check 28 29 30 20 31 2009/04/16 Thomas Bretz 21 32 -
trunk/MagicSoft/Mars/NEWS
r9429 r9433 7 7 * Added a new palette "temp" to MH::SetPalette which should resample 8 8 a temperature 9 10 * Added consistency check for two consecutive runs 9 11 10 12 ;showplot: … … 37 39 38 40 * Fixed a bug which caused the aerosol coefficient to be incorrectly 39 initialized. The effect might be random .41 initialized. The effect might be random but seems to be small. 40 42 41 43 ;callisto: -
trunk/MagicSoft/Mars/mraw/MRawFileRead.cc
r9332 r9433 218 218 fNumFile++; 219 219 220 MRawRunHeader h(*fRawRunHeader); 221 220 222 // 221 223 // Read RUN HEADER (see specification) from input stream … … 228 230 { 229 231 *fLog << err << "Error: Accessing file '" << name << "'" << endl; 232 return kERROR; 233 } 234 235 if (h.IsValidRun() && !fRawRunHeader->IsConsistent(h)) 236 { 237 *fLog << err << "Error: Inconsistency between previous header and '" << name << "' found." << endl; 238 fRawRunHeader->Print(); 230 239 return kERROR; 231 240 } -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc
r9351 r9433 210 210 } 211 211 212 MRawRunHeader::MRawRunHeader(const MRawRunHeader &h) 213 { 214 fMagicNumber=h.fMagicNumber; // File type identifier 215 216 fHeaderSizeRun=h.fHeaderSizeRun; // Size of run header 217 fHeaderSizeEvt=h.fHeaderSizeEvt; // Size of evt header 218 fHeaderSizeCrate=h.fHeaderSizeCrate; // Size of crate header 219 220 fFormatVersion=h.fFormatVersion; // File format version 221 fSoftVersion=h.fSoftVersion; // DAQ software version 222 fFadcType=h.fFadcType; // FADC type (1=Siegen, 2=MUX) 223 fCameraVersion=h.fCameraVersion; // Camera Version (1=MAGIC I) 224 fTelescopeNumber=h.fTelescopeNumber; // Telescope number (1=Magic I) 225 fRunType=h.fRunType; // Run Type 226 fRunNumber=h.fRunNumber; // Run number 227 fFileNumber=h.fFileNumber; // File number 228 memcpy(fProjectName, h.fProjectName, 101); // Project name 229 memcpy(fSourceName, h.fSourceName, 81); // Source name 230 memcpy(fObservationMode, h.fObservationMode, 61); // observation mode 231 memcpy(fSourceEpochChar, h.fSourceEpochChar, 4); // epoch char of the source 232 fSourceEpochDate=h.fSourceEpochDate; // epoch date of the source 233 fNumCrates=h.fNumCrates; // number of electronic boards 234 fNumPixInCrate=h.fNumPixInCrate; // number of pixels in crate 235 fNumSamplesLoGain=h.fNumSamplesLoGain; // number of logain samples stored 236 fNumSamplesHiGain=h.fNumSamplesHiGain; // number of higain samples stored 237 fNumBytesPerSample=h.fNumBytesPerSample; // number of bytes per sample 238 fNumEvents=h.fNumEvents; // number of events stored 239 fNumEventsRead=h.fNumEventsRead; // number of events read by the electronics 240 fSamplingFrequency=h.fSamplingFrequency; // Sampling Frequency [MHz] 241 fFadcResolution=h.fFadcResolution; // number of significant bits 242 fRunStart=h.fRunStart; // time of run start 243 fRunStop=h.fRunStop; // time of run stop 244 fPixAssignment = new MArrayS(*h.fPixAssignment); //-> pixel assignment table 245 } 246 212 247 // -------------------------------------------------------------------------- 213 248 // … … 217 252 { 218 253 delete fPixAssignment; 254 } 255 256 // -------------------------------------------------------------------------- 257 // 258 // Checks for consistency between two run headers. Checks: 259 // fNumCrates 260 // fNumPixInCrate 261 // fNumSamplesLoGain 262 // fNumSamplesHiGain 263 // fNumBytesPerSample 264 // 265 Bool_t MRawRunHeader::IsConsistent(const MRawRunHeader &h) const 266 { 267 return fNumCrates==h.fNumCrates && 268 fNumPixInCrate==h.fNumPixInCrate && 269 fNumSamplesLoGain==h.fNumSamplesLoGain && 270 fNumSamplesHiGain==h.fNumSamplesHiGain && 271 fNumBytesPerSample==h.fNumBytesPerSample; 219 272 } 220 273 -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.h
r9317 r9433 84 84 public: 85 85 MRawRunHeader(const char *name=NULL, const char *title=NULL); 86 MRawRunHeader(const MRawRunHeader &h); 86 87 ~MRawRunHeader(); 87 88 … … 169 170 Bool_t IsPointRun() const { return (fRunType&0xff)==kRTPointRun; } 170 171 172 Bool_t IsValidRun() const { return fRunType!=kRTNone; } 173 174 Bool_t IsConsistent(const MRawRunHeader &h) const; 175 171 176 void Print(Option_t *t=NULL) const; 172 177
Note:
See TracChangeset
for help on using the changeset viewer.