CMS 3D CMS Logo

L1GtParametersTrivialProducer Class Reference

Description: ESProducer for L1 GT parameters. More...

#include <L1TriggerConfig/L1GtConfigProducers/interface/L1GtParametersTrivialProducer.h>

Inheritance diagram for L1GtParametersTrivialProducer:

edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

 L1GtParametersTrivialProducer (const edm::ParameterSet &)
 constructor
boost::shared_ptr< L1GtParametersproduceGtParameters (const L1GtParametersRcd &)
 public methods
 ~L1GtParametersTrivialProducer ()
 destructor

Private Attributes

unsigned int m_bstLengthBytes
 length of BST record (in bytes)
boost::uint16_t m_daqActiveBoards
 active boards in the L1 DAQ record
boost::uint16_t m_evmActiveBoards
 active boards in the L1 EVM record
int m_totalBxInEvent
 total Bx's in the event


Detailed Description

Description: ESProducer for L1 GT parameters.

Implementation: <TODO: enter implementation details>

Author:
: Vasile Mihai Ghete - HEPHY Vienna
$Date$ $Revision$

Definition at line 39 of file L1GtParametersTrivialProducer.h.


Constructor & Destructor Documentation

L1GtParametersTrivialProducer::L1GtParametersTrivialProducer ( const edm::ParameterSet parSet  ) 

constructor

Definition at line 42 of file L1GtParametersTrivialProducer.cc.

References lat::endl(), edm::ParameterSet::getParameter(), m_bstLengthBytes, m_daqActiveBoards, m_evmActiveBoards, m_totalBxInEvent, produceGtParameters(), and edm::ESProducer::setWhatProduced().

00043 {
00044     // tell the framework what data is being produced
00045     setWhatProduced(this, &L1GtParametersTrivialProducer::produceGtParameters);
00046 
00047     // now do what ever other initialization is needed
00048 
00049     // total Bx's in the event
00050 
00051     m_totalBxInEvent = parSet.getParameter<int>("TotalBxInEvent");
00052 
00053     if (m_totalBxInEvent > 0) {
00054         if ( (m_totalBxInEvent%2) == 0 ) {
00055             m_totalBxInEvent = m_totalBxInEvent - 1;
00056 
00057             edm::LogInfo("L1GtParametersTrivialProducer")
00058             << "\nWARNING: Number of bunch crossing in event rounded to: "
00059             << m_totalBxInEvent << "\n         The number must be an odd number!\n"
00060             << std::endl;
00061         }
00062     } else {
00063 
00064         edm::LogInfo("L1GtParametersTrivialProducer")
00065         << "\nWARNING: Number of bunch crossing in event must be a positive number!"
00066         << "\n  Requested value was: " << m_totalBxInEvent
00067         << "\n  Reset to 1 (L1Accept bunch only).\n"
00068         << std::endl;
00069 
00070         m_totalBxInEvent = 1;
00071 
00072     }
00073 
00074     m_daqActiveBoards =
00075         static_cast<boost::uint16_t>(parSet.getParameter<unsigned int>("DaqActiveBoards"));
00076 
00077     m_evmActiveBoards = 
00078         static_cast<boost::uint16_t>(parSet.getParameter<unsigned int>("EvmActiveBoards"));
00079 
00080     m_bstLengthBytes = parSet.getParameter<unsigned int>("BstLengthBytes");
00081 
00082 }

L1GtParametersTrivialProducer::~L1GtParametersTrivialProducer (  ) 

destructor

Definition at line 85 of file L1GtParametersTrivialProducer.cc.

00086 {
00087 
00088     // empty
00089 
00090 }


Member Function Documentation

boost::shared_ptr< L1GtParameters > L1GtParametersTrivialProducer::produceGtParameters ( const L1GtParametersRcd iRecord  ) 

public methods

L1 GT parameters

Definition at line 96 of file L1GtParametersTrivialProducer.cc.

References m_bstLengthBytes, m_daqActiveBoards, m_evmActiveBoards, and m_totalBxInEvent.

Referenced by L1GtParametersTrivialProducer().

00098 {
00099 
00100     using namespace edm::es;
00101 
00102 
00103     boost::shared_ptr<L1GtParameters> pL1GtParameters =
00104         boost::shared_ptr<L1GtParameters>( new L1GtParameters() );
00105 
00106 
00107     // set total Bx's in the event
00108     pL1GtParameters->setGtTotalBxInEvent(m_totalBxInEvent);
00109 
00110     // set the active boards for L1 GT DAQ record
00111     pL1GtParameters->setGtDaqActiveBoards(m_daqActiveBoards);
00112 
00113     // set the active boards for L1 GT EVM record
00114     pL1GtParameters->setGtEvmActiveBoards(m_evmActiveBoards);
00115 
00116     // set length of BST record (in bytes) for L1 GT EVM record
00117     pL1GtParameters->setGtBstLengthBytes(m_bstLengthBytes);
00118 
00119     return pL1GtParameters ;
00120 }


Member Data Documentation

unsigned int L1GtParametersTrivialProducer::m_bstLengthBytes [private]

length of BST record (in bytes)

Definition at line 69 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().

boost::uint16_t L1GtParametersTrivialProducer::m_daqActiveBoards [private]

active boards in the L1 DAQ record

Definition at line 63 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().

boost::uint16_t L1GtParametersTrivialProducer::m_evmActiveBoards [private]

active boards in the L1 EVM record

Definition at line 66 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().

int L1GtParametersTrivialProducer::m_totalBxInEvent [private]

total Bx's in the event

Definition at line 60 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:26:44 2009 for CMSSW by  doxygen 1.5.4