test
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
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...
 
boost::shared_ptr< L1GtPsbSetupproducePsbSetup (const L1GtPsbSetupRcd &)
 public methods More...
 
 ~L1GtPsbSetupTrivialProducer ()
 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

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
< 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 the setup of L1 GT PSB boards.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 35 of file L1GtPsbSetupTrivialProducer.h.

Constructor & Destructor Documentation

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

constructor

Definition at line 38 of file L1GtPsbSetupTrivialProducer.cc.

References edm::ParameterSet::getParameter(), m_gtPsbSetup, producePsbSetup(), L1GtPsbConfig::PsbNumberLvdsGroups, L1GtPsbConfig::PsbSerLinkNumberChannels, L1GtPsbConfig::setGtPsbCh0SendLvds(), L1GtPsbConfig::setGtPsbCh1SendLvds(), L1GtPsbConfig::setGtPsbEnableRecLvds(), L1GtPsbConfig::setGtPsbEnableRecSerLink(), 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  // detailed input configuration for PSB
47  std::vector<edm::ParameterSet> psbSetup = parSet.getParameter<std::vector<
48  edm::ParameterSet> > ("PsbSetup");
49 
50  // reserve space for L1 GT boards
51  m_gtPsbSetup.reserve(psbSetup.size());
52 
53  std::vector<unsigned int> enableRecLvdsInt;
54  enableRecLvdsInt.reserve(L1GtPsbConfig::PsbNumberLvdsGroups);
55  std::vector<bool> enableRecLvds;
56  enableRecLvds.reserve(L1GtPsbConfig::PsbNumberLvdsGroups);
57 
58  std::vector<unsigned int> enableRecSerLinkInt;
59  enableRecSerLinkInt.reserve(L1GtPsbConfig::PsbSerLinkNumberChannels);
60  std::vector<bool> enableRecSerLink;
61  enableRecSerLink.reserve(L1GtPsbConfig::PsbSerLinkNumberChannels);
62 
63  for (std::vector<edm::ParameterSet>::const_iterator itPSet =
64  psbSetup.begin(); itPSet != psbSetup.end(); ++itPSet) {
65 
66  //
67  L1GtPsbConfig psbConfig(itPSet->getParameter<int> ("Slot"));
68 
69  psbConfig.setGtPsbCh0SendLvds(
70  itPSet->getParameter<bool> ("Ch0SendLvds"));
71  psbConfig.setGtPsbCh1SendLvds(
72  itPSet->getParameter<bool> ("Ch1SendLvds"));
73 
74  enableRecLvdsInt = itPSet->getParameter<std::vector<unsigned int> > (
75  "EnableRecLvds");
76 
77  for (std::vector<unsigned int>::const_iterator cIt =
78  enableRecLvdsInt.begin(); cIt != enableRecLvdsInt.end(); ++cIt) {
79  bool val = *cIt;
80  enableRecLvds.push_back(val);
81  }
82 
83  psbConfig.setGtPsbEnableRecLvds(enableRecLvds);
84  enableRecLvds.clear();
85 
86  enableRecSerLinkInt
87  = itPSet->getParameter<std::vector<unsigned int> > (
88  "EnableRecSerLink");
89 
90  for (std::vector<unsigned int>::const_iterator cIt =
91  enableRecSerLinkInt.begin(); cIt != enableRecSerLinkInt.end(); ++cIt) {
92  bool val = *cIt;
93  enableRecSerLink.push_back(val);
94  }
95 
96  psbConfig.setGtPsbEnableRecSerLink(enableRecSerLink);
97  enableRecSerLink.clear();
98 
99  // push the board in the vector
100  m_gtPsbSetup.push_back(psbConfig);
101 
102  }
103 
104 }
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::vector< L1GtPsbConfig > m_gtPsbSetup
L1 GT PSB boards and their setup.
boost::shared_ptr< L1GtPsbSetup > producePsbSetup(const L1GtPsbSetupRcd &)
public methods
L1GtPsbSetupTrivialProducer::~L1GtPsbSetupTrivialProducer ( )

destructor

Definition at line 107 of file L1GtPsbSetupTrivialProducer.cc.

108 {
109 
110  // empty
111 
112 }

Member Function Documentation

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

public methods

produce the setup for L1 GT PSB boards

Definition at line 117 of file L1GtPsbSetupTrivialProducer.cc.

References m_gtPsbSetup, and L1GtPsbSetup::setGtPsbSetup().

Referenced by L1GtPsbSetupTrivialProducer().

119 {
120 
121  using namespace edm::es;
122 
123  boost::shared_ptr<L1GtPsbSetup> pL1GtPsbSetup = boost::shared_ptr<
124  L1GtPsbSetup>(new L1GtPsbSetup());
125 
126  pL1GtPsbSetup->setGtPsbSetup(m_gtPsbSetup);
127 
128  return pL1GtPsbSetup;
129 }
void setGtPsbSetup(const std::vector< L1GtPsbConfig > &)
Definition: L1GtPsbSetup.cc:43
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 56 of file L1GtPsbSetupTrivialProducer.h.

Referenced by L1GtPsbSetupTrivialProducer(), and producePsbSetup().