Changeset 2461
- Timestamp:
- 11/03/03 18:08:26 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2460 r2461 14 14 workaround for thread safty by the more correct check 15 15 whether we are running in the main Thread (TThread::Self()) 16 - added double-cast to TProgressBar::SetPosition 16 17 17 18 * mbase/MTask.h: … … 39 40 because 'more' also counts the ANSI color codes to determin 40 41 the line-length) 42 43 * mhistmc/MHMcCollectionArea.cc: 44 - added UseCurrentStyle such that the axis labels are displayed 41 45 42 46 * mbase/MTime.[h,cc]: -
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 -
trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc
r2367 r2461 905 905 // int isecs_since_midday; // seconds passed since midday before sunset (JD of run start) 906 906 // int isecfrac_200ns; // fractional part of isecs_since_midday 907 fTime->Set Time(event.isecfrac_200ns, event.isecs_since_midday);907 fTime->SetCT1Time(event.isecfrac_200ns, event.isecs_since_midday); 908 908 fTime->SetDuration((Int_t)fRawRunHeader->GetMJD()); 909 909 fTime->SetReadyToSave(); -
trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.cc
r2173 r2461 117 117 MHillasSrc &hil = *(MHillasSrc*)par; 118 118 119 fHist.Fill(fabs(hil.GetAlpha()), fEnergy->GetEnergy(), 0.0001*fTime->GetTimeLo(), w);119 fHist.Fill(fabs(hil.GetAlpha()), fEnergy->GetEnergy(), *fTime, w); 120 120 return kTRUE; 121 121 } -
trunk/MagicSoft/Mars/mhist/MHEnergyTime.cc
r2173 r2461 104 104 const MMcEvt &mcevt = *(MMcEvt*)par; 105 105 106 fHist.Fill(mcevt.GetEnergy(), 0.0001*fTime->GetTimeLo(), w);106 fHist.Fill(mcevt.GetEnergy(), *fTime, w); 107 107 108 108 return kTRUE; -
trunk/MagicSoft/Mars/mhist/MHThetabarTime.cc
r2173 r2461 63 63 fHist.SetDirectory(NULL); 64 64 65 fHist.SetXTitle("t ime[s]");65 fHist.SetXTitle("t [s]"); 66 66 fHist.SetYTitle("\\bar{\\Theta} [ \\circ]"); 67 67 } … … 122 122 Bool_t MHThetabarTime::Fill(const MParContainer *par, const Stat_t w) 123 123 { 124 const Int_t time = fTime->GetTimeLo(); 125 126 fHist.Fill(0.0001*time, fMcEvt->GetTheta()*kRad2Deg, w); 124 fHist.Fill(*fTime, fMcEvt->GetTheta()*kRad2Deg, w); 127 125 128 126 return kTRUE; -
trunk/MagicSoft/Mars/mhist/MHTimeDiffTheta.cc
r2173 r2461 146 146 Bool_t MHTimeDiffTheta::Fill(const MParContainer *par, const Stat_t w) 147 147 { 148 const Double_t time = 200e-9*fTime->GetTimeLo() + fTime->GetTimeHi();148 const Double_t time = *fTime; 149 149 150 150 fHist.Fill(time-fLastTime, fMcEvt->GetTelescopeTheta()*kRad2Deg, w); -
trunk/MagicSoft/Mars/mhist/MHTimeDiffTime.cc
r2173 r2461 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 1/2002 <mailto:tbretz@ uni-sw.gwdg.de>18 ! Author(s): Thomas Bretz 1/2002 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! Author(s): Wolfgang Wittek 1/2002 <mailto:wittek@mppmu.mpg.de> 20 20 ! … … 25 25 26 26 ////////////////////////////////////////////////////////////////////////////// 27 // //28 // MHTimeDiffTime //29 // //30 // calculates the 2D-histogram time-difference vs. time //31 // //32 // //27 // 28 // MHTimeDiffTime 29 // 30 // calculates the 2D-histogram time-difference vs. time 31 // 32 // 33 33 ////////////////////////////////////////////////////////////////////////////// 34 35 34 #include "MHTimeDiffTime.h" 36 35 … … 139 138 Bool_t MHTimeDiffTime::Fill(const MParContainer *par, const Stat_t w) 140 139 { 141 const Double_t time = 200e-9*fTime->GetTimeLo() + fTime->GetTimeHi();140 const Double_t time = *fTime; 142 141 143 142 fHist.Fill(time-fLastTime, time, w); … … 146 145 return kTRUE; 147 146 } 148 149 150 151 -
trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc
r2386 r2461 125 125 Clear(); 126 126 } 127 128 127 129 128 // -------------------------------------------------------------------------- … … 216 215 } 217 216 } 218 *fLog << endl; 217 if (fPixLoGainOn->GetSize()) 218 *fLog << endl; 219 219 } 220 220 … … 226 226 { 227 227 fDAQEvtNumber = uiN; 228 fTrigPattern[0] = (UInt_t) 229 fTrigPattern[1] = (UInt_t) 228 fTrigPattern[0] = (UInt_t)(ulTP/4294967296.0) ; 229 fTrigPattern[1] = (UInt_t)(ulTP-fTrigPattern[0]*4294967296.0); 230 230 } 231 231 … … 239 239 fin.read((char*)&fDAQEvtNumber, 4); // Total=4 240 240 241 UInt_t fAbsTime[2];242 fin.read((char*) fAbsTime,8); // Total=12241 UInt_t abstime[2]; 242 fin.read((char*)abstime, 8); // Total=12 243 243 244 244 // 245 245 // store the time of the event in the corresponding container 246 246 // 247 const Double_t mhz = 9.375; 248 const Double_t t = (Double_t) fAbsTime[0]/mhz;// [ns]247 const Double_t mhz = 9.375; // [1e6 ticks/s] 248 const Double_t t = (Double_t)abstime[0]/mhz; // [ns] 249 249 const UShort_t ns = (UShort_t)fmod(t*1e-3, 1e9); 250 250 const Byte_t s = (Byte_t)fmod(t/1e12, 60); 251 251 const Byte_t m = (Byte_t)fmod(t/60e12, 60); 252 252 const Byte_t h = (Byte_t)(t/3600e12); 253 254 253 fTime->SetTime(h, m, s, ns); 255 fTime->SetTime(fAbsTime[0], fAbsTime[1]);256 254 257 255 Byte_t dummy[4]; 258 259 256 fin.read((char*)&fNumTrigLvl1, 4); // Total=16 260 257 fin.read((char*)&fNumTrigLvl2, 4); // Total=20
Note:
See TracChangeset
for help on using the changeset viewer.