CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/L1TriggerConfig/RPCTriggerConfig/src/RPCObjectKeysOnlineProd.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:    L1TriggerConfig
00004 // Class:      RPCObjectKeysOnlineProd
00005 // 
00013 //
00014 // Original Author:  Werner Man-Li Sun
00015 //         Created:  Thu Oct  2 19:35:26 CEST 2008
00016 // $Id: RPCObjectKeysOnlineProd.cc,v 1.4 2010/02/26 16:06:38 michals Exp $
00017 //
00018 //
00019 
00020 
00021 // system include files
00022 
00023 // user include files
00024 #include "CondTools/L1Trigger/interface/L1ObjectKeysOnlineProdBase.h"
00025 
00026 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00027 
00028 //
00029 // class declaration
00030 //
00031 
00032 class RPCObjectKeysOnlineProd : public L1ObjectKeysOnlineProdBase {
00033    public:
00034       RPCObjectKeysOnlineProd(const edm::ParameterSet&);
00035       ~RPCObjectKeysOnlineProd();
00036 
00037       virtual void fillObjectKeys( ReturnType pL1TriggerKey ) ;
00038    private:
00039       // ----------member data ---------------------------
00040   bool m_enableL1RPCConfig ;
00041   bool m_enableL1RPCConeDefinition ;
00042   bool m_enableL1RPCHsbConfig ;
00043   bool m_enableL1RPCBxOrConfig ;
00044 };
00045 
00046 //
00047 // constants, enums and typedefs
00048 //
00049 
00050 //
00051 // static data member definitions
00052 //
00053 
00054 //
00055 // constructors and destructor
00056 //
00057 RPCObjectKeysOnlineProd::RPCObjectKeysOnlineProd(const edm::ParameterSet& iConfig)
00058   : L1ObjectKeysOnlineProdBase( iConfig ),
00059     m_enableL1RPCConfig( iConfig.getParameter< bool >( "enableL1RPCConfig" ) ),
00060     m_enableL1RPCConeDefinition( iConfig.getParameter< bool >( "enableL1RPCConeDefinition" ) ),
00061     m_enableL1RPCHsbConfig( iConfig.getParameter< bool >( "enableL1RPCHsbConfig" ) ),
00062     m_enableL1RPCBxOrConfig( iConfig.getParameter< bool >( "enableL1RPCBxOrConfig" ) )
00063 {}
00064 
00065 
00066 RPCObjectKeysOnlineProd::~RPCObjectKeysOnlineProd()
00067 {
00068  
00069    // do anything here that needs to be done at desctruction time
00070    // (e.g. close files, deallocate resources etc.)
00071 
00072 }
00073 
00074 
00075 //
00076 // member functions
00077 //
00078 
00079 // ------------ method called to produce the data  ------------
00080 void
00081 RPCObjectKeysOnlineProd::fillObjectKeys( ReturnType pL1TriggerKey )
00082 {
00083   std::string rpcKey = pL1TriggerKey->subsystemKey( L1TriggerKey::kRPC ) ;
00084 
00085   if( !rpcKey.empty() )
00086     {
00087       if( m_enableL1RPCConfig )
00088         {
00089           pL1TriggerKey->add( "L1RPCConfigRcd",
00090                               "L1RPCConfig",
00091                               rpcKey ) ;
00092         }
00093       if( m_enableL1RPCConeDefinition )
00094         {
00095           pL1TriggerKey->add( "L1RPCConeDefinitionRcd",
00096                               "L1RPCConeDefinition",
00097                               rpcKey ) ;
00098         }
00099       if( m_enableL1RPCHsbConfig )
00100         {
00101           pL1TriggerKey->add( "L1RPCHsbConfigRcd",
00102                               "L1RPCHsbConfig",
00103                               rpcKey ) ;
00104         }
00105       if( m_enableL1RPCBxOrConfig )
00106         {
00107           pL1TriggerKey->add( "L1RPCBxOrConfigRcd",
00108                               "L1RPCBxOrConfig",
00109                               rpcKey ) ;
00110         }
00111 
00112     }
00113 }
00114 
00115 //define this as a plug-in
00116 DEFINE_FWK_EVENTSETUP_MODULE(RPCObjectKeysOnlineProd);