CMS 3D CMS Logo

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

#include <L1GtPsbSetupTrivialProducer.h>

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

Public Member Functions

 L1GtPsbSetupTrivialProducer (const edm::ParameterSet &)
 constructor More...
 
std::shared_ptr< L1GtPsbSetupproducePsbSetup (const L1GtPsbSetupRcd &)
 public methods More...
 
 ~L1GtPsbSetupTrivialProducer ()
 destructor More...
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ~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

std::vector< L1GtPsbConfigm_gtPsbSetup
 L1 GT PSB boards and their setup. 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
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::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 the setup of L1 GT PSB boards.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 34 of file L1GtPsbSetupTrivialProducer.h.

Constructor & Destructor Documentation

L1GtPsbSetupTrivialProducer::L1GtPsbSetupTrivialProducer ( const edm::ParameterSet parSet)

constructor

Definition at line 37 of file L1GtPsbSetupTrivialProducer.cc.

References edm::ParameterSet::getParameter(), m_gtPsbSetup, producePsbSetup(), L1GtPsbConfig::PsbNumberLvdsGroups, L1GtPsbConfig::PsbSerLinkNumberChannels, L1GtPsbConfig::setGtPsbCh0SendLvds(), L1GtPsbConfig::setGtPsbCh1SendLvds(), L1GtPsbConfig::setGtPsbEnableRecLvds(), L1GtPsbConfig::setGtPsbEnableRecSerLink(), edm::ESProducer::setWhatProduced(), and heppy_batch::val.

39 {
40  // tell the framework what data is being produced
42 
43  // now do what ever other initialization is needed
44 
45  // detailed input configuration for PSB
46  std::vector<edm::ParameterSet> psbSetup = parSet.getParameter<std::vector<
47  edm::ParameterSet> > ("PsbSetup");
48 
49  // reserve space for L1 GT boards
50  m_gtPsbSetup.reserve(psbSetup.size());
51 
52  std::vector<unsigned int> enableRecLvdsInt;
53  enableRecLvdsInt.reserve(L1GtPsbConfig::PsbNumberLvdsGroups);
54  std::vector<bool> enableRecLvds;
55  enableRecLvds.reserve(L1GtPsbConfig::PsbNumberLvdsGroups);
56 
57  std::vector<unsigned int> enableRecSerLinkInt;
58  enableRecSerLinkInt.reserve(L1GtPsbConfig::PsbSerLinkNumberChannels);
59  std::vector<bool> enableRecSerLink;
60  enableRecSerLink.reserve(L1GtPsbConfig::PsbSerLinkNumberChannels);
61 
62  for (std::vector<edm::ParameterSet>::const_iterator itPSet =
63  psbSetup.begin(); itPSet != psbSetup.end(); ++itPSet) {
64 
65  //
66  L1GtPsbConfig psbConfig(itPSet->getParameter<int> ("Slot"));
67 
68  psbConfig.setGtPsbCh0SendLvds(
69  itPSet->getParameter<bool> ("Ch0SendLvds"));
70  psbConfig.setGtPsbCh1SendLvds(
71  itPSet->getParameter<bool> ("Ch1SendLvds"));
72 
73  enableRecLvdsInt = itPSet->getParameter<std::vector<unsigned int> > (
74  "EnableRecLvds");
75 
76  for (std::vector<unsigned int>::const_iterator cIt =
77  enableRecLvdsInt.begin(); cIt != enableRecLvdsInt.end(); ++cIt) {
78  bool val = *cIt;
79  enableRecLvds.push_back(val);
80  }
81 
82  psbConfig.setGtPsbEnableRecLvds(enableRecLvds);
83  enableRecLvds.clear();
84 
85  enableRecSerLinkInt
86  = itPSet->getParameter<std::vector<unsigned int> > (
87  "EnableRecSerLink");
88 
89  for (std::vector<unsigned int>::const_iterator cIt =
90  enableRecSerLinkInt.begin(); cIt != enableRecSerLinkInt.end(); ++cIt) {
91  bool val = *cIt;
92  enableRecSerLink.push_back(val);
93  }
94 
95  psbConfig.setGtPsbEnableRecSerLink(enableRecSerLink);
96  enableRecSerLink.clear();
97 
98  // push the board in the vector
99  m_gtPsbSetup.push_back(psbConfig);
100 
101  }
102 
103 }
T getParameter(std::string const &) const
static const int PsbSerLinkNumberChannels
number of channels per board
Definition: L1GtPsbConfig.h:67
static const int PsbNumberLvdsGroups
number of LVDS groups per board
Definition: L1GtPsbConfig.h:64
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
std::shared_ptr< L1GtPsbSetup > producePsbSetup(const L1GtPsbSetupRcd &)
public methods
std::vector< L1GtPsbConfig > m_gtPsbSetup
L1 GT PSB boards and their setup.
L1GtPsbSetupTrivialProducer::~L1GtPsbSetupTrivialProducer ( )

destructor

Definition at line 106 of file L1GtPsbSetupTrivialProducer.cc.

107 {
108 
109  // empty
110 
111 }

Member Function Documentation

std::shared_ptr< L1GtPsbSetup > L1GtPsbSetupTrivialProducer::producePsbSetup ( const L1GtPsbSetupRcd iRecord)

public methods

produce the setup for L1 GT PSB boards

Definition at line 116 of file L1GtPsbSetupTrivialProducer.cc.

References m_gtPsbSetup.

Referenced by L1GtPsbSetupTrivialProducer().

118 {
119 
120  using namespace edm::es;
121 
122  auto pL1GtPsbSetup = std::make_shared<L1GtPsbSetup>();
123 
124  pL1GtPsbSetup->setGtPsbSetup(m_gtPsbSetup);
125 
126  return pL1GtPsbSetup;
127 }
std::vector< L1GtPsbConfig > m_gtPsbSetup
L1 GT PSB boards and their setup.

Member Data Documentation

std::vector<L1GtPsbConfig> L1GtPsbSetupTrivialProducer::m_gtPsbSetup
private

L1 GT PSB boards and their setup.

Definition at line 55 of file L1GtPsbSetupTrivialProducer.h.

Referenced by L1GtPsbSetupTrivialProducer(), and producePsbSetup().