CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
MTDTopologyEP Class Reference

#include <MTDTopologyEP.h>

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

Public Types

using ReturnType = std::unique_ptr< MTDTopology >
 
- 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
 

Public Member Functions

 MTDTopologyEP (const edm::ParameterSet &)
 
ReturnType produce (const MTDTopologyRcd &)
 
 ~MTDTopologyEP (void) override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~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)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 

Private Member Functions

void fillParameters (const PMTDParameters &)
 

Private Attributes

MTDTopology::BTLValues btlVals_
 
MTDTopology::ETLValues etlVals_
 
int mtdTopologyMode_
 

Additional Inherited Members

- Protected Member Functions inherited from edm::ESProducer
 ESProducer (const ESProducer &)=delete
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
- 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

Definition at line 14 of file MTDTopologyEP.h.

Member Typedef Documentation

using MTDTopologyEP::ReturnType = std::unique_ptr<MTDTopology>

Definition at line 20 of file MTDTopologyEP.h.

Constructor & Destructor Documentation

MTDTopologyEP::MTDTopologyEP ( const edm::ParameterSet conf)

Definition at line 12 of file MTDTopologyEP.cc.

References edm::ESProducer::setWhatProduced().

13 {
14  edm::LogInfo("MTD") << "MTDTopologyEP::MTDTopologyEP";
15 
16  setWhatProduced(this);
17 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
MTDTopologyEP::~MTDTopologyEP ( void  )
override

Definition at line 19 of file MTDTopologyEP.cc.

20 {
21 }

Member Function Documentation

void MTDTopologyEP::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 24 of file MTDTopologyEP.cc.

References edm::ConfigurationDescriptions::add().

25 {
27  descriptions.add( "mtdTopology", ttc );
28 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void MTDTopologyEP::fillParameters ( const PMTDParameters ptp)
private

Definition at line 42 of file MTDTopologyEP.cc.

References btlVals_, DEFINE_FWK_EVENTSETUP_MODULE, etlVals_, MTDTopology::BTLValues::layerMask_, MTDTopology::ETLValues::layerMask_, MTDTopology::BTLValues::layerStartBit_, MTDTopology::ETLValues::layerStartBit_, MTDTopology::BTLValues::moduleMask_, MTDTopology::ETLValues::moduleMask_, MTDTopology::BTLValues::moduleStartBit_, MTDTopology::ETLValues::moduleStartBit_, mtdTopologyMode_, MTDTopology::ETLValues::ringMask_, MTDTopology::ETLValues::ringStartBit_, MTDTopology::BTLValues::sideMask_, MTDTopology::ETLValues::sideMask_, MTDTopology::BTLValues::sideStartBit_, MTDTopology::ETLValues::sideStartBit_, PMTDParameters::topologyMode_, MTDTopology::BTLValues::trayMask_, MTDTopology::BTLValues::trayStartBit_, and PMTDParameters::vitems_.

Referenced by produce().

43 {
45 
46  btlVals_.sideStartBit_ = ptp.vitems_[0].vpars_[0]; // 16
47  btlVals_.layerStartBit_ = ptp.vitems_[0].vpars_[1]; // 16
48  btlVals_.trayStartBit_ = ptp.vitems_[0].vpars_[2]; // 8
49  btlVals_.moduleStartBit_ = ptp.vitems_[0].vpars_[3]; // 2
50  btlVals_.sideMask_ = ptp.vitems_[0].vpars_[4]; // 0xF
51  btlVals_.layerMask_ = ptp.vitems_[0].vpars_[5]; // 0xF
52  btlVals_.trayMask_ = ptp.vitems_[0].vpars_[6]; // 0xFF
53  btlVals_.moduleMask_ = ptp.vitems_[0].vpars_[7]; // 0x3F
54 
55  etlVals_.sideStartBit_ = ptp.vitems_[1].vpars_[0];
56  etlVals_.layerStartBit_ = ptp.vitems_[1].vpars_[1];
57  etlVals_.ringStartBit_ = ptp.vitems_[1].vpars_[2];
58  etlVals_.moduleStartBit_ = ptp.vitems_[1].vpars_[3];
59  etlVals_.sideMask_ = ptp.vitems_[1].vpars_[4];
60  etlVals_.layerMask_ = ptp.vitems_[1].vpars_[5];
61  etlVals_.ringMask_ = ptp.vitems_[1].vpars_[6];
62  etlVals_.moduleMask_ = ptp.vitems_[1].vpars_[7];
63 
64 #ifdef EDM_ML_DEBUG
65 
66  edm::LogInfo("MTDTopologyEP") << "BTL values = "
67  << btlVals_.sideStartBit_ << " "
68  << btlVals_.layerStartBit_ << " "
69  << btlVals_.trayStartBit_ << " "
70  << btlVals_.moduleStartBit_ << " "
71  << std::hex << btlVals_.sideMask_ << " "
72  << std::hex << btlVals_.layerMask_ << " "
73  << std::hex << btlVals_.trayMask_ << " "
74  << std::hex << btlVals_.moduleMask_ << " " ;
75  edm::LogInfo("MTDTopologyEP") << "ETL values = "
76  << etlVals_.sideStartBit_ << " "
77  << etlVals_.layerStartBit_ << " "
78  << etlVals_.ringStartBit_ << " "
79  << etlVals_.moduleStartBit_ << " "
80  << std::hex << etlVals_.sideMask_ << " "
81  << std::hex << etlVals_.layerMask_ << " "
82  << std::hex << etlVals_.ringMask_ << " "
83  << std::hex << etlVals_.moduleMask_ << " " ;
84 
85 #endif
86 
87 }
unsigned int ringMask_
Definition: MTDTopology.h:39
std::vector< Item > vitems_
unsigned int sideStartBit_
Definition: MTDTopology.h:22
unsigned int sideStartBit_
Definition: MTDTopology.h:33
unsigned int moduleMask_
Definition: MTDTopology.h:29
unsigned int moduleStartBit_
Definition: MTDTopology.h:25
unsigned int layerStartBit_
Definition: MTDTopology.h:34
unsigned int trayMask_
Definition: MTDTopology.h:28
unsigned int moduleStartBit_
Definition: MTDTopology.h:36
unsigned int sideMask_
Definition: MTDTopology.h:26
unsigned int trayStartBit_
Definition: MTDTopology.h:24
unsigned int ringStartBit_
Definition: MTDTopology.h:35
unsigned int moduleMask_
Definition: MTDTopology.h:40
MTDTopology::ETLValues etlVals_
Definition: MTDTopologyEP.h:31
unsigned int layerStartBit_
Definition: MTDTopology.h:23
unsigned int sideMask_
Definition: MTDTopology.h:37
unsigned int layerMask_
Definition: MTDTopology.h:27
MTDTopology::BTLValues btlVals_
Definition: MTDTopologyEP.h:30
unsigned int layerMask_
Definition: MTDTopology.h:38
MTDTopologyEP::ReturnType MTDTopologyEP::produce ( const MTDTopologyRcd iRecord)

Definition at line 31 of file MTDTopologyEP.cc.

References btlVals_, etlVals_, fillParameters(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), and mtdTopologyMode_.

32 {
33  edm::LogInfo("MTDTopologyEP") << "MTDTopologyEP::produce(const MTDTopologyRcd& iRecord)";
35  iRecord.getRecord<PMTDParametersRcd>().get( ptp );
36  fillParameters( *ptp );
37 
38  return std::make_unique<MTDTopology>( mtdTopologyMode_, btlVals_, etlVals_ );
39 }
void fillParameters(const PMTDParameters &)
MTDTopology::ETLValues etlVals_
Definition: MTDTopologyEP.h:31
MTDTopology::BTLValues btlVals_
Definition: MTDTopologyEP.h:30

Member Data Documentation

MTDTopology::BTLValues MTDTopologyEP::btlVals_
private

Definition at line 30 of file MTDTopologyEP.h.

Referenced by fillParameters(), and produce().

MTDTopology::ETLValues MTDTopologyEP::etlVals_
private

Definition at line 31 of file MTDTopologyEP.h.

Referenced by fillParameters(), and produce().

int MTDTopologyEP::mtdTopologyMode_
private

Definition at line 29 of file MTDTopologyEP.h.

Referenced by fillParameters(), and produce().