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
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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

edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcddetCablingToken_
 
edm::ESGetToken< SiStripFecCabling, SiStripFecCablingRcdfecCablingToken_
 
edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcdfedCablingToken_
 
bool printDetCabling_
 
bool printFecCabling_
 
bool printRegionCabling_
 
edm::ESGetToken< SiStripRegionCabling, SiStripRegionCablingRcdregionCablingToken_
 
edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoToken_
 

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 wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
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 = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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 18 of file SiStripFedCablingBuilder.h.

Constructor & Destructor Documentation

◆ SiStripFedCablingBuilder()

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

Definition at line 15 of file SiStripFedCablingBuilder.cc.

16  : printFecCabling_(pset.getUntrackedParameter<bool>("PrintFecCabling", false)),
17  printDetCabling_(pset.getUntrackedParameter<bool>("PrintDetCabling", false)),
18  printRegionCabling_(pset.getUntrackedParameter<bool>("PrintRegionCabling", false)),
19  fedCablingToken_(esConsumes<edm::Transition::BeginRun>()),
20  fecCablingToken_(esConsumes<edm::Transition::BeginRun>()),
21  detCablingToken_(esConsumes<edm::Transition::BeginRun>()),
22  regionCablingToken_(esConsumes<edm::Transition::BeginRun>()),
23  tTopoToken_(esConsumes<edm::Transition::BeginRun>()) {}

◆ ~SiStripFedCablingBuilder()

SiStripFedCablingBuilder::~SiStripFedCablingBuilder ( )
inlineoverride

Definition at line 22 of file SiStripFedCablingBuilder.h.

22 {};

Member Function Documentation

◆ analyze()

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

Implements edm::EDAnalyzer.

Definition at line 26 of file SiStripFedCablingBuilder.h.

26 { ; }

◆ beginRun()

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

Reimplemented from edm::EDAnalyzer.

Definition at line 27 of file SiStripFedCablingBuilder.cc.

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

References cond::service::PoolDBOutputService::appendSinceTime(), cond::service::PoolDBOutputService::beginOfTime(), cond::service::PoolDBOutputService::createNewIOV(), cond::service::PoolDBOutputService::currentTime(), detCablingToken_, cond::service::PoolDBOutputService::endOfTime(), fecCablingToken_, fedCablingToken_, edm::Service< T >::isAvailable(), cond::service::PoolDBOutputService::isNewTagRequest(), getGTfromDQMFile::obj, printDetCabling_, printFecCabling_, printRegionCabling_, HLT_FULL_cff::region, regionCablingToken_, writedatasetfile::run, singleTopDQM_cfi::setup, contentValuesCheck::ss, and tTopoToken_.

Member Data Documentation

◆ detCablingToken_

edm::ESGetToken<SiStripDetCabling, SiStripDetCablingRcd> SiStripFedCablingBuilder::detCablingToken_
private

Definition at line 34 of file SiStripFedCablingBuilder.h.

Referenced by beginRun().

◆ fecCablingToken_

edm::ESGetToken<SiStripFecCabling, SiStripFecCablingRcd> SiStripFedCablingBuilder::fecCablingToken_
private

Definition at line 33 of file SiStripFedCablingBuilder.h.

Referenced by beginRun().

◆ fedCablingToken_

edm::ESGetToken<SiStripFedCabling, SiStripFedCablingRcd> SiStripFedCablingBuilder::fedCablingToken_
private

Definition at line 32 of file SiStripFedCablingBuilder.h.

Referenced by beginRun().

◆ printDetCabling_

bool SiStripFedCablingBuilder::printDetCabling_
private

Definition at line 30 of file SiStripFedCablingBuilder.h.

Referenced by beginRun().

◆ printFecCabling_

bool SiStripFedCablingBuilder::printFecCabling_
private

Definition at line 29 of file SiStripFedCablingBuilder.h.

Referenced by beginRun().

◆ printRegionCabling_

bool SiStripFedCablingBuilder::printRegionCabling_
private

Definition at line 31 of file SiStripFedCablingBuilder.h.

Referenced by beginRun().

◆ regionCablingToken_

edm::ESGetToken<SiStripRegionCabling, SiStripRegionCablingRcd> SiStripFedCablingBuilder::regionCablingToken_
private

Definition at line 35 of file SiStripFedCablingBuilder.h.

Referenced by beginRun().

◆ tTopoToken_

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> SiStripFedCablingBuilder::tTopoToken_
private

Definition at line 36 of file SiStripFedCablingBuilder.h.

Referenced by beginRun().

SiStripFedCablingBuilder::printFecCabling_
bool printFecCabling_
Definition: SiStripFedCablingBuilder.h:29
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition: PoolDBOutputService.cc:215
SiStripFedCablingBuilder::detCablingToken_
edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > detCablingToken_
Definition: SiStripFedCablingBuilder.h:34
cond::service::PoolDBOutputService::appendSinceTime
void appendSinceTime(const T *payloadObj, cond::Time_t sinceTime, const std::string &recordName)
Definition: PoolDBOutputService.h:141
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
SiStripFedCabling
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses,...
Definition: SiStripFedCabling.h:25
SiStripFedCablingBuilder::fedCablingToken_
edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcd > fedCablingToken_
Definition: SiStripFedCablingBuilder.h:32
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
SiStripFedCablingBuilder::regionCablingToken_
edm::ESGetToken< SiStripRegionCabling, SiStripRegionCablingRcd > regionCablingToken_
Definition: SiStripFedCablingBuilder.h:35
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
cond::service::PoolDBOutputService::createNewIOV
void createNewIOV(const T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t, const std::string &recordName)
Definition: PoolDBOutputService.h:116
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88271
edm::Service< cond::service::PoolDBOutputService >
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
cond::service::PoolDBOutputService::endOfTime
cond::Time_t endOfTime() const
Definition: PoolDBOutputService.cc:213
writedatasetfile.run
run
Definition: writedatasetfile.py:27
SiStripFedCablingBuilder::printDetCabling_
bool printDetCabling_
Definition: SiStripFedCablingBuilder.h:30
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
cond::service::PoolDBOutputService::isNewTagRequest
bool isNewTagRequest(const std::string &recordName)
Definition: PoolDBOutputService.cc:128
SiStripFedCablingBuilder::printRegionCabling_
bool printRegionCabling_
Definition: SiStripFedCablingBuilder.h:31
SiStripFedCablingBuilder::tTopoToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
Definition: SiStripFedCablingBuilder.h:36
SiStripFedCablingBuilder::fecCablingToken_
edm::ESGetToken< SiStripFecCabling, SiStripFecCablingRcd > fecCablingToken_
Definition: SiStripFedCablingBuilder.h:33
cond::service::PoolDBOutputService::currentTime
cond::Time_t currentTime() const
Definition: PoolDBOutputService.cc:217
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27