Changeset 3880 for trunk/MagicSoft
- Timestamp:
- 04/29/04 13:44:53 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3879 r3880 22 22 * msignal/MExtractor.h 23 23 - make SetRange virtual 24 - check for range w.r.t. ranges given in the run header in ReInit 24 25 25 26 * msignal/MExtractFixedWindow.[h,cc] -
trunk/MagicSoft/Mars/msignal/MExtractor.cc
r3878 r3880 57 57 #include "MRawEvtData.h" 58 58 #include "MRawEvtPixelIter.h" 59 #include "MRawRunHeader.h" 59 60 60 61 #include "MPedestalCam.h" … … 110 111 Int_t MExtractor::PreProcess(MParList *pList) 111 112 { 113 112 114 fRawEvt = (MRawEvtData*)pList->FindObject(AddSerialNumber("MRawEvtData")); 113 115 if (!fRawEvt) 114 {116 { 115 117 *fLog << err << AddSerialNumber("MRawEvtData") << " not found... aborting." << endl; 116 118 return kFALSE; 117 } 118 119 } 120 121 fRunHeader = (MRawRunHeader*)pList->FindObject(AddSerialNumber("MRawRunHeader")); 122 if (!fRunHeader) 123 { 124 *fLog << err << AddSerialNumber("MRawRunHeader") << " not found... aborting." << endl; 125 return kFALSE; 126 } 127 119 128 120 129 fSignals = (MExtractedSignalCam*)pList->FindCreateObj(AddSerialNumber("MExtractedSignalCam")); … … 135 144 return kTRUE; 136 145 } 146 147 Bool_t MExtractor::ReInit(MParList *pList) 148 { 149 150 Int_t lastdesired = (Int_t)fHiGainLast; 151 Int_t lastavailable = (Int_t)fRunHeader->GetNumSamplesHiGain()-1; 152 153 if (lastdesired > lastavailable) 154 { 155 const Int_t diff = lastdesired - lastavailable; 156 *fLog << endl; 157 *fLog << warn << GetDescriptor() 158 << Form("%s%2i%s%2i%s%2i%s",": Selected Hi Gain FADC Window [", 159 (int)fHiGainFirst,",",lastdesired, 160 "] ranges out of the available limits: [0,",lastavailable,"].") << endl; 161 *fLog << GetDescriptor() << ": Will reduce the upper edge to " << (int)(fHiGainLast - diff) << endl; 162 SetRange(fHiGainFirst, fHiGainLast-diff, fLoGainFirst, fLoGainLast); 163 } 164 165 lastdesired = (Int_t)(fLoGainLast); 166 lastavailable = (Int_t)fRunHeader->GetNumSamplesLoGain()-1; 167 168 if (lastdesired > lastavailable) 169 { 170 const Int_t diff = lastdesired - lastavailable; 171 *fLog << endl; 172 *fLog << warn << GetDescriptor() 173 << Form("%s%2i%s%2i%s%2i%s",": Selected Lo Gain FADC Window [", 174 (int)fLoGainFirst,",",lastdesired, 175 "] ranges out of the available limits: [0,",lastavailable,"].") << endl; 176 *fLog << GetDescriptor() << ": Will reduce the upper edge to " << (int)(fLoGainLast - diff) << endl; 177 SetRange(fHiGainFirst, fHiGainLast, fLoGainFirst, fLoGainLast-diff); 178 } 179 180 return kTRUE; 181 } 182 183 137 184 138 185 void MExtractor::FindSignalHiGain(Byte_t *firstused, Int_t &sum, Byte_t &sat) const -
trunk/MagicSoft/Mars/msignal/MExtractor.h
r3878 r3880 49 49 50 50 virtual Int_t PreProcess(MParList *pList); 51 virtual Bool_t ReInit(MParList *pList); 51 52 virtual Int_t Process(); 52 53 virtual void StreamPrimitive(ofstream &out) const;
Note:
See TracChangeset
for help on using the changeset viewer.