test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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) != 0?true:false;
34  bool FecRcdfound=setup.find(FecRecordKey) != 0?true:false;
35  bool DetRcdfound=setup.find(DetRecordKey) != 0?true:false;
36  bool RegRcdfound=setup.find(RegRecordKey) != 0?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)fed->print( ss );
81  ss << std::endl;
82  if ( FecRcdfound && printFecCabling_ && fec.isValid() ) { fec->print( ss ); }
83  ss << std::endl;
84  if ( DetRcdfound && printDetCabling_ && det.isValid() ) { det->print( ss ); }
85  ss << std::endl;
86  if ( RegRcdfound && printRegionCabling_ && region.isValid() ) { region->print( ss ); }
87  ss << std::endl;
88  edm::LogVerbatim("SiStripFedCablingReader") << ss.str();
89  }
90 
91  if(FedRcdfound){
92  std::stringstream ss;
93  ss << "[SiStripFedCablingReader::" << __func__ << "]"
94  << " TERSE DEBUG" << std::endl;
95  fed->terse( ss );
96  ss << std::endl;
97  edm::LogVerbatim("SiStripFedCablingReader") << ss.str();
98  }
99 
100  if(FedRcdfound){
101  std::stringstream ss;
102  ss << "[SiStripFedCablingReader::" << __func__ << "]"
103  << " SUMMARY DEBUG" << std::endl;
104  fed->summary( ss );
105  ss << std::endl;
106  edm::LogVerbatim("SiStripFedCablingReader") << ss.str();
107  }
108 
109 }
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
Definition: EventSetup.cc:91
void beginRun(const edm::Run &, const edm::EventSetup &)
SiStripFedCablingReader(const edm::ParameterSet &)
const T & get() const
Definition: EventSetup.h:56
volatile std::atomic< bool > shutdown_flag false
bool isValid() const
Definition: ESHandle.h:47
Definition: Run.h:43
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:125