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 //
26  const edm::EventSetup& setup ) {
27 
32 
33  bool FedRcdfound=setup.find(FedRecordKey) != nullptr?true:false;
34  bool FecRcdfound=setup.find(FecRecordKey) != nullptr?true:false;
35  bool DetRcdfound=setup.find(DetRecordKey) != nullptr?true:false;
36  bool RegRcdfound=setup.find(RegRecordKey) != nullptr?true:false;
37 
39  if(FedRcdfound){
40  edm::LogVerbatim("SiStripFedCablingReader")
41  << "[SiStripFedCablingReader::" << __func__ << "]"
42  << " Retrieving FED cabling...";
43  setup.get<SiStripFedCablingRcd>().get( fed );
44  }
45 
47  if(FecRcdfound){
48  edm::LogVerbatim("SiStripFedCablingReader")
49  << "[SiStripFedCablingReader::" << __func__ << "]"
50  << " Retrieving FEC cabling...";
51  setup.get<SiStripFecCablingRcd>().get( fec );
52  }
53 
55  if(DetRcdfound){
56  edm::LogVerbatim("SiStripFedCablingReader")
57  << "[SiStripFedCablingReader::" << __func__ << "]"
58  << " Retrieving DET cabling...";
59  setup.get<SiStripDetCablingRcd>().get( det );
60  }
61 
63  if(RegRcdfound){
64  edm::LogVerbatim("SiStripFedCablingReader")
65  << "[SiStripFedCablingReader::" << __func__ << "]"
66  << " Retrieving REGION cabling...";
67  setup.get<SiStripRegionCablingRcd>().get( region );
68  }
69 
70  if ( !fed.isValid() ) {
71  edm::LogError("SiStripFedCablingReader")
72  << " Invalid handle to FED cabling object: ";
73  return;
74  }
75 
76  {
77  std::stringstream ss;
78  ss << "[SiStripFedCablingReader::" << __func__ << "]"
79  << " VERBOSE DEBUG" << std::endl;
80  if(FedRcdfound) {
82  setup.get<TrackerTopologyRcd>().get(tTopo);
83  fed->print(ss, tTopo.product());
84  }
85  ss << std::endl;
86  if ( FecRcdfound && printFecCabling_ && fec.isValid() ) { fec->print( ss ); }
87  ss << std::endl;
88  if ( DetRcdfound && printDetCabling_ && det.isValid() ) { det->print( ss ); }
89  ss << std::endl;
90  if ( RegRcdfound && printRegionCabling_ && region.isValid() ) { region->print( ss ); }
91  ss << std::endl;
92  edm::LogVerbatim("SiStripFedCablingReader") << ss.str();
93  }
94 
95  if(FedRcdfound){
96  std::stringstream ss;
97  ss << "[SiStripFedCablingReader::" << __func__ << "]"
98  << " TERSE DEBUG" << std::endl;
99  fed->terse( ss );
100  ss << std::endl;
101  edm::LogVerbatim("SiStripFedCablingReader") << ss.str();
102  }
103 
104  if(FedRcdfound){
105  std::stringstream ss;
106  ss << "[SiStripFedCablingReader::" << __func__ << "]"
107  << " SUMMARY DEBUG" << std::endl;
109  setup.get<TrackerTopologyRcd>().get(tTopo);
110  fed->summary(ss, tTopo.product());
111  ss << std::endl;
112  edm::LogVerbatim("SiStripFedCablingReader") << ss.str();
113  }
114 
115 }
void print(std::stringstream &) const
void terse(std::stringstream &) const
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
void print(std::stringstream &ss, const TrackerTopology *trackerTopo) const
LEFT FOR COMPATIBILITY. SHOULD BE REPLACED BY PRINTDEBUG.
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
Definition: EventSetup.cc:88
void print(std::stringstream &) const
SiStripFedCablingReader(const edm::ParameterSet &)
const T & get() const
Definition: EventSetup.h:59
void summary(std::stringstream &ss, const TrackerTopology *trackerTopo) const
LEFT FOR COMPATIBILITY. SHOULD BE REPLACED BY PRINTSUMMARY.
bool isValid() const
Definition: ESHandle.h:47
T const * product() const
Definition: ESHandle.h:86
void beginRun(const edm::Run &, const edm::EventSetup &) override
void print(std::stringstream &) const
Definition: Run.h:43