CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
SiPhase2BadStripChannelReader Class Reference
Inheritance diagram for SiPhase2BadStripChannelReader:
edm::global::EDAnalyzer<> edm::global::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (edm::StreamID, edm::Event const &, edm::EventSetup const &) const override
 
 SiPhase2BadStripChannelReader (const edm::ParameterSet &)
 
 ~SiPhase2BadStripChannelReader () override=default
 
- Public Member Functions inherited from edm::global::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
bool wantsStreamLuminosityBlocks () const noexcept final
 
bool wantsStreamRuns () const noexcept final
 
- Public Member Functions inherited from edm::global::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () 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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::global::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Attributes

const edm::ESGetToken< SiStripBadStrip, SiPhase2OuterTrackerBadStripRcdbadStripToken_
 
const std::string label_
 
const int printdebug_
 
const bool printverbose_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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 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 18 of file SiPhase2BadStripChannelReader.cc.

Constructor & Destructor Documentation

◆ SiPhase2BadStripChannelReader()

SiPhase2BadStripChannelReader::SiPhase2BadStripChannelReader ( const edm::ParameterSet iConfig)
explicit

Definition at line 33 of file SiPhase2BadStripChannelReader.cc.

References label_.

34  : printverbose_(iConfig.getUntrackedParameter<bool>("printVerbose", false)),
35  printdebug_(iConfig.getUntrackedParameter<int>("printDebug", 1)),
36  label_(iConfig.getUntrackedParameter<std::string>("label", "")),
const edm::ESGetToken< SiStripBadStrip, SiPhase2OuterTrackerBadStripRcd > badStripToken_
T getUntrackedParameter(std::string const &, T const &) const

◆ ~SiPhase2BadStripChannelReader()

SiPhase2BadStripChannelReader::~SiPhase2BadStripChannelReader ( )
overridedefault

Member Function Documentation

◆ analyze()

void SiPhase2BadStripChannelReader::analyze ( edm::StreamID  ,
edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
) const
overridevirtual

Implements edm::global::EDAnalyzerBase.

Definition at line 39 of file SiPhase2BadStripChannelReader.cc.

References badStripToken_, Phase2TrackerDigi::channelToPixel(), ztail::d, edm::EventSetup::getData(), ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets::if(), label_, jetsAK4_Puppi_cff::payload, printdebug_, printverbose_, isotrackApplyRegressor::range, and contentValuesCheck::ss.

41  {
42  const auto& payload = &iSetup.getData(badStripToken_);
43 
44  edm::LogInfo("SiPhase2BadStripChannelReader")
45  << "[SiPhase2BadStripChannelReader::analyze] End Reading SiStriBadStrip with label " << label_ << std::endl;
46 
47  const TrackerTopology* ttopo = nullptr;
48 
49  std::stringstream ss;
50  if (printverbose_) {
51  payload->printDebug(ss, ttopo);
52  }
53 
54  std::vector<uint32_t> detIds;
55  payload->getDetIds(detIds);
56 
57  int countMessages{0};
58  for (const auto& d : detIds) {
60  for (std::vector<unsigned int>::const_iterator badChannel = range.first; badChannel != range.second; ++badChannel) {
61  const auto& firstStrip = payload->decodePhase2(*badChannel).firstStrip;
62  const auto& range = payload->decodePhase2(*badChannel).range;
63 
64  if (printverbose_) {
65  ss << "DetId= " << d << " Channel=" << payload->decodePhase2(*badChannel).firstStrip << ":"
66  << payload->decodePhase2(*badChannel).range << std::endl;
67  }
68 
69  if (countMessages < printdebug_) {
70  for (unsigned int index = 0; index < range; index++) {
71  std::pair<int, int> badStrip = Phase2TrackerDigi::channelToPixel(firstStrip + index);
72  ss << "DetId= " << d << " Channel= " << firstStrip + index << " -> strip (row,col)=(" << badStrip.first << ","
73  << badStrip.second << ")" << std::endl;
74  }
75  } // if doesn't exceed the maximum printout level
76  } // loop over the range
77  countMessages++;
78  } // loop over the detids
79 
80  edm::LogInfo("SiPhase2BadStripChannelReader") << ss.str() << std::endl;
81 }
const edm::ESGetToken< SiStripBadStrip, SiPhase2OuterTrackerBadStripRcd > badStripToken_
d
Definition: ztail.py:151
Log< level::Info, false > LogInfo
static std::pair< unsigned int, unsigned int > channelToPixel(unsigned int ch)
std::pair< ContainerIterator, ContainerIterator > Range
if(threadIdxLocalY==0 &&threadIdxLocalX==0)

◆ fillDescriptions()

void SiPhase2BadStripChannelReader::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 84 of file SiPhase2BadStripChannelReader.cc.

References edm::ConfigurationDescriptions::addWithDefaultLabel(), submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

84  {
86  desc.setComment("Module to read SiStripBadStrip Payloads through SiPhase2OuterTrackerBadStripRcd");
87  desc.addUntracked<bool>("printVerbose", false)->setComment("if active, very verbose output");
88  desc.addUntracked<int>("printDebug", 1)->setComment("tunes the amount of debug level print-outs");
89  desc.addUntracked<std::string>("label", "")->setComment("label from which to read the payload");
90  descriptions.addWithDefaultLabel(desc);
91 }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)

Member Data Documentation

◆ badStripToken_

const edm::ESGetToken<SiStripBadStrip, SiPhase2OuterTrackerBadStripRcd> SiPhase2BadStripChannelReader::badStripToken_
private

Definition at line 30 of file SiPhase2BadStripChannelReader.cc.

Referenced by analyze().

◆ label_

const std::string SiPhase2BadStripChannelReader::label_
private

◆ printdebug_

const int SiPhase2BadStripChannelReader::printdebug_
private

Definition at line 28 of file SiPhase2BadStripChannelReader.cc.

Referenced by analyze().

◆ printverbose_

const bool SiPhase2BadStripChannelReader::printverbose_
private

Definition at line 27 of file SiPhase2BadStripChannelReader.cc.

Referenced by analyze().