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

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 37 of file L1GtPsbSetupTrivialProducer.h.

Constructor & Destructor Documentation

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

constructor

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

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

110 {
111 
112  // empty
113 
114 }

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 119 of file L1GtPsbSetupTrivialProducer.cc.

References m_gtPsbSetup, and L1GtPsbSetup::setGtPsbSetup().

Referenced by L1GtPsbSetupTrivialProducer().

121 {
122 
123  using namespace edm::es;
124 
125  boost::shared_ptr<L1GtPsbSetup> pL1GtPsbSetup = boost::shared_ptr<
126  L1GtPsbSetup>(new L1GtPsbSetup());
127 
128  pL1GtPsbSetup->setGtPsbSetup(m_gtPsbSetup);
129 
130  return pL1GtPsbSetup;
131 }
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 58 of file L1GtPsbSetupTrivialProducer.h.

Referenced by L1GtPsbSetupTrivialProducer(), and producePsbSetup().