CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
SiStripFedCablingBuilder Class Reference
Inheritance diagram for SiStripFedCablingBuilder:
edm::one::EDAnalyzer< edm::one::WatchRuns > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginRun (const edm::Run &, const edm::EventSetup &) override
 
void endRun (const edm::Run &, const edm::EventSetup &) override
 
 SiStripFedCablingBuilder (const edm::ParameterSet &iConfig)
 
 ~SiStripFedCablingBuilder () override=default
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, 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)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 24 of file SiStripFedCablingBuilder.cc.

Constructor & Destructor Documentation

◆ SiStripFedCablingBuilder()

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

Definition at line 47 of file SiStripFedCablingBuilder.cc.

48  : printFecCabling_(pset.getUntrackedParameter<bool>("PrintFecCabling", false)),
49  printDetCabling_(pset.getUntrackedParameter<bool>("PrintDetCabling", false)),
50  printRegionCabling_(pset.getUntrackedParameter<bool>("PrintRegionCabling", false)),
51  fedCablingToken_(esConsumes<edm::Transition::BeginRun>()),
52  fecCablingToken_(esConsumes<edm::Transition::BeginRun>()),
53  detCablingToken_(esConsumes<edm::Transition::BeginRun>()),
54  regionCablingToken_(esConsumes<edm::Transition::BeginRun>()),
55  tTopoToken_(esConsumes<edm::Transition::BeginRun>()) {}
const edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > detCablingToken_
const edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcd > fedCablingToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
const edm::ESGetToken< SiStripRegionCabling, SiStripRegionCablingRcd > regionCablingToken_
const edm::ESGetToken< SiStripFecCabling, SiStripFecCablingRcd > fecCablingToken_

◆ ~SiStripFedCablingBuilder()

SiStripFedCablingBuilder::~SiStripFedCablingBuilder ( )
overridedefault

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 31 of file SiStripFedCablingBuilder.cc.

31 {}

◆ beginRun()

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

Definition at line 59 of file SiStripFedCablingBuilder.cc.

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

59  {
60  edm::LogInfo("SiStripFedCablingBuilder")
61  << "... creating dummy SiStripFedCabling Data for Run " << run.run() << "\n " << std::endl;
62 
63  edm::LogVerbatim("SiStripFedCablingBuilder") << "[SiStripFedCablingBuilder::" << __func__ << "]"
64  << " Retrieving FED cabling...";
65  auto fed = setup.getHandle(fedCablingToken_);
66 
67  edm::LogVerbatim("SiStripFedCablingBuilder") << "[SiStripFedCablingBuilder::" << __func__ << "]"
68  << " Retrieving FEC cabling...";
69  auto fec = setup.getHandle(fecCablingToken_);
70 
71  edm::LogVerbatim("SiStripFedCablingBuilder") << "[SiStripFedCablingBuilder::" << __func__ << "]"
72  << " Retrieving DET cabling...";
73  auto det = setup.getHandle(detCablingToken_);
74 
75  edm::LogVerbatim("SiStripFedCablingBuilder") << "[SiStripFedCablingBuilder::" << __func__ << "]"
76  << " Retrieving REGION cabling...";
77  auto region = setup.getHandle(regionCablingToken_);
78 
79  if (!fed.isValid()) {
80  edm::LogError("SiStripFedCablingBuilder") << " Invalid handle to FED cabling object: ";
81  return;
82  }
83 
84  const auto tTopo = &setup.getData(tTopoToken_);
85  {
86  std::stringstream ss;
87  ss << "[SiStripFedCablingBuilder::" << __func__ << "]"
88  << " VERBOSE DEBUG" << std::endl;
89  fed->print(ss, tTopo);
90  ss << std::endl;
91  if (printFecCabling_ && fec.isValid()) {
92  fec->print(ss);
93  }
94  ss << std::endl;
95  if (printDetCabling_ && det.isValid()) {
96  det->print(ss);
97  }
98  ss << std::endl;
99  if (printRegionCabling_ && region.isValid()) {
100  region->print(ss);
101  }
102  ss << std::endl;
103  edm::LogVerbatim("SiStripFedCablingBuilder") << ss.str();
104  }
105 
106  {
107  std::stringstream ss;
108  ss << "[SiStripFedCablingBuilder::" << __func__ << "]"
109  << " TERSE DEBUG" << std::endl;
110  fed->terse(ss);
111  ss << std::endl;
112  edm::LogVerbatim("SiStripFedCablingBuilder") << ss.str();
113  }
114 
115  {
116  std::stringstream ss;
117  ss << "[SiStripFedCablingBuilder::" << __func__ << "]"
118  << " SUMMARY DEBUG" << std::endl;
119  fed->summary(ss, tTopo);
120  ss << std::endl;
121  edm::LogVerbatim("SiStripFedCablingBuilder") << ss.str();
122  }
123 
124  edm::LogVerbatim("SiStripFedCablingBuilder") << "[SiStripFedCablingBuilder::" << __func__ << "]"
125  << " Copying FED cabling...";
126  SiStripFedCabling obj(*(fed.product()));
127 
128  //End now write sistripnoises data in DB
130 
131  if (mydbservice.isAvailable()) {
132  if (mydbservice->isNewTagRequest("SiStripFedCablingRcd")) {
133  mydbservice->createOneIOV<SiStripFedCabling>(obj, mydbservice->beginOfTime(), "SiStripFedCablingRcd");
134  } else {
135  mydbservice->appendOneIOV<SiStripFedCabling>(obj, mydbservice->currentTime(), "SiStripFedCablingRcd");
136  }
137  } else {
138  edm::LogError("SiStripFedCablingBuilder") << "Service is unavailable" << std::endl;
139  }
140 }
Log< level::Info, true > LogVerbatim
const edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > detCablingToken_
const edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcd > fedCablingToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
Log< level::Error, false > LogError
void createOneIOV(const T &payload, cond::Time_t firstSinceTime, const std::string &recordName)
void appendOneIOV(const T &payload, cond::Time_t sinceTime, const std::string &recordName)
bool isNewTagRequest(const std::string &recordName)
Log< level::Info, false > LogInfo
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
bool isAvailable() const
Definition: Service.h:40
const edm::ESGetToken< SiStripRegionCabling, SiStripRegionCablingRcd > regionCablingToken_
const edm::ESGetToken< SiStripFecCabling, SiStripFecCablingRcd > fecCablingToken_

◆ endRun()

void SiStripFedCablingBuilder::endRun ( const edm::Run ,
const edm::EventSetup  
)
inlineoverride

Definition at line 32 of file SiStripFedCablingBuilder.cc.

32 {};

Member Data Documentation

◆ detCablingToken_

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

Definition at line 40 of file SiStripFedCablingBuilder.cc.

Referenced by beginRun().

◆ fecCablingToken_

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

Definition at line 39 of file SiStripFedCablingBuilder.cc.

Referenced by beginRun().

◆ fedCablingToken_

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

Definition at line 38 of file SiStripFedCablingBuilder.cc.

Referenced by beginRun().

◆ printDetCabling_

const bool SiStripFedCablingBuilder::printDetCabling_
private

Definition at line 36 of file SiStripFedCablingBuilder.cc.

Referenced by beginRun().

◆ printFecCabling_

const bool SiStripFedCablingBuilder::printFecCabling_
private

Definition at line 32 of file SiStripFedCablingBuilder.cc.

Referenced by beginRun().

◆ printRegionCabling_

const bool SiStripFedCablingBuilder::printRegionCabling_
private

Definition at line 37 of file SiStripFedCablingBuilder.cc.

Referenced by beginRun().

◆ regionCablingToken_

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

Definition at line 41 of file SiStripFedCablingBuilder.cc.

Referenced by beginRun().

◆ tTopoToken_

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

Definition at line 42 of file SiStripFedCablingBuilder.cc.

Referenced by beginRun().