Changeset 8618 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 06/28/07 21:30:25 (17 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrateRelTimes.cc
r7876 r8618 60 60 #include "MSignalPix.h" 61 61 62 #include "MRawRunHeader.h" 63 62 64 ClassImp(MCalibrateRelTimes); 63 65 … … 86 88 { 87 89 fSignals = (MArrivalTimeCam*)pList->FindObject(AddSerialNumber("MArrivalTimeCam")); 88 89 90 if (!fSignals) 90 91 { … … 99 100 fCalibrations = (MCalibrationRelTimeCam*)pList->FindObject(AddSerialNumber("MCalibrationRelTimeCam")); 100 101 if (!fCalibrations) 101 102 { 102 103 *fLog << err << AddSerialNumber("MCalibrationRelTimeCam") << " not found ... aborting." << endl; 103 104 return kFALSE; 104 105 } 105 106 106 107 fArrivalTime = (MSignalCam*)pList->FindCreateObj(AddSerialNumber("MSignalCam")); … … 108 109 return kFALSE; 109 110 111 return kTRUE; 112 } 113 114 Bool_t MCalibrateRelTimes::ReInit(MParList *pList) 115 { 116 MRawRunHeader *runheader = (MRawRunHeader*)pList->FindObject(AddSerialNumber("MRawRunHeader")); 117 if (!runheader) 118 { 119 *fLog << err << AddSerialNumber("MRawRunHeader") << " not found ... aborting." << endl; 120 return kFALSE; 121 } 122 123 fFreq = runheader->GetFreqSampling(); 124 110 125 return kTRUE; 111 126 } … … 131 146 const Float_t offset = pix.GetTimeOffset(); 132 147 133 (*fArrivalTime)[idx].SetArrivalTime(signal-offset); 148 // convert from slices to ns 149 const Float_t time = 1000*(signal-offset)/fFreq; // [ns] 150 151 (*fArrivalTime)[idx].SetArrivalTime(time); 134 152 135 153 // FIXME: Is this necessary or explicitly done by the signal- -
trunk/MagicSoft/Mars/mcalib/MCalibrateRelTimes.h
r7829 r8618 10 10 class MCalibrationRelTimeCam; 11 11 class MArrivalTimeCam; 12 class MRawRunHeader; 12 13 class MSignalCam; 13 14 … … 21 22 MSignalCam *fArrivalTime; // Calibrated arrival times 22 23 23 Int_t PreProcess(MParList *pList); 24 Int_t Process(); 24 UShort_t fFreq; //! [MHz] Sampling Frequency 25 26 Int_t PreProcess(MParList *pList); 27 Bool_t ReInit(MParList *pList); 28 Int_t Process(); 25 29 26 30 public:
Note:
See TracChangeset
for help on using the changeset viewer.