CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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...
 
boost::shared_ptr< L1GtParametersproduceGtParameters (const L1GtParametersRcd &)
 public methods More...
 
 ~L1GtParametersTrivialProducer ()
 destructor More...
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- 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 ()
 

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
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 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 37 of file L1GtParametersTrivialProducer.h.

Constructor & Destructor Documentation

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

constructor

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

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

destructor

Definition at line 86 of file L1GtParametersTrivialProducer.cc.

87 {
88 
89  // empty
90 
91 }

Member Function Documentation

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

public methods

L1 GT parameters

Definition at line 97 of file L1GtParametersTrivialProducer.cc.

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

Referenced by L1GtParametersTrivialProducer().

99 {
100 
101  using namespace edm::es;
102 
103 
104  boost::shared_ptr<L1GtParameters> pL1GtParameters =
105  boost::shared_ptr<L1GtParameters>( new L1GtParameters() );
106 
107 
108  // set total Bx's in the event
109  pL1GtParameters->setGtTotalBxInEvent(m_totalBxInEvent);
110 
111  // set the active boards for L1 GT DAQ record
112  pL1GtParameters->setGtDaqActiveBoards(m_daqActiveBoards);
113 
114  // set the active boards for L1 GT EVM record
115  pL1GtParameters->setGtEvmActiveBoards(m_evmActiveBoards);
116 
117  // set the number of Bx per board for L1 GT DAQ record
118  pL1GtParameters->setGtDaqNrBxBoard(m_daqNrBxBoard);
119 
120  // set the number of Bx per board for L1 GT EVM record
121  pL1GtParameters->setGtEvmNrBxBoard(m_evmNrBxBoard);
122 
123  // set length of BST record (in bytes) for L1 GT EVM record
124  pL1GtParameters->setGtBstLengthBytes(m_bstLengthBytes);
125 
126  return pL1GtParameters ;
127 }
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 73 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 61 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 67 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 64 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 70 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().

int L1GtParametersTrivialProducer::m_totalBxInEvent
private

total Bx's in the event

Definition at line 58 of file L1GtParametersTrivialProducer.h.

Referenced by L1GtParametersTrivialProducer(), and produceGtParameters().