#ifndef _TOWERCORRMAKER_HH_ #define _TOWERCORRMAKER_HH_ //////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Component: TowerCorrMaker.hh // Purpose: This is the class that makes the collections of CEM,PEM, // PPR,WHA,PHA LER corrections that are added into the // begin run baggie. The calibrations are from the DB. // // Created: 06/06/99 Pierre Savard, based on CalBankMaker class by // Pasha Murat, Jodi Lamoureux. // History: 09/09/99 Pierre Savard: Accomodate new EDM // 06/30/03 Beate, Willis: Complete re-write for the // CEM,PEM,PPR,WHA,PHATowerCorrColl objects // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// #include #include #include #include // ROOT Headers #include "TROOT.h" // CdfEdm2 Headers #include "StorableBanks/StorableBank.hh" #include "StorableBanks/ConstGrandBankIterI2s1.hh" #include "StorableBanks/GrandBankIterI2s1.hh" #include "Edm/EventRecord.hh" #include "Edm/GenericConstHandle.hh" #include "Edm/ConstHandle.hh" #include "Edm/Handle.hh" #include "CalorGeometry/TowerGeometry.hh" #include "CalorObjects/CEMTowerCorrColl.hh" #include "CalorObjects/CHATowerCorrColl.hh" #include "CalorObjects/WHATowerCorrColl.hh" #include "CalorObjects/PEMTowerCorrColl.hh" #include "CalorObjects/PHATowerCorrColl.hh" #include "CalorObjects/PPRTowerCorrColl.hh" #include "CalorObjects/MPATowerCorrColl.hh" #include "CalorObjects/Calib.hh" #include "CalorObjects/CalThresholds.hh" #include "CalorGeometry/CalConstants.hh" #include "CalorGeometry/CalParameters.hh" class AbsEvent; #include // namespace calor { class TowerCorrMaker { public: // // Memory management // TowerCorrMaker(); // constructors ~TowerCorrMaker(); // destructor // compiler generated default copy c'tor void initJob(); // init Run routine: // Load the calibration constants. void initRun(); void initRun(bool verbose); void initRun(bool verbose, bool accDB); void initRun(bool verbose, bool accDB, bool makeMPA); // event init and end routines. void initEvent(AbsEvent* Event); void endEvent(AbsEvent* Event, bool verbose); int makeTowerCorr(bool verbose, bool makeMPA); int writeTowerCorr(AbsEvent *anEvent, bool verbose); // // Testing // // // Manipulation and acces // Handle& cemcontents() ; Handle& chacontents() ; Handle& whacontents() ; Handle& pemcontents() ; Handle& phacontents() ; Handle& pprcontents() ; Handle& mpacontents() ; bool dbInitialized() const; // // Printing // // friend std::ostream& operator<<(std::ostream& os, const TowerCorrMaker& s); protected: void destroy() { } private: Handle _CEMtowerCorr; Handle _CHAtowerCorr; Handle _WHAtowerCorr; Handle _PEMtowerCorr; Handle _PHAtowerCorr; Handle _PPRtowerCorr; Handle _MPAtowerCorr; Calib _calib; bool _dbInitialized; }; // } // namespace calor inline Handle& TowerCorrMaker::cemcontents() {return _CEMtowerCorr;} inline Handle& TowerCorrMaker::chacontents() {return _CHAtowerCorr;} inline Handle& TowerCorrMaker::whacontents() {return _WHAtowerCorr;} inline Handle& TowerCorrMaker::pemcontents() {return _PEMtowerCorr;} inline Handle& TowerCorrMaker::phacontents() {return _PHAtowerCorr;} inline Handle& TowerCorrMaker::pprcontents() {return _PPRtowerCorr;} inline Handle& TowerCorrMaker::mpacontents() {return _MPAtowerCorr;} inline bool TowerCorrMaker::dbInitialized() const {return _dbInitialized;} #endif // _TOWERCORRMAKER_HH_