CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_6/src/L1TriggerConfig/RPCTriggerConfig/src/L1RPCHsbConfigOnlineProd.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:    L1RPCHsbConfigOnlineProd
00004 // Class:      L1RPCHsbConfigOnlineProd
00005 // 
00014 // system include files
00015 
00016 // user include files
00017 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00018 
00019 #include "CondTools/L1Trigger/interface/L1ConfigOnlineProdBase.h"
00020 
00021 #include "CondFormats/L1TObjects/interface/L1RPCHsbConfig.h"
00022 #include "CondFormats/DataRecord/interface/L1RPCHsbConfigRcd.h"
00023 
00024 //
00025 // class declaration
00026 //
00027 
00028 class L1RPCHsbConfigOnlineProd : public L1ConfigOnlineProdBase< L1RPCHsbConfigRcd,
00029                                                            L1RPCHsbConfig > {
00030    public:
00031       L1RPCHsbConfigOnlineProd(const edm::ParameterSet&);
00032       ~L1RPCHsbConfigOnlineProd();
00033 
00034   virtual boost::shared_ptr< L1RPCHsbConfig > newObject(
00035     const std::string& objectKey ) ;
00036 
00037    private:
00038       // ----------member data ---------------------------
00039 };
00040 
00041 //
00042 // constants, enums and typedefs
00043 //
00044 
00045 //
00046 // static data member definitions
00047 //
00048 
00049 //
00050 // constructors and destructor
00051 //
00052 L1RPCHsbConfigOnlineProd::L1RPCHsbConfigOnlineProd(const edm::ParameterSet& iConfig)
00053   : L1ConfigOnlineProdBase< L1RPCHsbConfigRcd, L1RPCHsbConfig >( iConfig )
00054 {
00055    //the following line is needed to tell the framework what
00056    // data is being produced
00057 
00058    //now do what ever other initialization is needed
00059 }
00060 
00061 
00062 L1RPCHsbConfigOnlineProd::~L1RPCHsbConfigOnlineProd()
00063 {
00064  
00065    // do anything here that needs to be done at desctruction time
00066    // (e.g. close files, deallocate resources etc.)
00067 
00068 }
00069 
00070 boost::shared_ptr< L1RPCHsbConfig >
00071 L1RPCHsbConfigOnlineProd::newObject( const std::string& objectKey )
00072 {
00073   edm::LogError( "L1-O2O" ) << "L1RPCHsbConfig object with key "
00074                             << objectKey << " not in ORCON!" ;
00075   boost::shared_ptr< L1RPCHsbConfig > pHsbConfig (new L1RPCHsbConfig());
00076   std::vector<int> hsbconf;
00077   int mask=3;
00078   // XX was: i<9, corrected
00079   for (int i=0; i<8; i++) hsbconf.push_back(mask);
00080   pHsbConfig->setHsbMask(0, hsbconf);
00081   pHsbConfig->setHsbMask(1, hsbconf);
00082   return pHsbConfig;
00083 //  return boost::shared_ptr< L1RPCHsbConfig >() ;
00084 }
00085 
00086 //
00087 // member functions
00088 //
00089 
00090 
00091 // ------------ method called to produce the data  ------------
00092 
00093 
00094 //define this as a plug-in
00095 DEFINE_FWK_EVENTSETUP_MODULE(L1RPCHsbConfigOnlineProd);