CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

L1TriggerKeyOnlineProd Class Reference

#include <CondTools/L1Trigger/interface/L1TriggerKeyOnlineProd.h>

Inheritance diagram for L1TriggerKeyOnlineProd:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Types

typedef boost::shared_ptr
< L1TriggerKey
ReturnType

Public Member Functions

 L1TriggerKeyOnlineProd (const edm::ParameterSet &)
ReturnType produce (const L1TriggerKeyRcd &)
 ~L1TriggerKeyOnlineProd ()

Private Attributes

std::vector< std::string > m_subsystemLabels

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Description: Get L1TriggerKey objects from all subsystems and collate.

Usage: <usage>

Definition at line 38 of file L1TriggerKeyOnlineProd.h.


Member Typedef Documentation

Definition at line 43 of file L1TriggerKeyOnlineProd.h.


Constructor & Destructor Documentation

L1TriggerKeyOnlineProd::L1TriggerKeyOnlineProd ( const edm::ParameterSet iConfig)

Definition at line 47 of file L1TriggerKeyOnlineProd.cc.

References edm::ESProducer::setWhatProduced().

  : m_subsystemLabels( iConfig.getParameter< std::vector< std::string > >(
      "subsystemLabels" ) )
{
   //the following line is needed to tell the framework what
   // data is being produced
   setWhatProduced(this);

   //now do what ever other initialization is needed
}
L1TriggerKeyOnlineProd::~L1TriggerKeyOnlineProd ( )

Definition at line 59 of file L1TriggerKeyOnlineProd.cc.

{
 
   // do anything here that needs to be done at desctruction time
   // (e.g. close files, deallocate resources etc.)

}

Member Function Documentation

L1TriggerKeyOnlineProd::ReturnType L1TriggerKeyOnlineProd::produce ( const L1TriggerKeyRcd iRecord)

Definition at line 74 of file L1TriggerKeyOnlineProd.cc.

References end, edm::eventsetup::EventSetupRecord::get(), and m_subsystemLabels.

{
   using namespace edm::es;

   // Start with "SubsystemKeysOnly"
   edm::ESHandle< L1TriggerKey > subsystemKeys ;
   try
     {
       iRecord.get( "SubsystemKeysOnly", subsystemKeys ) ;
     }
   catch( l1t::DataAlreadyPresentException& ex )
     {
       throw ex ;
     }

   boost::shared_ptr<L1TriggerKey> pL1TriggerKey ;
   pL1TriggerKey = boost::shared_ptr< L1TriggerKey >(
     new L1TriggerKey( *subsystemKeys ) ) ;

  // Collate object keys
  std::vector< std::string >::const_iterator itr = m_subsystemLabels.begin() ;
  std::vector< std::string >::const_iterator end = m_subsystemLabels.end() ;
  for( ; itr != end ; ++itr )
    {
      edm::ESHandle< L1TriggerKey > objectKeys ;
      try
        {
          iRecord.get( *itr, objectKeys ) ;
        }
      catch( l1t::DataAlreadyPresentException& ex )
        {
          throw ex ;
        }

      pL1TriggerKey->add( objectKeys->recordToKeyMap() ) ;
    }

   return pL1TriggerKey ;
}

Member Data Documentation

std::vector< std::string > L1TriggerKeyOnlineProd::m_subsystemLabels [private]

Definition at line 48 of file L1TriggerKeyOnlineProd.h.

Referenced by produce().