CMS 3D CMS Logo

HcalDbService.h

Go to the documentation of this file.
00001 
00002 //
00003 // F.Ratnikov (UMd), Aug. 9, 2005
00004 //
00005 
00006 #ifndef HcalDbService_h
00007 #define HcalDbService_h
00008 
00009 #include <memory>
00010 #include <map>
00011 
00012 #include "DataFormats/HcalDetId/interface/HcalGenericDetId.h"
00013 #include "CalibFormats/HcalObjects/interface/HcalChannelCoder.h"
00014 #include "CalibFormats/HcalObjects/interface/QieShape.h"
00015 #include "CalibFormats/HcalObjects/interface/HcalCoder.h"
00016 #include "CalibFormats/HcalObjects/interface/HcalCalibrationsSet.h"
00017 
00018 #include "FWCore/Framework/interface/ModuleFactory.h"
00019 #include "FWCore/Framework/interface/ESProducer.h"
00020 
00021 #include "CondFormats/HcalObjects/interface/AllObjects.h"
00022 
00023 class HcalCalibrations;
00024 class HcalCalibrationWidths;
00025 
00026 class HcalDbService {
00027  public:
00028   HcalDbService (const edm::ParameterSet&);
00029 
00030   bool makeHcalCalibrationWidth (const HcalGenericDetId& fId, HcalCalibrationWidths* fObject) const;
00031   const HcalCalibrations& getHcalCalibrations(const HcalGenericDetId& fId) const { return mCalibSet.getCalibrations(fId); }
00032 
00033   const HcalPedestal* getPedestal (const HcalGenericDetId& fId) const;
00034   const HcalPedestalWidth* getPedestalWidth (const HcalGenericDetId& fId) const;
00035   const HcalGain* getGain (const HcalGenericDetId& fId) const;
00036   const HcalGainWidth* getGainWidth (const HcalGenericDetId& fId) const;
00037   const HcalQIECoder* getHcalCoder (const HcalGenericDetId& fId) const;
00038   const HcalQIEShape* getHcalShape () const;
00039   const HcalElectronicsMap* getHcalMapping () const;
00040   const HcalRespCorr* getHcalRespCorr (const HcalGenericDetId& fId) const;
00041   
00042   void setData (const HcalPedestals* fItem) {mPedestals = fItem; buildCalibrations(); }
00043   void setData (const HcalPedestalWidths* fItem) {mPedestalWidths = fItem;}
00044   void setData (const HcalGains* fItem) {mGains = fItem;}
00045   void setData (const HcalGainWidths* fItem) {mGainWidths = fItem;}
00046   void setData (const HcalQIEData* fItem) {mQIEData = fItem; buildCalibrations(); }
00047   void setData (const HcalChannelQuality* fItem) {mChannelQuality = fItem;}
00048   void setData (const HcalElectronicsMap* fItem) {mElectronicsMap = fItem;}
00049   void setData (const HcalRespCorrs* fItem) {mRespCorrs = fItem;}
00050   void setData (const HcalZSThresholds* fItem) {mZSThresholds = fItem;}
00051 
00052  private:
00053   bool makeHcalCalibration (const HcalGenericDetId& fId, HcalCalibrations* fObject) const;
00054   void buildCalibrations();
00055   mutable QieShape* mQieShapeCache;
00056   const HcalPedestals* mPedestals;
00057   const HcalPedestalWidths* mPedestalWidths;
00058   const HcalGains* mGains;
00059   const HcalGainWidths* mGainWidths;
00060   const HcalQIEData* mQIEData;
00061   const HcalChannelQuality* mChannelQuality;
00062   const HcalElectronicsMap* mElectronicsMap;
00063   const HcalRespCorrs* mRespCorrs;
00064   const HcalZSThresholds* mZSThresholds;
00065   bool mPedestalInADC;
00066   HcalCalibrationsSet mCalibSet;
00067 };
00068 
00069 #endif

Generated on Tue Jun 9 17:25:22 2009 for CMSSW by  doxygen 1.5.4