Changeset 2461 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 11/03/03 18:08:26 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MTime.cc
r2173 r2461 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@ uni-sw.gwdg.de>18 ! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 120 ! Copyright: MAGIC Software Development, 2000-2003 21 21 ! 22 22 ! … … 24 24 25 25 ///////////////////////////////////////////////////////////////////////////// 26 // // 27 // MTime // 28 // // 29 // A generalized MARS time stamp // 30 // // 26 // 27 // MTime 28 // 29 // A generalized MARS time stamp 30 // 31 // 32 // Version 1: 33 // ---------- 34 // - first version 35 // 36 // Version 2: 37 // ---------- 38 // - removed fTimeStamp[2] 39 // 31 40 ///////////////////////////////////////////////////////////////////////////// 32 33 41 #include "MTime.h" 34 42 … … 43 51 void MTime::Print(Option_t *) const 44 52 { 45 fLog->setf(ios::showbase); 46 *fLog << "MTime Information: " << hex 47 << " " << setfill('0') << setw(2) << fTimeStamp[0] 48 << " " << setfill('0') << setw(2) << fTimeStamp[1] << endl << endl; 53 *fLog << GetDescriptor() << ": " << dec; 54 *fLog << setfill('0') << setw(2) << (int)fHour << ":"; 55 *fLog << setfill('0') << setw(2) << (int)fMin << ":"; 56 *fLog << setfill('0') << setw(2) << (int)fSec << "."; 57 *fLog << setfill('0') << setw(9) << fNanoSec << endl; 49 58 } 50 -
trunk/MagicSoft/Mars/mbase/MTime.h
r2438 r2461 17 17 { 18 18 private: 19 UInt_t fTimeStamp[2]; // type of raw event which should be processed by this task19 //UInt_t fTimeStamp[2]; // type of raw event which should be processed by this task 20 20 UInt_t fDuration; // time of validity 21 21 … … 31 31 fTitle = title; 32 32 33 SetTime( 0,0);33 SetTime((ULong_t)0); 34 34 } 35 35 36 MTime(UInt_t t1, UInt_t t0) 37 { 38 SetTime(t1, t0); 39 } 40 41 MTime(MTime& t) 42 { 43 fTimeStamp[0] = t.fTimeStamp[0]; 44 fTimeStamp[1] = t.fTimeStamp[1]; 45 fDuration = t.fDuration; 46 } 36 MTime(MTime& t) { *this = t; } 47 37 48 38 void operator=(MTime &t) 49 39 { 50 fTimeStamp[0] = t.fTimeStamp[0];51 fTimeStamp[1] = t.fTimeStamp[1];52 40 fDuration = t.fDuration; 41 fHour = t.fHour; 42 fMin = t.fMin; 43 fSec = t.fSec; 44 fNanoSec = t.fNanoSec; 53 45 } 54 46 55 ~MTime() {}56 57 47 void Print(Option_t *t=NULL) const; 58 59 void SetTime(UInt_t t1, UInt_t t0)60 {61 fTimeStamp[0] = t1;62 fTimeStamp[1] = t0;63 }64 48 65 49 void SetCT1Time(UInt_t t1, UInt_t t0) … … 117 101 } 118 102 119 UInt_t GetTimeLo()120 {121 return fTimeStamp[0];122 }123 UInt_t GetTimeHi()124 {125 return fTimeStamp[1];126 }127 128 103 UInt_t GetDuration() 129 104 { … … 140 115 } 141 116 142 ClassDef(MTime, 1) //A generalized MARS time stamp117 ClassDef(MTime, 2) //A generalized MARS time stamp 143 118 }; 144 119
Note:
See TracChangeset
for help on using the changeset viewer.