CMS 3D CMS Logo

Phase2TrackerCablingCfgESSource.cc
Go to the documentation of this file.
9 #include <sstream>
10 #include <vector>
11 #include <map>
12 
13 // -----------------------------------------------------------------------------
14 //
17  findingRecord<Phase2TrackerCablingRcd>();
18  edm::LogVerbatim("Phase2TrackerCabling") << "[Phase2TrackerCablingCfgESSource::" << __func__ << "]"
19  << " Constructing object...";
20 }
21 
22 // -----------------------------------------------------------------------------
23 //
25  edm::LogVerbatim("Phase2TrackerCabling") << "[Phase2TrackerCablingCfgESSource::" << __func__ << "]"
26  << " Destructing object...";
27 }
28 
29 // -----------------------------------------------------------------------------
30 //
32  edm::LogVerbatim("Phase2TrackerCabling") << "[Phase2TrackerCablingCfgESSource::" << __func__ << "]"
33  << " Building FED cabling map from cfg.";
34 
35  std::vector<Phase2TrackerModule> conns;
36 
37  // iterate through the parameterset and create corresponding Phase2TrackerModule
38  std::vector<edm::ParameterSet> modules = pset_.getParameterSetVector("modules");
39  uint32_t detid, gbtid, fedid, fedch, powerGroup, coolingLoop;
40  for (std::vector<edm::ParameterSet>::const_iterator it = modules.begin(); it < modules.end(); ++it) {
41  detid = it->getParameter<uint32_t>("detid");
42  gbtid = it->getParameter<uint32_t>("gbtid");
43  fedid = it->getParameter<uint32_t>("fedid");
44  fedch = it->getParameter<uint32_t>("fedch");
45  powerGroup = it->getParameter<uint32_t>("powerGroup");
46  coolingLoop = it->getParameter<uint32_t>("coolingLoop");
48  it->getParameter<std::string>("moduleType") == "2S" ? Phase2TrackerModule::SS : Phase2TrackerModule::PS;
49  conns.push_back(Phase2TrackerModule(type, detid, gbtid, fedid, fedch, powerGroup, coolingLoop));
50  }
51 
52  // return the cabling
53  Phase2TrackerCabling* cabling = new Phase2TrackerCabling(conns);
54  return cabling;
55 }
MessageLogger.h
Phase2TrackerModule::PS
Definition: Phase2TrackerModule.h:11
Phase2TrackerCabling
Definition: Phase2TrackerCabling.h:9
modules
Definition: MuonCleanerBySegments.cc:35
Phase2TrackerCablingESProducer
Definition: Phase2TrackerCablingESProducer.h:11
SiStripHashedDetIdRcd.h
SiStripModule.h
Phase2TrackerCablingCfgESSource::make
Phase2TrackerCabling * make(const Phase2TrackerCablingRcd &) override
Definition: Phase2TrackerCablingCfgESSource.cc:31
Phase2TrackerCablingCfgESSource::pset_
edm::ParameterSet pset_
Definition: Phase2TrackerCablingCfgESSource.h:30
Phase2TrackerCablingCfgESSource.h
edm::ParameterSet
Definition: ParameterSet.h:47
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
Phase2TrackerModule
Definition: Phase2TrackerModule.h:9
Phase2TrackerCabling.h
PixelSLinkDataInputSource_cfi.fedid
fedid
Definition: PixelSLinkDataInputSource_cfi.py:6
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Phase2TrackerCablingRcd
Definition: SiStripCondDataRecords.h:62
Phase2TrackerModule::SS
Definition: Phase2TrackerModule.h:11
SiStripFecCabling.h
FedChannelConnection.h
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
Phase2TrackerModule::ModuleTypes
ModuleTypes
Definition: Phase2TrackerModule.h:11
edm::ParameterSet::getParameterSetVector
VParameterSet const & getParameterSetVector(std::string const &name) const
Definition: ParameterSet.cc:2160
Phase2TrackerCablingCfgESSource::Phase2TrackerCablingCfgESSource
Phase2TrackerCablingCfgESSource(const edm::ParameterSet &)
Definition: Phase2TrackerCablingCfgESSource.cc:15
SiStripFedIdListReader.h
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
Phase2TrackerCablingCfgESSource::~Phase2TrackerCablingCfgESSource
~Phase2TrackerCablingCfgESSource() override
Definition: Phase2TrackerCablingCfgESSource.cc:24