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::ESProductResolverFactoryProducer edm::eventsetup::ESProductResolverProvider

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 ()
 
 ESProducer (const ESProducer &)=delete
 
 ESProducer (ESProducer &&)=delete
 
ESResolverIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProduceroperator= (const ESProducer &)=delete
 
ESProduceroperator= (ESProducer &&)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESResolverIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProductResolverFactoryProducer
 ESProductResolverFactoryProducer ()
 
 ESProductResolverFactoryProducer (const ESProductResolverFactoryProducer &)=delete
 
const ESProductResolverFactoryProduceroperator= (const ESProductResolverFactoryProducer &)=delete
 
 ~ESProductResolverFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
void createKeyedResolvers (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
const ComponentDescriptiondescription () const
 
 ESProductResolverProvider ()
 
 ESProductResolverProvider (const ESProductResolverProvider &)=delete
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedResolverskeyedResolvers (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const ESProductResolverProvideroperator= (const ESProductResolverProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~ESProductResolverProvider () noexcept(false)
 

Private Attributes

unsigned int m_bstLengthBytes
 length of BST record (in bytes) More...
 
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...
 
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

- Static Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::ESProductResolverFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::ESProductResolverProvider
using KeyedResolversVector = std::vector< std::pair< DataKey, std::shared_ptr< ESProductResolver > >>
 
- Protected Member Functions inherited from edm::ESProducer
ESConsumesInfoconsumesInfoPushBackNew ()
 
unsigned int consumesInfoSize () const
 
template<typename CallbackT , typename TList , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const TList *, const TRecord *iRecord, const es::Label &iLabel)
 
template<typename CallbackT , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>>, const eventsetup::produce::Null *, const TRecord *, const es::Label &)
 
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 TDecorator >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename TFunc >
auto setWhatProduced (TFunc &&func, const es::Label &iLabel={})
 
template<typename TReturn , typename TRecord , typename TFunc , typename TDecorator >
ESConsumesCollectorT< TRecord > setWhatProduced (TFunc &&func, TDecorator &&iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProductResolverFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ESProductResolverFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedResolversVector registerResolvers (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::ESProductResolverProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 

Detailed Description

Description: ESProducer for L1 GT parameters.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 35 of file L1GtParametersTrivialProducer.h.

Constructor & Destructor Documentation

◆ L1GtParametersTrivialProducer()

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

constructor

Definition at line 36 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().

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

◆ ~L1GtParametersTrivialProducer()

L1GtParametersTrivialProducer::~L1GtParametersTrivialProducer ( )
override

destructor

Definition at line 76 of file L1GtParametersTrivialProducer.cc.

76  {
77  // empty
78 }

Member Function Documentation

◆ produceGtParameters()

std::unique_ptr< L1GtParameters > L1GtParametersTrivialProducer::produceGtParameters ( const L1GtParametersRcd iRecord)

public methods

L1 GT parameters

Definition at line 83 of file L1GtParametersTrivialProducer.cc.

References m_bstLengthBytes, m_daqActiveBoards, m_daqNrBxBoard, m_evmActiveBoards, m_evmNrBxBoard, and m_totalBxInEvent.

Referenced by L1GtParametersTrivialProducer().

83  {
84  auto pL1GtParameters = std::make_unique<L1GtParameters>();
85 
86  // set total Bx's in the event
87  pL1GtParameters->setGtTotalBxInEvent(m_totalBxInEvent);
88 
89  // set the active boards for L1 GT DAQ record
90  pL1GtParameters->setGtDaqActiveBoards(m_daqActiveBoards);
91 
92  // set the active boards for L1 GT EVM record
93  pL1GtParameters->setGtEvmActiveBoards(m_evmActiveBoards);
94 
95  // set the number of Bx per board for L1 GT DAQ record
96  pL1GtParameters->setGtDaqNrBxBoard(m_daqNrBxBoard);
97 
98  // set the number of Bx per board for L1 GT EVM record
99  pL1GtParameters->setGtEvmNrBxBoard(m_evmNrBxBoard);
100 
101  // set length of BST record (in bytes) for L1 GT EVM record
102  pL1GtParameters->setGtBstLengthBytes(m_bstLengthBytes);
103 
104  return pL1GtParameters;
105 }
uint16_t m_evmActiveBoards
active boards in the L1 EVM record
std::vector< int > m_daqNrBxBoard
number of Bx per board in the DAQ record
unsigned int m_bstLengthBytes
length of BST record (in bytes)
uint16_t m_daqActiveBoards
active boards in the L1 DAQ record
std::vector< int > m_evmNrBxBoard
number of Bx per board in the EVM record
int m_totalBxInEvent
total Bx&#39;s in the event

Member Data Documentation

◆ m_bstLengthBytes

unsigned int L1GtParametersTrivialProducer::m_bstLengthBytes
private

length of BST record (in bytes)

Definition at line 65 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().

◆ m_daqActiveBoards

uint16_t L1GtParametersTrivialProducer::m_daqActiveBoards
private

active boards in the L1 DAQ record

Definition at line 53 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().

◆ m_daqNrBxBoard

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

number of Bx per board in the DAQ record

Definition at line 59 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().

◆ m_evmActiveBoards

uint16_t L1GtParametersTrivialProducer::m_evmActiveBoards
private

active boards in the L1 EVM record

Definition at line 56 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().

◆ m_evmNrBxBoard

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

number of Bx per board in the EVM record

Definition at line 62 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().

◆ m_totalBxInEvent

int L1GtParametersTrivialProducer::m_totalBxInEvent
private

total Bx's in the event

Definition at line 50 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().