Changeset 6321
- Timestamp:
- 02/09/05 21:30:26 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r6320 r6321 53 53 * mcalib/MCalibrationQECamMagic.cc 54 54 - updated five pixels 55 56 * mpedestal/MExtractPedestal.[h,cc] 57 - included possibility for intermediate pedestal cam (not yet used) 55 58 56 59 -
trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.cc
r5832 r6321 189 189 // 190 190 MExtractPedestal::MExtractPedestal(const char *name, const char *title) 191 : f RandomCalculation(kTRUE), fGeom(NULL), fPedestalsIn(NULL), fPedestalsOut(NULL),191 : fGeom(NULL), fPedestalsIn(NULL), fPedestalsInter(NULL), fPedestalsOut(NULL), 192 192 fExtractor(NULL), fExtractWinFirst(0), fExtractWinSize(0) 193 193 { … … 199 199 AddToBranchList("fHiGainFadcSamples"); 200 200 AddToBranchList("fLoGainFadcSamples"); 201 202 SetPedestalUpdate(kTRUE); 201 202 SetIntermediateStorage( kFALSE ); 203 SetPedestalUpdate ( kTRUE ); 204 SetRandomCalculation ( kTRUE ); 203 205 204 206 SetNamePedestalCamIn(); … … 239 241 // - fRunHeader to NULL 240 242 // - fEvtHeader to NULL 241 // - fPedestalsIn to NULL242 // - fPedestalsOut to NULL243 243 // 244 244 void MExtractPedestal::Clear(const Option_t *o) … … 347 347 return kFALSE; 348 348 } 349 } 350 351 if (!fPedestalsInter && fIntermediateStorage) 352 { 353 fPedestalsInter = (MPedestalCam*)pList->FindCreateObj("MPedestalCam", AddSerialNumber(fNamePedestalCamInter)); 354 if (!fPedestalsInter) 355 return kFALSE; 349 356 } 350 357 … … 447 454 Int_t MExtractPedestal::PostProcess() 448 455 { 449 450 456 fPedestalsIn = NULL; 457 return kTRUE; 451 458 } 452 459 … … 493 500 } 494 501 502 if (IsEnvDefined(env, prefix, "IntermediateStorage", print)) 503 { 504 SetIntermediateStorage(GetEnvValue(env, prefix, "IntermediateStorage", fIntermediateStorage)); 505 rc = kTRUE; 506 } 507 495 508 // find resource for random calculation 496 509 if (IsEnvDefined(env, prefix, "RandomCalculation", print)) … … 523 536 } 524 537 538 if (IsEnvDefined(env, prefix, "NamePedestalCamInter", print)) 539 { 540 SetNamePedestalCamInter(GetEnvValue(env, prefix, "NamePedestalCamInter", fNamePedestalCamInter)); 541 rc = kTRUE; 542 } 543 525 544 if (IsEnvDefined(env, prefix, "NamePedestalCamOut", print)) 526 545 { … … 651 670 *fLog << GetDescriptor() << ":" << endl; 652 671 *fLog << "Name of input MPedestalCam: " << (fPedestalsIn?fPedestalsIn->GetName():fNamePedestalCamIn.Data()) << " (" << fPedestalsIn << ")" << endl; 672 *fLog << "Name of interm. MPedestalCam: " << (fPedestalsInter?fPedestalsInter->GetName():fNamePedestalCamInter.Data()) << " (" << fPedestalsInter << ")" << endl; 653 673 *fLog << "Name of output MPedestalCam: " << (fPedestalsOut?fPedestalsOut->GetName():fNamePedestalCamOut.Data()) << " (" << fPedestalsOut << ")" << endl; 674 *fLog << "Intermediate Storage is " << (fIntermediateStorage?"on":"off") << endl; 654 675 *fLog << "Pedestal Update is " << (fPedestalUpdate?"on":"off") << endl; 655 676 if (fPedestalUpdate) -
trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.h
r5715 r6321 26 26 static const TString fgNamePedestalCam; //! "MPedestalCam" 27 27 28 TString fNamePedestalCamIn; // name of the incoming 'MPedestalCam' container 29 TString fNamePedestalCamOut; // name of the outgoing 'MPedestalCam' container 28 TString fNamePedestalCamIn; // Name of the incoming 'MPedestalCam' container 29 TString fNamePedestalCamOut; // Name of the outgoing 'MPedestalCam' container 30 TString fNamePedestalCamInter; // Name of the intermediate 'MPedestalCam' container 30 31 31 Bool_t fRandomCalculation; // Is pedestalextraction by extractor random?32 32 Bool_t fRandomCalculation; // Is pedestalextraction by extractor random? 33 33 34 protected: 34 35 35 MGeomCam *fGeom; //! Camera geometry 36 MPedestalCam *fPedestalsIn; //! Pedestals of all pixels in the camera 37 MPedestalCam *fPedestalsOut; //! Pedestals of all pixels in the camera 38 MRawEvtData *fRawEvt; //! Raw event data (time slices) 39 MRawRunHeader *fRunHeader; //! RunHeader information 40 MRawEvtHeader *fEvtHeader; //! EvtHeader information 41 MExtractTimeAndCharge *fExtractor; // Possible Extractor used 36 Bool_t fIntermediateStorage; // Is pedestal stored every event? 37 38 MGeomCam *fGeom; //! Camera geometry 39 MPedestalCam *fPedestalsIn; //! Pedestals of all pixels in the camera (incoming) 40 MPedestalCam *fPedestalsInter; //! Pedestals of all pixels in the camera (intermediate) 41 MPedestalCam *fPedestalsOut; //! Pedestals of all pixels in the camera (outgoing) 42 MRawEvtData *fRawEvt; //! Raw event data (time slices) 43 MRawRunHeader *fRunHeader; //! RunHeader information 44 MRawEvtHeader *fEvtHeader; //! EvtHeader information 45 MExtractTimeAndCharge *fExtractor; // Possible Extractor 42 46 43 UShort_t fExtractWinFirst; // First FADC slice to extract pedestal from 44 UShort_t fExtractWinSize; // Number of slices to calculate the pedestal from 45 UShort_t fExtractWinLast; // Last FADC slice to extract pedestal from 47 UShort_t fExtractWinFirst; // First FADC slice to extract pedestal from 48 UShort_t fExtractWinSize; // Number of slices to calculate the pedestal from 49 UShort_t fExtractWinLast; // Last FADC slice to extract pedestal from 50 51 UInt_t fNumEventsDump; // Number of event after which MPedestalCam gets updated 52 UInt_t fNumAreasDump; // Number of events after which averaged areas gets updated 53 UInt_t fNumSectorsDump; // Number of events after which averaged sectors gets updated 54 55 Bool_t fPedestalUpdate; // Flag if the pedestal shall be updated after every fNumEventsDump 46 56 47 UInt_t fNumEventsDump; // Number of event after which MPedestalCam gets updated 48 UInt_t fNumAreasDump; // Number of events after which averaged areas gets updated 49 UInt_t fNumSectorsDump; // Number of events after which averaged sectors gets updated 50 51 Bool_t fPedestalUpdate; // Flag if the pedestal shall be updated after every fNumEventsDump 52 53 MArrayD fSumx; // sum of values 54 MArrayD fSumx2; // sum of squared values 55 MArrayD fSumAB0; // sum of ABFlag=0 slices 56 MArrayD fSumAB1; // sum of ABFlag=1 slices 57 MArrayD fAreaSumx; // averaged sum of values per area idx 58 MArrayD fAreaSumx2; // averaged sum of squared values per area idx 59 MArrayD fAreaSumAB0; // averaged sum of ABFlag=0 slices per area idx 60 MArrayD fAreaSumAB1; // averaged sum of ABFlag=1 slices per area idx 61 MArrayI fAreaFilled; // number of valid entries with area idx 62 MArrayI fAreaValid; // number of valid pixels within area idx 63 MArrayD fSectorSumx; // averaged sum of values per sector 64 MArrayD fSectorSumx2; // averaged sum of squared values per sector 65 MArrayD fSectorSumAB0; // averaged sum of ABFlag=0 slices per sector 66 MArrayD fSectorSumAB1; // averaged sum of ABFlag=1 slices per sector 67 MArrayI fSectorFilled; // number of valid entries with sector idx 68 MArrayI fSectorValid; // number of valid pixels within sector idx 57 MArrayD fSumx; // sum of values 58 MArrayD fSumx2; // sum of squared values 59 MArrayD fSumAB0; // sum of ABFlag=0 slices 60 MArrayD fSumAB1; // sum of ABFlag=1 slices 61 MArrayD fAreaSumx; // averaged sum of values per area idx 62 MArrayD fAreaSumx2; // averaged sum of squared values per area idx 63 MArrayD fAreaSumAB0; // averaged sum of ABFlag=0 slices per area idx 64 MArrayD fAreaSumAB1; // averaged sum of ABFlag=1 slices per area idx 65 MArrayI fAreaFilled; // number of valid entries with area idx 66 MArrayI fAreaValid; // number of valid pixels within area idx 67 MArrayD fSectorSumx; // averaged sum of values per sector 68 MArrayD fSectorSumx2; // averaged sum of squared values per sector 69 MArrayD fSectorSumAB0; // averaged sum of ABFlag=0 slices per sector 70 MArrayD fSectorSumAB1; // averaged sum of ABFlag=1 slices per sector 71 MArrayI fSectorFilled; // number of valid entries with sector idx 72 MArrayI fSectorValid; // number of valid pixels within sector idx 69 73 70 74 // MTask virtual functions … … 92 96 Bool_t SetExtractWindow(UShort_t first, UShort_t size); 93 97 94 void SetNumEventsDump (UInt_t dumpevents=500) { fNumEventsDump = dumpevents; }95 void SetNumAreasDump (UInt_t dumpevents=500) { fNumAreasDump = dumpevents; }98 void SetNumEventsDump (UInt_t dumpevents=500) { fNumEventsDump = dumpevents; } 99 void SetNumAreasDump (UInt_t dumpevents=500) { fNumAreasDump = dumpevents; } 96 100 void SetNumSectorsDump(UInt_t dumpevents=500) { fNumSectorsDump = dumpevents; } 97 void SetNumDump(UInt_t n=500) { fNumEventsDump=n; fNumAreasDump=n; fNumSectorsDump=n; } 98 void SetPedestalUpdate (Bool_t pedupdate=kTRUE) { fPedestalUpdate = pedupdate; } 101 void SetNumDump (UInt_t n=500) { fNumEventsDump=n; fNumAreasDump=n; fNumSectorsDump=n; } 99 102 100 void SetNamePedestalCamIn(const char *name=fgNamePedestalCam.Data()) { fNamePedestalCamIn = name; } 101 void SetNamePedestalCamOut(const char *name=fgNamePedestalCam.Data()) { fNamePedestalCamOut = name; } 103 // names 104 void SetNamePedestalCamIn (const char *name=fgNamePedestalCam.Data()) { fNamePedestalCamIn = name; } 105 void SetNamePedestalCamInter(const char *name=fgNamePedestalCam.Data()) { fNamePedestalCamInter = name; } 106 void SetNamePedestalCamOut (const char *name=fgNamePedestalCam.Data()) { fNamePedestalCamOut = name; } 102 107 103 void SetPedestalsIn(MPedestalCam *pedcam) { fPedestalsIn = pedcam; } 104 void SetPedestalsOut(MPedestalCam *pedcam) { fPedestalsOut = pedcam; } 108 // pointers 109 void SetExtractor ( MExtractTimeAndCharge *e) { fExtractor = e; } 110 void SetPedestalsIn ( MPedestalCam *pedcam ) { fPedestalsIn = pedcam; } 111 void SetPedestalsInter( MPedestalCam *pedcam ) { fPedestalsInter = pedcam; } 112 void SetPedestalsOut ( MPedestalCam *pedcam ) { fPedestalsOut = pedcam; } 105 113 106 void SetExtractor(MExtractTimeAndCharge *e) { fExtractor = e; } 107 void SetRandomCalculation(Bool_t b=kTRUE) { fRandomCalculation = b; } 114 // flags 115 void SetIntermediateStorage (Bool_t b=kTRUE) { fIntermediateStorage = b; } 116 void SetPedestalUpdate (Bool_t b=kTRUE) { fPedestalUpdate = b; } 117 void SetRandomCalculation (Bool_t b=kTRUE) { fRandomCalculation = b; } 108 118 109 119 ClassDef(MExtractPedestal, 0) // Base class for pedestal extractors
Note:
See TracChangeset
for help on using the changeset viewer.