Changeset 2728 for trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc
- Timestamp:
- 12/20/03 13:46:17 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc
r2725 r2728 56 56 // Default constructor. 57 57 // 58 MExtractSignal::MExtractSignal( const Byte_t first, const Byte_t last, const Byte_t logainshift,58 MExtractSignal::MExtractSignal(/*const Byte_t first, const Byte_t last, const Byte_t logainshift,*/ 59 59 const char *name, const char *title) 60 : fNumHiGainSamples(last-first+1), fNumLoGainSamples(last-first+1),60 : /*fNumHiGainSamples(last-first+1), fNumLoGainSamples(last-first+1),*/ 61 61 fSaturationLimit(254) 62 62 { … … 67 67 AddToBranchList("MRawEvtData.*"); 68 68 69 SetRange(); 70 /* 71 fFirst = first; 72 fLoGainFirst = first+logainshift; 73 74 fSqrtHiGainSamples = TMath::Sqrt((Float_t)fNumHiGainSamples); 75 fSqrtLoGainSamples = TMath::Sqrt((Float_t)fNumLoGainSamples); 76 */ 77 } 78 79 void MExtractSignal::SetRange(Byte_t first, Byte_t last, Byte_t logainshift) 80 { 81 fNumHiGainSamples = last-first+1; 82 fNumLoGainSamples = last-first+1; 83 69 84 fFirst = first; 70 85 fLoGainFirst = first+logainshift; 71 86 72 fSqrtHiGainSamples = TMath::Sqrt((Float_t)fNumHiGainSamples); 73 fSqrtLoGainSamples = TMath::Sqrt((Float_t)fNumLoGainSamples); 87 fSqrtHiGainSamples = TMath::Sqrt((Float_t)fNumHiGainSamples); 88 fSqrtLoGainSamples = TMath::Sqrt((Float_t)fNumLoGainSamples); 74 89 } 75 90 … … 87 102 Int_t MExtractSignal::PreProcess(MParList *pList) 88 103 { 89 90 104 fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData"); 91 105 if (!fRawEvt) 92 106 { 93 *fLog << dbginf<< "MRawEvtData not found... aborting." << endl;107 *fLog << err << "MRawEvtData not found... aborting." << endl; 94 108 return kFALSE; 95 109 } … … 103 117 if (!fPedestals) 104 118 { 105 *fLog << err << dbginf << "Cannot find MPedestalCam... aborting" << endl;119 *fLog << err << "MPedestalCam not found... aborting" << endl; 106 120 return kFALSE; 107 121 } … … 118 132 Bool_t MExtractSignal::ReInit(MParList *pList ) 119 133 { 120 121 122 134 MGeomCam *cam = (MGeomCam*)pList->FindObject(AddSerialNumber("MGeomCam")); 123 135 if (!cam) … … 127 139 } 128 140 141 // FIXME: This solution may change in the future, MExtractedSignal 142 // must be similar to MCerPhotEvt not to MPedestalCam 143 // (Have to think about the mean size of both solutions) 129 144 fSignals->InitSize(cam->GetNumPixels()); 130 145 131 132 fSignals->SetNumUsedFADCSlices(fNumHiGainSamples,fFirst,fFirst+fNumHiGainSamples-1, 133 fNumLoGainSamples,fFirst,fFirst+fNumLoGainSamples-1); 146 fSignals->SetNumUsedFADCSlices(fNumHiGainSamples, fFirst, fFirst+fNumHiGainSamples-1, 147 fNumLoGainSamples, fFirst, fFirst+fNumLoGainSamples-1); 134 148 135 149 return kTRUE; … … 144 158 Int_t MExtractSignal::Process() 145 159 { 146 147 160 MRawEvtPixelIter pixel(fRawEvt); 148 161 fSignals->Clear(); 149 162 150 163 while (pixel.Next()) 151 { 152 164 { 153 165 UShort_t satHi = 0; 154 166 UShort_t satLo = 0; … … 219 231 ); 220 232 221 pix.SetGainSaturation((satHi),satHi,satLo); 222 233 pix.SetGainSaturation(satHi, satHi, satLo); 234 235 // FIXME: Arrival time has to be stored in MArrivalTime! 223 236 if (satHi) 224 237 pix.SetArrivalTimes((Float_t)(midlo+fFirst),0.,0.); … … 233 246 return kTRUE; 234 247 } 235 236 Int_t MExtractSignal::PostProcess()237 {238 239 return kTRUE;240 241 }
Note:
See TracChangeset
for help on using the changeset viewer.