CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L1GtParametersTrivialProducer Class Reference

#include <L1GtParametersTrivialProducer.h>

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

Public Member Functions

 L1GtParametersTrivialProducer (const edm::ParameterSet &)
 constructor More...
 
std::unique_ptr< L1GtParametersproduceGtParameters (const L1GtParametersRcd &)
 public methods More...
 
 ~L1GtParametersTrivialProducer () override
 destructor More...
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Private Attributes

unsigned int m_bstLengthBytes
 length of BST record (in bytes) More...
 
boost::uint16_t m_daqActiveBoards
 active boards in the L1 DAQ record More...
 
std::vector< int > m_daqNrBxBoard
 number of Bx per board in the DAQ record More...
 
boost::uint16_t m_evmActiveBoards
 active boards in the L1 EVM record More...
 
std::vector< int > m_evmNrBxBoard
 number of Bx per board in the EVM record More...
 
int m_totalBxInEvent
 total Bx's in the event More...
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
 ESProducer (const ESProducer &)=delete
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

Description: ESProducer for L1 GT parameters.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 36 of file L1GtParametersTrivialProducer.h.

Constructor & Destructor Documentation

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

constructor

Definition at line 38 of file L1GtParametersTrivialProducer.cc.

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

39 {
40  // tell the framework what data is being produced
42 
43  // now do what ever other initialization is needed
44 
45  // total Bx's in the event
46 
47  m_totalBxInEvent = parSet.getParameter<int>("TotalBxInEvent");
48 
49  if (m_totalBxInEvent > 0) {
50  if ( (m_totalBxInEvent%2) == 0 ) {
52 
53  edm::LogInfo("L1GtParametersTrivialProducer")
54  << "\nWARNING: Number of bunch crossing in event rounded to: "
55  << m_totalBxInEvent << "\n The number must be an odd number!\n"
56  << std::endl;
57  }
58  } else {
59 
60  edm::LogInfo("L1GtParametersTrivialProducer")
61  << "\nWARNING: Number of bunch crossing in event must be a positive number!"
62  << "\n Requested value was: " << m_totalBxInEvent
63  << "\n Reset to 1 (L1Accept bunch only).\n"
64  << std::endl;
65 
66  m_totalBxInEvent = 1;
67 
68  }
69 
70  m_daqActiveBoards = static_cast<boost::uint16_t> (parSet.getParameter<unsigned int> (
71  "DaqActiveBoards"));
72 
73  m_evmActiveBoards = static_cast<boost::uint16_t> (parSet.getParameter<unsigned int> (
74  "EvmActiveBoards"));
75 
76  m_daqNrBxBoard = parSet.getParameter<std::vector<int> > ("DaqNrBxBoard");
77 
78  m_evmNrBxBoard = parSet.getParameter<std::vector<int> > ("EvmNrBxBoard");
79 
80  m_bstLengthBytes = parSet.getParameter<unsigned int> ("BstLengthBytes");
81 
82 }
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
std::vector< int > m_daqNrBxBoard
number of Bx per board in the DAQ record
unsigned int m_bstLengthBytes
length of BST record (in bytes)
std::unique_ptr< L1GtParameters > produceGtParameters(const L1GtParametersRcd &)
public methods
std::vector< int > m_evmNrBxBoard
number of Bx per board in the EVM record
boost::uint16_t m_evmActiveBoards
active boards in the L1 EVM record
int m_totalBxInEvent
total Bx&#39;s in the event
boost::uint16_t m_daqActiveBoards
active boards in the L1 DAQ record
L1GtParametersTrivialProducer::~L1GtParametersTrivialProducer ( )
override

destructor

Definition at line 85 of file L1GtParametersTrivialProducer.cc.

86 {
87 
88  // empty
89 
90 }

Member Function Documentation

std::unique_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_daqNrBxBoard, m_evmActiveBoards, m_evmNrBxBoard, and m_totalBxInEvent.

Referenced by L1GtParametersTrivialProducer().

98 {
99  auto pL1GtParameters = std::make_unique<L1GtParameters>();
100 
101  // set total Bx's in the event
102  pL1GtParameters->setGtTotalBxInEvent(m_totalBxInEvent);
103 
104  // set the active boards for L1 GT DAQ record
105  pL1GtParameters->setGtDaqActiveBoards(m_daqActiveBoards);
106 
107  // set the active boards for L1 GT EVM record
108  pL1GtParameters->setGtEvmActiveBoards(m_evmActiveBoards);
109 
110  // set the number of Bx per board for L1 GT DAQ record
111  pL1GtParameters->setGtDaqNrBxBoard(m_daqNrBxBoard);
112 
113  // set the number of Bx per board for L1 GT EVM record
114  pL1GtParameters->setGtEvmNrBxBoard(m_evmNrBxBoard);
115 
116  // set length of BST record (in bytes) for L1 GT EVM record
117  pL1GtParameters->setGtBstLengthBytes(m_bstLengthBytes);
118 
119  return pL1GtParameters ;
120 }
std::vector< int > m_daqNrBxBoard
number of Bx per board in the DAQ record
unsigned int m_bstLengthBytes
length of BST record (in bytes)
std::vector< int > m_evmNrBxBoard
number of Bx per board in the EVM record
boost::uint16_t m_evmActiveBoards
active boards in the L1 EVM record
int m_totalBxInEvent
total Bx&#39;s in the event
boost::uint16_t m_daqActiveBoards
active boards in the L1 DAQ record

Member Data Documentation

unsigned int L1GtParametersTrivialProducer::m_bstLengthBytes
private

length of BST record (in bytes)

Definition at line 72 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 60 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().

std::vector<int> L1GtParametersTrivialProducer::m_daqNrBxBoard
private

number of Bx per board in the DAQ record

Definition at line 66 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 63 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().

std::vector<int> L1GtParametersTrivialProducer::m_evmNrBxBoard
private

number of Bx per board in the EVM record

Definition at line 69 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().

int L1GtParametersTrivialProducer::m_totalBxInEvent
private

total Bx's in the event

Definition at line 57 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().