Changeset 3138 for trunk/MagicSoft
- Timestamp:
- 02/13/04 14:53:46 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3137 r3138 31 31 - changed the name of the "DC" tree to "Currents" to make 32 32 MReportRead work correctly with this tree 33 34 * mbase/MTime.[h,cc]: 35 - Changed UpDMagicTime to support nanosec instead of millisec 36 37 * mraw/MRawEvtHeader.[h,cc]: 38 - implemented decoding of the time-stamp for raw-data files 39 with version>2. Thanks to Marcos. 40 41 * mraw/MRawRead.[h,c]: 42 - pipe file version number to MRawEvtHeader::ReadEvt 43 - create fake time for file-version<3 33 44 34 45 -
trunk/MagicSoft/Mars/mbase/MTime.cc
r2728 r3138 141 141 return kFALSE; 142 142 143 const Bool_t am = ms <kHour*13; // day of sunrise?143 const Bool_t am = ms<kHour*13; // day of sunrise? 144 144 145 145 fMjd = am ? mjd : mjd + 1; … … 220 220 // between 13:00:00.0 (day of dawning) and 12:59:59.999 (day of sunrise) 221 221 // 222 Bool_t MTime::UpdMagicTime(Byte_t h, Byte_t m, Byte_t s, U Short_t ms)223 { 224 if (h>23 || m>59 || s>59 || ms>999)222 Bool_t MTime::UpdMagicTime(Byte_t h, Byte_t m, Byte_t s, UInt_t ns) 223 { 224 if (h>23 || m>59 || s>59 || ns>999999999) 225 225 return kFALSE; 226 226 227 const ULong_t tm = ((((h*60+m)*60)+s)*1000)+ ms;228 229 fTime = (Long_t)(tm <kHour*13 ? tm : tm-kDay); // day of sunrise?230 //fNanoSec = ns;227 const ULong_t tm = ((((h*60+m)*60)+s)*1000)+ns/1000000; 228 229 fTime = (Long_t)(tm<kHour*13 ? tm : tm-kDay); // day of sunrise? 230 fNanoSec = ns%1000000; 231 231 232 232 return kTRUE; … … 244 244 struct timeval tv; 245 245 if (gettimeofday(&tv, NULL)<0) 246 Reset();246 Clear(); 247 247 else 248 248 Set(tv); 249 249 #else 250 Reset();250 Clear(); 251 251 #endif 252 252 } -
trunk/MagicSoft/Mars/mbase/MTime.h
r2728 r3138 49 49 { 50 50 Init(name, title); 51 Reset();51 Clear(); 52 52 } 53 53 MTime(const struct timeval &tm) … … 68 68 } 69 69 70 void Reset() { fMjd=0; fTime=0; fNanoSec=0; }70 void Clear(const Option_t *o="") { fMjd=0; fTime=0; fNanoSec=0; } 71 71 72 72 void Print(Option_t *t=NULL) const; … … 78 78 void Set(const struct timeval &tv); 79 79 void SetCT1Time(UInt_t mjd, UInt_t t1, UInt_t t0); 80 Bool_t UpdMagicTime(Byte_t h, Byte_t m, Byte_t s, U Short_t ms);80 Bool_t UpdMagicTime(Byte_t h, Byte_t m, Byte_t s, UInt_t ns); 81 81 void SetMjd(Double_t m); 82 82 Double_t GetMjd() const;
Note:
See TracChangeset
for help on using the changeset viewer.