CMS 3D CMS Logo

SiStripFedCablingReader.cc
Go to the documentation of this file.
12 #include <iostream>
13 #include <sstream>
14 
15 // -----------------------------------------------------------------------------
16 //
18  : printFecCabling_(pset.getUntrackedParameter<bool>("PrintFecCabling", false)),
19  printDetCabling_(pset.getUntrackedParameter<bool>("PrintDetCabling", false)),
20  printRegionCabling_(pset.getUntrackedParameter<bool>("PrintRegionCabling", false)) {
21  ;
22 }
23 
24 // -----------------------------------------------------------------------------
25 //
27  auto const fedRec = setup.tryToGet<SiStripFedCablingRcd>();
28  auto const fecRec = setup.tryToGet<SiStripFecCablingRcd>();
29  auto const detRec = setup.tryToGet<SiStripDetCablingRcd>();
30  auto const regRec = setup.tryToGet<SiStripRegionCablingRcd>();
31 
33  if (fedRec) {
34  edm::LogVerbatim("SiStripFedCablingReader") << "[SiStripFedCablingReader::" << __func__ << "]"
35  << " Retrieving FED cabling...";
36  fedRec->get(fed);
37  }
38 
40  if (fecRec) {
41  edm::LogVerbatim("SiStripFedCablingReader") << "[SiStripFedCablingReader::" << __func__ << "]"
42  << " Retrieving FEC cabling...";
43  fecRec->get(fec);
44  }
45 
47  if (detRec) {
48  edm::LogVerbatim("SiStripFedCablingReader") << "[SiStripFedCablingReader::" << __func__ << "]"
49  << " Retrieving DET cabling...";
50  detRec->get(det);
51  }
52 
54  if (regRec) {
55  edm::LogVerbatim("SiStripFedCablingReader") << "[SiStripFedCablingReader::" << __func__ << "]"
56  << " Retrieving REGION cabling...";
57  regRec->get(region);
58  }
59 
60  if (!fed.isValid()) {
61  edm::LogError("SiStripFedCablingReader") << " Invalid handle to FED cabling object: ";
62  return;
63  }
64 
65  {
66  std::stringstream ss;
67  ss << "[SiStripFedCablingReader::" << __func__ << "]"
68  << " VERBOSE DEBUG" << std::endl;
69  if (fedRec) {
71  setup.get<TrackerTopologyRcd>().get(tTopo);
72  fed->print(ss, tTopo.product());
73  }
74  ss << std::endl;
75  if (fecRec && printFecCabling_ && fec.isValid()) {
76  fec->print(ss);
77  }
78  ss << std::endl;
79  if (detRec && printDetCabling_ && det.isValid()) {
80  det->print(ss);
81  }
82  ss << std::endl;
83  if (regRec && printRegionCabling_ && region.isValid()) {
84  region->print(ss);
85  }
86  ss << std::endl;
87  edm::LogVerbatim("SiStripFedCablingReader") << ss.str();
88  }
89 
90  if (fedRec) {
91  std::stringstream ss;
92  ss << "[SiStripFedCablingReader::" << __func__ << "]"
93  << " TERSE DEBUG" << std::endl;
94  fed->terse(ss);
95  ss << std::endl;
96  edm::LogVerbatim("SiStripFedCablingReader") << ss.str();
97  }
98 
99  if (fedRec) {
100  std::stringstream ss;
101  ss << "[SiStripFedCablingReader::" << __func__ << "]"
102  << " SUMMARY DEBUG" << std::endl;
104  setup.get<TrackerTopologyRcd>().get(tTopo);
105  fed->summary(ss, tTopo.product());
106  ss << std::endl;
107  edm::LogVerbatim("SiStripFedCablingReader") << ss.str();
108  }
109 }
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
electrons_cff.bool
bool
Definition: electrons_cff.py:372
SiStripFedCablingReader.h
MessageLogger.h
funct::false
false
Definition: Factorize.h:34
ESHandle.h
edm::Run
Definition: Run.h:45
SiStripFedCablingReader::printFecCabling_
bool printFecCabling_
Definition: SiStripFedCablingReader.h:20
SiStripFecCabling::print
void print(std::stringstream &) const
Definition: SiStripFecCabling.cc:334
SiStripFedCabling.h
SiStripFecCablingRcd.h
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
SiStripFedCablingRcd
Definition: SiStripCondDataRecords.h:22
SiStripDetCabling.h
edm::ESHandle< SiStripFedCabling >
SiStripDetCablingRcd
Definition: SiStripDependentRecords.h:19
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:112
SiStripFecCablingRcd
Definition: SiStripDependentRecords.h:15
edm::ParameterSet
Definition: ParameterSet.h:36
edm::LogError
Definition: MessageLogger.h:183
SiStripFedCablingReader::printRegionCabling_
bool printRegionCabling_
Definition: SiStripFedCablingReader.h:22
SiStripFedCablingReader::printDetCabling_
bool printDetCabling_
Definition: SiStripFedCablingReader.h:21
edm::LogVerbatim
Definition: MessageLogger.h:297
SiStripDetCabling::print
void print(std::stringstream &) const
Definition: SiStripDetCabling.cc:386
edm::EventSetup
Definition: EventSetup.h:57
SiStripRegionCablingRcd
Definition: SiStripDependentRecords.h:23
get
#define get
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
SiStripRegionCabling.h
writedatasetfile.run
run
Definition: writedatasetfile.py:27
SiStripRegionCablingRcd.h
SiStripFecCabling.h
HLT_2018_cff.region
region
Definition: HLT_2018_cff.py:81479
SiStripFedCablingReader::SiStripFedCablingReader
SiStripFedCablingReader(const edm::ParameterSet &)
Definition: SiStripFedCablingReader.cc:17
SiStripFedCablingRcd.h
edm::eventsetup::EventSetupRecordImplementation::get
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
Definition: EventSetupRecordImplementation.h:74
SiStripDetCablingRcd.h
SiStripFedCablingReader::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &) override
Definition: SiStripFedCablingReader.cc:26
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27