Changeset 8888 for trunk/MagicSoft/Mars/mpedestal
- Timestamp:
- 05/14/08 12:03:25 (17 years ago)
- Location:
- trunk/MagicSoft/Mars/mpedestal
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mpedestal/MPedestalSubtract.cc
r8795 r8888 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MPedestalSubtract.cc,v 1. 9 2007-12-19 18:53:03tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MPedestalSubtract.cc,v 1.10 2008-05-14 11:03:24 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 20 20 ! Author(s): Thomas Bretz, 10/2006 <mailto:tbretz@astro.uni-wuerzburg.de> 21 21 ! 22 ! Copyright: MAGIC Software Development, 2000-200 622 ! Copyright: MAGIC Software Development, 2000-2008 23 23 ! 24 24 ! … … 51 51 #include "MArrayB.h" 52 52 53 #include "MRawRunHeader.h" 53 54 #include "MRawEvtData.h" 54 55 #include "MRawEvtPixelIter.h" … … 141 142 } 142 143 144 Bool_t MPedestalSubtract::ReInit(MParList *pList) 145 { 146 fRunHeader = (MRawRunHeader*)pList->FindObject(AddSerialNumber("MRawRunHeader")); 147 if (!fRunHeader) 148 { 149 *fLog << err << AddSerialNumber("MRawRunHeader") << " not found... aborting." << endl; 150 return kFALSE; 151 } 152 return kTRUE; 153 } 154 143 155 // -------------------------------------------------------------------------- 144 156 // … … 150 162 const Int_t numl = fRawEvt->GetNumLoGainSamples(); 151 163 164 // Check if event is empty (presumably MC event -- sanity check) 165 if (numh+numl==0) 166 return kCONTINUE; 167 168 // Check for consistency (our simulation can do weird things!) 169 if (numh!=fRunHeader->GetNumSamplesHiGain()) 170 { 171 *fLog << warn << "WARNING - Number of hi-gain samples (" << numh << ") "; 172 *fLog << " doesn't match run-header (" << fRunHeader->GetNumSamplesHiGain() << ")." << endl; 173 } 174 if (numl!=fRunHeader->GetNumSamplesLoGain()) 175 { 176 *fLog << warn << "WARNING - Number of lo-gain samples (" << numl << ") "; 177 *fLog << " doesn't match run-header (" << fRunHeader->GetNumSamplesLoGain() << ")." << endl; 178 } 179 180 // Get scale between FADC units and 256 ;-) 152 181 const UInt_t scale = fRawEvt->GetScale(); 153 182 -
trunk/MagicSoft/Mars/mpedestal/MPedestalSubtract.h
r8633 r8888 6 6 #endif 7 7 8 class MRawRunHeader; 8 9 class MRawEvtData; 9 10 class MPedestalCam; … … 16 17 static const TString fgNamePedestalSubtractedEvt; //! "MPedestalSubtractedEvt" 17 18 19 MRawRunHeader *fRunHeader; //! Run Header 18 20 MRawEvtData *fRawEvt; //! Input Raw data 19 21 MPedestalCam *fPedestals; //! Pedestals of all pixels in the camera … … 24 26 25 27 Int_t PreProcess(MParList *pList); 28 Bool_t ReInit(MParList *pList); 26 29 Int_t Process(); 27 30
Note:
See TracChangeset
for help on using the changeset viewer.