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, boost::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

$Date$ $Revision$

Definition at line 39 of file L1GtParametersTrivialProducer.h.

Constructor & Destructor Documentation

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

constructor

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

42 {
43  // tell the framework what data is being produced
45 
46  // now do what ever other initialization is needed
47 
48  // total Bx's in the event
49 
50  m_totalBxInEvent = parSet.getParameter<int>("TotalBxInEvent");
51 
52  if (m_totalBxInEvent > 0) {
53  if ( (m_totalBxInEvent%2) == 0 ) {
55 
56  edm::LogInfo("L1GtParametersTrivialProducer")
57  << "\nWARNING: Number of bunch crossing in event rounded to: "
58  << m_totalBxInEvent << "\n The number must be an odd number!\n"
59  << std::endl;
60  }
61  } else {
62 
63  edm::LogInfo("L1GtParametersTrivialProducer")
64  << "\nWARNING: Number of bunch crossing in event must be a positive number!"
65  << "\n Requested value was: " << m_totalBxInEvent
66  << "\n Reset to 1 (L1Accept bunch only).\n"
67  << std::endl;
68 
69  m_totalBxInEvent = 1;
70 
71  }
72 
73  m_daqActiveBoards = static_cast<boost::uint16_t> (parSet.getParameter<unsigned int> (
74  "DaqActiveBoards"));
75 
76  m_evmActiveBoards = static_cast<boost::uint16_t> (parSet.getParameter<unsigned int> (
77  "EvmActiveBoards"));
78 
79  m_daqNrBxBoard = parSet.getParameter<std::vector<int> > ("DaqNrBxBoard");
80 
81  m_evmNrBxBoard = parSet.getParameter<std::vector<int> > ("EvmNrBxBoard");
82 
83  m_bstLengthBytes = parSet.getParameter<unsigned int> ("BstLengthBytes");
84 
85 }
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 88 of file L1GtParametersTrivialProducer.cc.

89 {
90 
91  // empty
92 
93 }

Member Function Documentation

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

public methods

L1 GT parameters

Definition at line 99 of file L1GtParametersTrivialProducer.cc.

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

Referenced by L1GtParametersTrivialProducer().

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

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

number of Bx per board in the DAQ record

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

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

number of Bx per board in the EVM record

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