CMS 3D CMS Logo

L1GctConfigProducers.cc

Go to the documentation of this file.
00001 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00002 #include "FWCore/Utilities/interface/Exception.h"
00003 
00004 #include "L1TriggerConfig/GctConfigProducers/interface/L1GctConfigProducers.h"
00005 
00006 #include "L1TriggerConfig/GctConfigProducers/interface/L1GctCalibFunConfigurer.h"
00007 #include "L1TriggerConfig/GctConfigProducers/interface/L1GctJctSetupConfigurer.h"
00008 #include "L1TriggerConfig/GctConfigProducers/interface/L1GctJfParamsConfigurer.h"
00009 #include "L1TriggerConfig/GctConfigProducers/interface/L1GctHfLutSetupConfigurer.h"
00010 
00011 #include "CondFormats/DataRecord/interface/L1GctJetFinderParamsRcd.h"
00012 #include "CondFormats/DataRecord/interface/L1GctJetCounterNegativeEtaRcd.h"
00013 #include "CondFormats/DataRecord/interface/L1GctJetCounterPositiveEtaRcd.h"
00014 #include "CondFormats/DataRecord/interface/L1GctJetCalibFunRcd.h"
00015 #include "CondFormats/DataRecord/interface/L1GctHfLutSetupRcd.h"
00016 #include "CondFormats/DataRecord/interface/L1JetEtScaleRcd.h"
00017 #include "CondFormats/DataRecord/interface/L1GctChannelMaskRcd.h"
00018 
00019 #include "CondFormats/L1TObjects/interface/L1GctChannelMask.h"
00020 
00021 //
00022 // constants, enums and typedefs
00023 //
00024 
00025 //
00026 // static data member definitions
00027 //
00028 
00029 //
00030 // constructors and destructor
00031 //
00032 L1GctConfigProducers::L1GctConfigProducers(const edm::ParameterSet& iConfig) :
00033   m_CalibFunConf(new L1GctCalibFunConfigurer(iConfig)),
00034   m_JctSetupConfNegativeEta(new L1GctJctSetupConfigurer(iConfig.getParameter<edm::ParameterSet>("jetCounterSetup").getParameter< std::vector<edm::ParameterSet> >("jetCountersNegativeWheel"))),
00035   m_JctSetupConfPositiveEta(new L1GctJctSetupConfigurer(iConfig.getParameter<edm::ParameterSet>("jetCounterSetup").getParameter< std::vector<edm::ParameterSet> >("jetCountersPositiveWheel"))),
00036   m_JfParamsConf(new L1GctJfParamsConfigurer(iConfig)),
00037   m_HfLSetupConf(new L1GctHfLutSetupConfigurer(iConfig))
00038 {
00039    //the following lines are needed to tell the framework what
00040    // data is being produced
00041    setWhatProduced(this,&L1GctConfigProducers::produceCalibFun);
00042    setWhatProduced(this,&L1GctConfigProducers::produceJfParams);
00043    setWhatProduced(this,&L1GctConfigProducers::produceJCNegEta);
00044    setWhatProduced(this,&L1GctConfigProducers::produceJCPosEta);
00045    setWhatProduced(this,&L1GctConfigProducers::produceHfLSetup);
00046    setWhatProduced(this,&L1GctConfigProducers::produceChanMask);
00047 
00048    //now do what ever other initialization is needed
00049 
00050 }
00051 
00052 
00053 L1GctConfigProducers::~L1GctConfigProducers()
00054 {
00055  
00056    // do anything here that needs to be done at desctruction time
00057    // (e.g. close files, deallocate resources etc.)
00058 
00059   if (m_CalibFunConf != 0) { delete m_CalibFunConf; }
00060   if (m_JctSetupConfNegativeEta != 0) { delete m_JctSetupConfNegativeEta; }
00061   if (m_JctSetupConfPositiveEta != 0) { delete m_JctSetupConfPositiveEta; }
00062   if (m_JfParamsConf != 0) { delete m_JfParamsConf; }
00063   if (m_HfLSetupConf != 0) { delete m_HfLSetupConf; }
00064 
00065 }
00066 
00067 // The producer methods are handled by the "Configurer" objects
00068 
00069 L1GctConfigProducers::
00070 CalibFunReturnType L1GctConfigProducers::produceCalibFun(const L1GctJetCalibFunRcd& aRcd)
00071         {
00072           const L1CaloGeometryRecord& geomRcd =
00073             aRcd.getRecord< L1CaloGeometryRecord >() ;
00074           edm::ESHandle< L1CaloGeometry > geom ;
00075           geomRcd.get( geom ) ;
00076           return m_CalibFunConf->produceCalibFun( geom.product() ); }
00077 
00078 L1GctConfigProducers::
00079 JCtSetupReturnType L1GctConfigProducers::produceJCNegEta(const L1GctJetCounterNegativeEtaRcd&)
00080         { return m_JctSetupConfNegativeEta->produceJctSetup(); }
00081 
00082 L1GctConfigProducers::
00083 JCtSetupReturnType L1GctConfigProducers::produceJCPosEta(const L1GctJetCounterPositiveEtaRcd&)
00084         { return m_JctSetupConfPositiveEta->produceJctSetup(); }
00085 
00086 L1GctConfigProducers::
00087 JfParamsReturnType L1GctConfigProducers::produceJfParams(const L1GctJetFinderParamsRcd&)
00088         { return m_JfParamsConf->produceJfParams(); }
00089 
00090 L1GctConfigProducers::
00091 HfLSetupReturnType L1GctConfigProducers::produceHfLSetup(const L1GctHfLutSetupRcd&)
00092         { return m_HfLSetupConf->produceHfLutSetup(); }
00093 
00094 L1GctConfigProducers::
00095 ChanMaskReturnType L1GctConfigProducers::produceChanMask(const L1GctChannelMaskRcd&) {
00096   return boost::shared_ptr<L1GctChannelMask>(new L1GctChannelMask);
00097 }
00098 
00099 
00100 
00101 
00102 //define this as a plug-in
00103 DEFINE_FWK_EVENTSETUP_MODULE(L1GctConfigProducers);

Generated on Tue Jun 9 17:40:27 2009 for CMSSW by  doxygen 1.5.4