CMS 3D CMS Logo

SiStripConnectivity.cc
Go to the documentation of this file.
8 
9 #include <memory>
10 
12 public:
14  ~SiStripConnectivity() override;
15 
16  std::unique_ptr<SiStripFecCabling> produceFecCabling(const SiStripFecCablingRcd&);
17  std::unique_ptr<SiStripDetCabling> produceDetCabling(const SiStripDetCablingRcd&);
18 
19 private:
20  struct FecTokens {
23  };
24  struct DetTokens {
25  DetTokens(edm::ESConsumesCollector&& cc) : fedCabling(cc.consumes()), tTopo(cc.consumes()) {}
28  };
31 };
32 
34  : fecTokens_(setWhatProduced(this, &SiStripConnectivity::produceFecCabling)),
35  detTokens_(setWhatProduced(this, &SiStripConnectivity::produceDetCabling)) {}
36 
38  // do anything here that needs to be done at desctruction time
39  // (e.g. close files, deallocate resources etc.)
40 }
41 
42 // ------------ methods called to produce the data ------------
43 
44 std::unique_ptr<SiStripFecCabling> SiStripConnectivity::produceFecCabling(const SiStripFecCablingRcd& iRecord) {
45  //here build an object of type SiStripFecCabling using **ONLY** the information from class SiStripFedCabling,
46  return std::make_unique<SiStripFecCabling>(iRecord.get(fecTokens_.fedCabling));
47 }
48 
49 std::unique_ptr<SiStripDetCabling> SiStripConnectivity::produceDetCabling(const SiStripDetCablingRcd& iRecord) {
50  //here build an object of type SiStripDetCabling using **ONLY** the information from class SiStripFedCabling,
51  return std::make_unique<SiStripDetCabling>(iRecord.get(detTokens_.fedCabling), &iRecord.get(detTokens_.tTopo));
52 }
53 
54 // define this as a plug-in
edm::ESConsumesCollector
Definition: ESConsumesCollector.h:61
ESProducer.h
SiStripFecCablingRcd.h
SiStripConnectivity
Definition: SiStripConnectivity.cc:11
SiStripDetCabling.h
SiStripConnectivity::fecTokens_
const FecTokens fecTokens_
Definition: SiStripConnectivity.cc:29
SiStripConnectivity::SiStripConnectivity
SiStripConnectivity(const edm::ParameterSet &)
Definition: SiStripConnectivity.cc:33
SiStripDetCablingRcd
Definition: SiStripDependentRecords.h:19
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:109
SiStripFecCablingRcd
Definition: SiStripDependentRecords.h:15
SiStripConnectivity::FecTokens::fedCabling
const edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcd > fedCabling
Definition: SiStripConnectivity.cc:22
SiStripConnectivity::FecTokens
Definition: SiStripConnectivity.cc:20
SiStripConnectivity::FecTokens::FecTokens
FecTokens(edm::ESConsumesCollector &&cc)
Definition: SiStripConnectivity.cc:21
SiStripConnectivity::produceDetCabling
std::unique_ptr< SiStripDetCabling > produceDetCabling(const SiStripDetCablingRcd &)
Definition: SiStripConnectivity.cc:49
edm::ParameterSet
Definition: ParameterSet.h:47
SiStripConnectivity::detTokens_
const DetTokens detTokens_
Definition: SiStripConnectivity.cc:30
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
cc
edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcd >
SiStripConnectivity::DetTokens::DetTokens
DetTokens(edm::ESConsumesCollector &&cc)
Definition: SiStripConnectivity.cc:25
SiStripConnectivity::DetTokens::fedCabling
const edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcd > fedCabling
Definition: SiStripConnectivity.cc:26
ModuleFactory.h
SiStripFecCabling.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
SiStripConnectivity::~SiStripConnectivity
~SiStripConnectivity() override
Definition: SiStripConnectivity.cc:37
edm::ESProducer
Definition: ESProducer.h:104
SiStripDetCablingRcd.h
ParameterSet.h
SiStripConnectivity::produceFecCabling
std::unique_ptr< SiStripFecCabling > produceFecCabling(const SiStripFecCablingRcd &)
Definition: SiStripConnectivity.cc:44
SiStripConnectivity::DetTokens
Definition: SiStripConnectivity.cc:24
SiStripConnectivity::DetTokens::tTopo
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopo
Definition: SiStripConnectivity.cc:27