CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
SiStripFedCablingBuilder Class Reference

#include <SiStripFedCablingBuilder.h>

Inheritance diagram for SiStripFedCablingBuilder:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginRun (const edm::Run &, const edm::EventSetup &) override
 
 SiStripFedCablingBuilder (const edm::ParameterSet &iConfig)
 
 ~SiStripFedCablingBuilder () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

bool printDetCabling_
 
bool printFecCabling_
 
bool printRegionCabling_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 9 of file SiStripFedCablingBuilder.h.

Constructor & Destructor Documentation

◆ SiStripFedCablingBuilder()

SiStripFedCablingBuilder::SiStripFedCablingBuilder ( const edm::ParameterSet iConfig)

Definition at line 19 of file SiStripFedCablingBuilder.cc.

20  : printFecCabling_(pset.getUntrackedParameter<bool>("PrintFecCabling", false)),
21  printDetCabling_(pset.getUntrackedParameter<bool>("PrintDetCabling", false)),
22  printRegionCabling_(pset.getUntrackedParameter<bool>("PrintRegionCabling", false)) {
23  ;
24 }

◆ ~SiStripFedCablingBuilder()

SiStripFedCablingBuilder::~SiStripFedCablingBuilder ( )
inlineoverride

Definition at line 13 of file SiStripFedCablingBuilder.h.

13 {};

Member Function Documentation

◆ analyze()

void SiStripFedCablingBuilder::analyze ( const edm::Event ,
const edm::EventSetup  
)
inlineoverridevirtual

Implements edm::EDAnalyzer.

Definition at line 17 of file SiStripFedCablingBuilder.h.

17 { ; }

◆ beginRun()

void SiStripFedCablingBuilder::beginRun ( const edm::Run run,
const edm::EventSetup setup 
)
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 28 of file SiStripFedCablingBuilder.cc.

28  {
29  edm::LogInfo("SiStripFedCablingBuilder")
30  << "... creating dummy SiStripFedCabling Data for Run " << run.run() << "\n " << std::endl;
31 
32  edm::LogVerbatim("SiStripFedCablingBuilder") << "[SiStripFedCablingBuilder::" << __func__ << "]"
33  << " Retrieving FED cabling...";
35  setup.get<SiStripFedCablingRcd>().get(fed);
36 
37  edm::LogVerbatim("SiStripFedCablingBuilder") << "[SiStripFedCablingBuilder::" << __func__ << "]"
38  << " Retrieving FEC cabling...";
40  setup.get<SiStripFecCablingRcd>().get(fec);
41 
42  edm::LogVerbatim("SiStripFedCablingBuilder") << "[SiStripFedCablingBuilder::" << __func__ << "]"
43  << " Retrieving DET cabling...";
45  setup.get<SiStripDetCablingRcd>().get(det);
46 
47  edm::LogVerbatim("SiStripFedCablingBuilder") << "[SiStripFedCablingBuilder::" << __func__ << "]"
48  << " Retrieving REGION cabling...";
51 
52  if (!fed.isValid()) {
53  edm::LogError("SiStripFedCablingBuilder") << " Invalid handle to FED cabling object: ";
54  return;
55  }
56 
58  setup.get<TrackerTopologyRcd>().get(tTopo);
59  {
60  std::stringstream ss;
61  ss << "[SiStripFedCablingBuilder::" << __func__ << "]"
62  << " VERBOSE DEBUG" << std::endl;
63  fed->print(ss, tTopo.product());
64  ss << std::endl;
65  if (printFecCabling_ && fec.isValid()) {
66  fec->print(ss);
67  }
68  ss << std::endl;
69  if (printDetCabling_ && det.isValid()) {
70  det->print(ss);
71  }
72  ss << std::endl;
73  if (printRegionCabling_ && region.isValid()) {
74  region->print(ss);
75  }
76  ss << std::endl;
77  edm::LogVerbatim("SiStripFedCablingBuilder") << ss.str();
78  }
79 
80  {
81  std::stringstream ss;
82  ss << "[SiStripFedCablingBuilder::" << __func__ << "]"
83  << " TERSE DEBUG" << std::endl;
84  fed->terse(ss);
85  ss << std::endl;
86  edm::LogVerbatim("SiStripFedCablingBuilder") << ss.str();
87  }
88 
89  {
90  std::stringstream ss;
91  ss << "[SiStripFedCablingBuilder::" << __func__ << "]"
92  << " SUMMARY DEBUG" << std::endl;
93  fed->summary(ss, tTopo.product());
94  ss << std::endl;
95  edm::LogVerbatim("SiStripFedCablingBuilder") << ss.str();
96  }
97 
98  edm::LogVerbatim("SiStripFedCablingBuilder") << "[SiStripFedCablingBuilder::" << __func__ << "]"
99  << " Copying FED cabling...";
101 
102  //End now write sistripnoises data in DB
104 
105  if (mydbservice.isAvailable()) {
106  if (mydbservice->isNewTagRequest("SiStripFedCablingRcd")) {
107  mydbservice->createNewIOV<SiStripFedCabling>(
108  obj, mydbservice->beginOfTime(), mydbservice->endOfTime(), "SiStripFedCablingRcd");
109  } else {
110  mydbservice->appendSinceTime<SiStripFedCabling>(obj, mydbservice->currentTime(), "SiStripFedCablingRcd");
111  }
112  } else {
113  edm::LogError("SiStripFedCablingBuilder") << "Service is unavailable" << std::endl;
114  }
115 }

References cond::service::PoolDBOutputService::appendSinceTime(), cond::service::PoolDBOutputService::beginOfTime(), cond::service::PoolDBOutputService::createNewIOV(), cond::service::PoolDBOutputService::currentTime(), cond::service::PoolDBOutputService::endOfTime(), get, edm::Service< T >::isAvailable(), cond::service::PoolDBOutputService::isNewTagRequest(), edm::ESHandleBase::isValid(), getGTfromDQMFile::obj, SiStripFecCabling::print(), SiStripDetCabling::print(), SiStripFedCabling::print(), printDetCabling_, printFecCabling_, printRegionCabling_, edm::ESHandle< T >::product(), HLT_2018_cff::region, writedatasetfile::run, singleTopDQM_cfi::setup, contentValuesCheck::ss, SiStripFedCabling::summary(), and SiStripFedCabling::terse().

Member Data Documentation

◆ printDetCabling_

bool SiStripFedCablingBuilder::printDetCabling_
private

Definition at line 21 of file SiStripFedCablingBuilder.h.

Referenced by beginRun().

◆ printFecCabling_

bool SiStripFedCablingBuilder::printFecCabling_
private

Definition at line 20 of file SiStripFedCablingBuilder.h.

Referenced by beginRun().

◆ printRegionCabling_

bool SiStripFedCablingBuilder::printRegionCabling_
private

Definition at line 22 of file SiStripFedCablingBuilder.h.

Referenced by beginRun().

SiStripFedCabling::print
void print(std::stringstream &ss, const TrackerTopology *trackerTopo) const
LEFT FOR COMPATIBILITY. SHOULD BE REPLACED BY PRINTDEBUG.
Definition: SiStripFedCabling.h:93
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
SiStripFedCablingBuilder::printFecCabling_
bool printFecCabling_
Definition: SiStripFedCablingBuilder.h:20
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition: PoolDBOutputService.cc:177
SiStripFecCabling::print
void print(std::stringstream &) const
Definition: SiStripFecCabling.cc:334
edm::LogInfo
Definition: MessageLogger.h:254
cond::service::PoolDBOutputService::appendSinceTime
void appendSinceTime(const T *payloadObj, cond::Time_t sinceTime, const std::string &recordName)
Definition: PoolDBOutputService.h:132
SiStripFedCabling
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses,...
Definition: SiStripFedCabling.h:25
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
SiStripFedCablingRcd
Definition: SiStripCondDataRecords.h:22
cond::service::PoolDBOutputService::createNewIOV
void createNewIOV(const T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t, const std::string &recordName)
Definition: PoolDBOutputService.h:107
edm::ESHandle< SiStripFedCabling >
SiStripDetCablingRcd
Definition: SiStripDependentRecords.h:19
SiStripFecCablingRcd
Definition: SiStripDependentRecords.h:15
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
edm::LogError
Definition: MessageLogger.h:183
edm::Service< cond::service::PoolDBOutputService >
edm::LogVerbatim
Definition: MessageLogger.h:297
SiStripDetCabling::print
void print(std::stringstream &) const
Definition: SiStripDetCabling.cc:386
SiStripRegionCablingRcd
Definition: SiStripDependentRecords.h:23
get
#define get
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
cond::service::PoolDBOutputService::endOfTime
cond::Time_t endOfTime() const
Definition: PoolDBOutputService.cc:175
writedatasetfile.run
run
Definition: writedatasetfile.py:27
SiStripFedCablingBuilder::printDetCabling_
bool printDetCabling_
Definition: SiStripFedCablingBuilder.h:21
HLT_2018_cff.region
region
Definition: HLT_2018_cff.py:81479
cond::service::PoolDBOutputService::isNewTagRequest
bool isNewTagRequest(const std::string &recordName)
Definition: PoolDBOutputService.cc:90
SiStripFedCabling::summary
void summary(std::stringstream &ss, const TrackerTopology *trackerTopo) const
LEFT FOR COMPATIBILITY. SHOULD BE REPLACED BY PRINTSUMMARY.
Definition: SiStripFedCabling.h:101
SiStripFedCablingBuilder::printRegionCabling_
bool printRegionCabling_
Definition: SiStripFedCablingBuilder.h:22
SiStripFedCabling::terse
void terse(std::stringstream &) const
Definition: SiStripFedCabling.cc:249
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
cond::service::PoolDBOutputService::currentTime
cond::Time_t currentTime() const
Definition: PoolDBOutputService.cc:179
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27