CMS 3D CMS Logo

SiStripFedCablingReader.cc
Go to the documentation of this file.
8 #include <iostream>
9 #include <sstream>
10 
11 // -----------------------------------------------------------------------------
12 //
14  : printFecCabling_(pset.getUntrackedParameter<bool>("PrintFecCabling", false)),
15  printDetCabling_(pset.getUntrackedParameter<bool>("PrintDetCabling", false)),
16  printRegionCabling_(pset.getUntrackedParameter<bool>("PrintRegionCabling", false)),
17  fedCablingToken_(esConsumes<edm::Transition::BeginRun>()),
18  fecCablingToken_(esConsumes<edm::Transition::BeginRun>()),
19  detCablingToken_(esConsumes<edm::Transition::BeginRun>()),
20  regionCablingToken_(esConsumes<edm::Transition::BeginRun>()),
21  tTopoToken_(esConsumes<edm::Transition::BeginRun>()) {}
22 
23 // -----------------------------------------------------------------------------
24 //
26  auto const fedRec = setup.tryToGet<SiStripFedCablingRcd>();
27  auto const fecRec = setup.tryToGet<SiStripFecCablingRcd>();
28  auto const detRec = setup.tryToGet<SiStripDetCablingRcd>();
29  auto const regRec = setup.tryToGet<SiStripRegionCablingRcd>();
30 
32  if (fedRec) {
33  edm::LogVerbatim("SiStripFedCablingReader") << "[SiStripFedCablingReader::" << __func__ << "]"
34  << " Retrieving FED cabling...";
35  fed = setup.getHandle(fedCablingToken_);
36  }
37 
39  if (fecRec) {
40  edm::LogVerbatim("SiStripFedCablingReader") << "[SiStripFedCablingReader::" << __func__ << "]"
41  << " Retrieving FEC cabling...";
42  fec = setup.getHandle(fecCablingToken_);
43  }
44 
46  if (detRec) {
47  edm::LogVerbatim("SiStripFedCablingReader") << "[SiStripFedCablingReader::" << __func__ << "]"
48  << " Retrieving DET cabling...";
49  det = setup.getHandle(detCablingToken_);
50  }
51 
53  if (regRec) {
54  edm::LogVerbatim("SiStripFedCablingReader") << "[SiStripFedCablingReader::" << __func__ << "]"
55  << " Retrieving REGION cabling...";
56  region = setup.getHandle(regionCablingToken_);
57  }
58 
59  if (!fed.isValid()) {
60  edm::LogError("SiStripFedCablingReader") << " Invalid handle to FED cabling object: ";
61  return;
62  }
63 
64  {
65  std::stringstream ss;
66  ss << "[SiStripFedCablingReader::" << __func__ << "]"
67  << " VERBOSE DEBUG" << std::endl;
68  if (fedRec) {
69  fed->print(ss, &setup.getData(tTopoToken_));
70  }
71  ss << std::endl;
72  if (fecRec && printFecCabling_ && fec.isValid()) {
73  fec->print(ss);
74  }
75  ss << std::endl;
76  if (detRec && printDetCabling_ && det.isValid()) {
77  det->print(ss);
78  }
79  ss << std::endl;
80  if (regRec && printRegionCabling_ && region.isValid()) {
81  region->print(ss);
82  }
83  ss << std::endl;
84  edm::LogVerbatim("SiStripFedCablingReader") << ss.str();
85  }
86 
87  if (fedRec) {
88  std::stringstream ss;
89  ss << "[SiStripFedCablingReader::" << __func__ << "]"
90  << " TERSE DEBUG" << std::endl;
91  fed->terse(ss);
92  ss << std::endl;
93  edm::LogVerbatim("SiStripFedCablingReader") << ss.str();
94  }
95 
96  if (fedRec) {
97  std::stringstream ss;
98  ss << "[SiStripFedCablingReader::" << __func__ << "]"
99  << " SUMMARY DEBUG" << std::endl;
100  fed->summary(ss, &setup.getData(tTopoToken_));
101  ss << std::endl;
102  edm::LogVerbatim("SiStripFedCablingReader") << ss.str();
103  }
104 }
electrons_cff.bool
bool
Definition: electrons_cff.py:393
SiStripFedCablingReader.h
MessageLogger.h
funct::false
false
Definition: Factorize.h:29
ESHandle.h
edm::Run
Definition: Run.h:45
SiStripFedCablingReader::printFecCabling_
bool printFecCabling_
Definition: SiStripFedCablingReader.h:29
edm
HLT enums.
Definition: AlignableModifier.h:19
SiStripFedCablingReader::regionCablingToken_
edm::ESGetToken< SiStripRegionCabling, SiStripRegionCablingRcd > regionCablingToken_
Definition: SiStripFedCablingReader.h:35
SiStripFecCabling::print
void print(std::stringstream &) const
Definition: SiStripFecCabling.cc:334
SiStripFedCabling.h
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
SiStripFedCablingRcd
Definition: SiStripCondDataRecords.h:22
SiStripDetCabling.h
SiStripFedCablingReader::fecCablingToken_
edm::ESGetToken< SiStripFecCabling, SiStripFecCablingRcd > fecCablingToken_
Definition: SiStripFedCablingReader.h:33
edm::ESHandle< SiStripFedCabling >
SiStripDetCablingRcd
Definition: SiStripDependentRecords.h:19
SiStripFedCablingReader::detCablingToken_
edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > detCablingToken_
Definition: SiStripFedCablingReader.h:34
SiStripFecCablingRcd
Definition: SiStripDependentRecords.h:15
SiStripFedCablingReader::fedCablingToken_
edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcd > fedCablingToken_
Definition: SiStripFedCablingReader.h:32
edm::ParameterSet
Definition: ParameterSet.h:47
edm::Transition
Transition
Definition: Transition.h:12
SiStripFedCablingReader::printRegionCabling_
bool printRegionCabling_
Definition: SiStripFedCablingReader.h:31
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88338
SiStripFedCablingReader::printDetCabling_
bool printDetCabling_
Definition: SiStripFedCablingReader.h:30
SiStripDetCabling::print
void print(std::stringstream &) const
Definition: SiStripDetCabling.cc:386
edm::EventSetup
Definition: EventSetup.h:57
SiStripRegionCablingRcd
Definition: SiStripDependentRecords.h:23
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
SiStripRegionCabling.h
writedatasetfile.run
run
Definition: writedatasetfile.py:27
SiStripFecCabling.h
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
SiStripFedCablingReader::SiStripFedCablingReader
SiStripFedCablingReader(const edm::ParameterSet &)
Definition: SiStripFedCablingReader.cc:13
SiStripFedCablingReader::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &) override
Definition: SiStripFedCablingReader.cc:25
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
SiStripFedCablingReader::tTopoToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
Definition: SiStripFedCablingReader.h:36