CMS 3D CMS Logo

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

#include <SiStripMonitorRawData.h>

Inheritance diagram for SiStripMonitorRawData:
DQMOneEDAnalyzer<> edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmEndRun (edm::Run const &run, edm::EventSetup const &eSetup) override
 
void endJob () override
 
 SiStripMonitorRawData (const edm::ParameterSet &)
 
 ~SiStripMonitorRawData () override
 
- Public Member Functions inherited from DQMOneEDAnalyzer<>
void accumulate (edm::Event const &event, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMOneEDAnalyzer ()
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) 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

MonitorElementBadFedNumber
 
edm::ParameterSet conf_
 
edm::ESHandle< SiStripDetCablingdetcabling
 
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiToken_
 
DQMStoredqmStore_
 
unsigned long long m_cacheID_
 
std::vector< uint32_t > SelectedDetIds
 

Additional Inherited Members

- Public Types inherited from DQMOneEDAnalyzer<>
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from DQMOneEDAnalyzer<>
virtual void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)=0
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- 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)
 
- Protected Attributes inherited from DQMOneEDAnalyzer<>
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Description: <one line="" class="" summary>="">

Usage: <usage>

Definition at line 48 of file SiStripMonitorRawData.h.

Constructor & Destructor Documentation

◆ SiStripMonitorRawData()

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

Definition at line 42 of file SiStripMonitorRawData.cc.

43  : BadFedNumber(nullptr),
45  conf_(iConfig),
46  m_cacheID_(0)
47 
48 {
49  // retrieve producer name of input StripDigiCollection
51  std::string digiType = "VirginRaw";
52  digiToken_ = consumes<edm::DetSetVector<SiStripRawDigi>>(edm::InputTag(digiProducer, digiType));
53 
54  edm::LogInfo("SiStripMonitorRawData") << "SiStripMonitorRawData "
55  << " Constructing....... ";
56 }

References conf_, EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::digiProducer, digiToken_, edm::ParameterSet::getParameter(), HLT_2018_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~SiStripMonitorRawData()

SiStripMonitorRawData::~SiStripMonitorRawData ( )
override

Definition at line 58 of file SiStripMonitorRawData.cc.

58  {
59  edm::LogInfo("SiStripMonitorRawData") << "SiStripMonitorRawData "
60  << " Destructing....... ";
61 }

Member Function Documentation

◆ analyze()

void SiStripMonitorRawData::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 91 of file SiStripMonitorRawData.cc.

91  {
92  edm::LogInfo("SiStripMonitorRawData") << "SiStripMonitorRawData::analyze: Run " << iEvent.id().run() << " Event "
93  << iEvent.id().event();
94 
96 
97  // get DigiCollection object from Event
99  iEvent.getByToken(digiToken_, digi_collection);
100 
101  for (std::vector<uint32_t>::const_iterator idetid = SelectedDetIds.begin(), iEnd = SelectedDetIds.end();
102  idetid != iEnd;
103  ++idetid) {
104  std::vector<edm::DetSet<SiStripRawDigi>>::const_iterator digis = digi_collection->find((*idetid));
105  if (digis == digi_collection->end() || digis->data.empty() || digis->data.size() > 768) {
106  std::vector<const FedChannelConnection *> fed_conns = detcabling->getConnections((*idetid));
107  for (unsigned int k = 0; k < fed_conns.size(); k++) {
108  if (fed_conns[k] && fed_conns[k]->isConnected()) {
109  float fed_id = fed_conns[k]->fedId() + 0.01 * fed_conns[k]->fedCh();
110  BadFedNumber->Fill(fed_id);
111  }
112  }
113  continue;
114  }
115  }
116 }

References BadFedNumber, detcabling, digiToken_, dqm::impl::MonitorElement::Fill(), edm::EventSetup::get(), get, SiStripDetCabling::getConnections(), iEvent, dqmdumpme::k, and SelectedDetIds.

◆ bookHistograms()

void SiStripMonitorRawData::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
override

Definition at line 66 of file SiStripMonitorRawData.cc.

68  {
69  unsigned long long cacheID = eSetup.get<SiStripDetCablingRcd>().cacheIdentifier();
70 
71  if (BadFedNumber)
73  if (m_cacheID_ != cacheID) {
74  m_cacheID_ = cacheID;
75  eSetup.get<SiStripDetCablingRcd>().get(detcabling);
76  SelectedDetIds.clear();
78 
79  edm::LogInfo("SiStripMonitorRawData") << "SiStripMonitorRawData::bookHistograms: "
80  << " Creating MEs for new Cabling ";
81  ibooker.setCurrentFolder("Track/GlobalParameter");
82  if (!BadFedNumber) {
83  BadFedNumber =
84  ibooker.book1D("FaultyFedNumberAndChannel", "Faulty Fed Id and Channel and Numbers", 60000, 0.5, 600.5);
85  BadFedNumber->setAxisTitle("Fed Id and Channel numbers", 1);
86  }
87  }
88 }

References SiStripDetCabling::addActiveDetectorsRawIds(), BadFedNumber, detcabling, edm::EventSetup::get(), get, m_cacheID_, dqm::impl::MonitorElement::Reset(), SelectedDetIds, and dqm::impl::MonitorElement::setAxisTitle().

◆ dqmEndRun()

void SiStripMonitorRawData::dqmEndRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overridevirtual

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 120 of file SiStripMonitorRawData.cc.

120  {
121  bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
123  if (outputMEsInRootFile) {
125  }
126 }

References conf_, dqmStore_, edm::ParameterSet::getParameter(), reco_skim_cfg_mod::outputFileName, dqm::implementation::DQMStore::save(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ endJob()

void SiStripMonitorRawData::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 130 of file SiStripMonitorRawData.cc.

130  {
131  edm::LogInfo("SiStripMonitorRawData") << "SiStripMonitorRawData::EndJob: "
132  << " Finishing!! ";
133 }

Member Data Documentation

◆ BadFedNumber

MonitorElement* SiStripMonitorRawData::BadFedNumber
private

Definition at line 61 of file SiStripMonitorRawData.h.

Referenced by analyze(), and bookHistograms().

◆ conf_

edm::ParameterSet SiStripMonitorRawData::conf_
private

Definition at line 64 of file SiStripMonitorRawData.h.

Referenced by dqmEndRun(), and SiStripMonitorRawData().

◆ detcabling

edm::ESHandle<SiStripDetCabling> SiStripMonitorRawData::detcabling
private

Definition at line 65 of file SiStripMonitorRawData.h.

Referenced by analyze(), and bookHistograms().

◆ digiToken_

edm::EDGetTokenT<edm::DetSetVector<SiStripRawDigi> > SiStripMonitorRawData::digiToken_
private

Definition at line 59 of file SiStripMonitorRawData.h.

Referenced by analyze(), and SiStripMonitorRawData().

◆ dqmStore_

DQMStore* SiStripMonitorRawData::dqmStore_
private

Definition at line 63 of file SiStripMonitorRawData.h.

Referenced by dqmEndRun().

◆ m_cacheID_

unsigned long long SiStripMonitorRawData::m_cacheID_
private

Definition at line 68 of file SiStripMonitorRawData.h.

Referenced by bookHistograms().

◆ SelectedDetIds

std::vector<uint32_t> SiStripMonitorRawData::SelectedDetIds
private

Definition at line 66 of file SiStripMonitorRawData.h.

Referenced by analyze(), and bookHistograms().

SiStripDetCabling::addActiveDetectorsRawIds
void addActiveDetectorsRawIds(std::vector< uint32_t > &) const
Definition: SiStripDetCabling.cc:134
SiStripMonitorRawData::digiToken_
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiToken_
Definition: SiStripMonitorRawData.h:59
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.digiProducer
digiProducer
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:43
edm::LogInfo
Definition: MessageLogger.h:254
SiStripMonitorRawData::m_cacheID_
unsigned long long m_cacheID_
Definition: SiStripMonitorRawData.h:68
edm::Handle
Definition: AssociativeIterator.h:50
Utilities.operator
operator
Definition: Utilities.py:24
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
dqm::impl::MonitorElement::Reset
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
Definition: MonitorElement.cc:354
reco_skim_cfg_mod.outputFileName
outputFileName
Definition: reco_skim_cfg_mod.py:15
SiStripMonitorRawData::detcabling
edm::ESHandle< SiStripDetCabling > detcabling
Definition: SiStripMonitorRawData.h:65
dqmdumpme.k
k
Definition: dqmdumpme.py:60
SiStripDetCablingRcd
Definition: SiStripDependentRecords.h:19
dqm::implementation::DQMStore::save
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
Definition: DQMStore.cc:760
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::Service
Definition: Service.h:30
iEvent
int iEvent
Definition: GenABIO.cc:224
SiStripMonitorRawData::dqmStore_
DQMStore * dqmStore_
Definition: SiStripMonitorRawData.h:63
SiStripMonitorRawData::BadFedNumber
MonitorElement * BadFedNumber
Definition: SiStripMonitorRawData.h:61
get
#define get
SiStripMonitorRawData::conf_
edm::ParameterSet conf_
Definition: SiStripMonitorRawData.h:64
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
SiStripMonitorRawData::SelectedDetIds
std::vector< uint32_t > SelectedDetIds
Definition: SiStripMonitorRawData.h:66
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
SiStripDetCabling::getConnections
const std::vector< const FedChannelConnection * > & getConnections(uint32_t det_id) const
Definition: SiStripDetCabling.cc:161