CMS 3D CMS Logo

MTDTopologyEP.cc
Go to the documentation of this file.
1 #include "MTDTopologyEP.h"
9 
10 //#define EDM_ML_DEBUG
11 
13 {
14  edm::LogInfo("MTD") << "MTDTopologyEP::MTDTopologyEP";
15 
16  setWhatProduced(this);
17 }
18 
20 {
21 }
22 
23 void
25 {
27  descriptions.add( "mtdTopology", ttc );
28 }
29 
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 }
40 
41 void
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 }
88 
90 
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:116
unsigned int ringMask_
Definition: MTDTopology.h:39
MTDTopologyEP(const edm::ParameterSet &)
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
ReturnType produce(const MTDTopologyRcd &)
~MTDTopologyEP(void) override
void fillParameters(const PMTDParameters &)
unsigned int trayStartBit_
Definition: MTDTopology.h:24
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
void add(std::string const &label, ParameterSetDescription const &psetDescription)
unsigned int ringStartBit_
Definition: MTDTopology.h:35
unsigned int moduleMask_
Definition: MTDTopology.h:40
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MTDTopology::ETLValues etlVals_
Definition: MTDTopologyEP.h:31
unsigned int layerStartBit_
Definition: MTDTopology.h:23
std::unique_ptr< MTDTopology > ReturnType
Definition: MTDTopologyEP.h:20
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