CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () 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 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)
 

Private Attributes

MonitorElementBadFedNumber
 
edm::ParameterSet conf_
 
edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcddetCablingToken_
 
edm::ESWatcher< SiStripDetCablingRcddetCablingWatcher_
 
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiToken_
 
DQMStoredqmStore_
 
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
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
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 dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
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)
 
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 ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- 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)
 
- Protected Attributes inherited from DQMOneEDAnalyzer<>
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

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

Usage: <usage>

Definition at line 42 of file SiStripMonitorRawData.h.

Constructor & Destructor Documentation

◆ SiStripMonitorRawData()

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

Definition at line 37 of file SiStripMonitorRawData.cc.

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

38  : BadFedNumber(nullptr),
40  conf_(iConfig),
41  detCablingToken_(esConsumes<edm::Transition::BeginRun>())
42 
43 {
44  // retrieve producer name of input StripDigiCollection
46  std::string digiType = "VirginRaw";
47  digiToken_ = consumes<edm::DetSetVector<SiStripRawDigi>>(edm::InputTag(digiProducer, digiType));
48 
49  edm::LogInfo("SiStripMonitorRawData") << "SiStripMonitorRawData "
50  << " Constructing....... ";
51 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
Log< level::Info, false > LogInfo
edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > detCablingToken_
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiToken_
MonitorElement * BadFedNumber

◆ ~SiStripMonitorRawData()

SiStripMonitorRawData::~SiStripMonitorRawData ( )
override

Definition at line 53 of file SiStripMonitorRawData.cc.

53  {
54  edm::LogInfo("SiStripMonitorRawData") << "SiStripMonitorRawData "
55  << " Destructing....... ";
56 }
Log< level::Info, false > LogInfo

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 84 of file SiStripMonitorRawData.cc.

References BadFedNumber, detCablingToken_, digiToken_, dqm::impl::MonitorElement::Fill(), edm::EventSetup::getData(), iEvent, dqmdumpme::k, and SelectedDetIds.

84  {
85  edm::LogInfo("SiStripMonitorRawData") << "SiStripMonitorRawData::analyze: Run " << iEvent.id().run() << " Event "
86  << iEvent.id().event();
87 
88  const auto &detcabling = iSetup.getData(detCablingToken_);
89 
90  // get DigiCollection object from Event
92  iEvent.getByToken(digiToken_, digi_collection);
93 
94  for (std::vector<uint32_t>::const_iterator idetid = SelectedDetIds.begin(), iEnd = SelectedDetIds.end();
95  idetid != iEnd;
96  ++idetid) {
97  std::vector<edm::DetSet<SiStripRawDigi>>::const_iterator digis = digi_collection->find((*idetid));
98  if (digis == digi_collection->end() || digis->data.empty() || digis->data.size() > 768) {
99  std::vector<const FedChannelConnection *> fed_conns = detcabling.getConnections((*idetid));
100  for (unsigned int k = 0; k < fed_conns.size(); k++) {
101  if (fed_conns[k] && fed_conns[k]->isConnected()) {
102  float fed_id = fed_conns[k]->fedId() + 0.01 * fed_conns[k]->fedCh();
103  BadFedNumber->Fill(fed_id);
104  }
105  }
106  continue;
107  }
108  }
109 }
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:224
Log< level::Info, false > LogInfo
std::vector< uint32_t > SelectedDetIds
edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > detCablingToken_
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiToken_
MonitorElement * BadFedNumber

◆ bookHistograms()

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

Implements DQMOneEDAnalyzer<>.

Definition at line 61 of file SiStripMonitorRawData.cc.

References BadFedNumber, dqm::implementation::IBooker::book1D(), edm::ESWatcher< T >::check(), detCablingToken_, detCablingWatcher_, edm::EventSetup::getData(), dqm::impl::MonitorElement::Reset(), SelectedDetIds, dqm::impl::MonitorElement::setAxisTitle(), and dqm::implementation::NavigatorBase::setCurrentFolder().

63  {
64  if (BadFedNumber)
66 
67  if (detCablingWatcher_.check(eSetup)) {
68  SelectedDetIds.clear();
69  const auto &detcabling = eSetup.getData(detCablingToken_);
70  detcabling.addActiveDetectorsRawIds(SelectedDetIds);
71 
72  edm::LogInfo("SiStripMonitorRawData") << "SiStripMonitorRawData::bookHistograms: "
73  << " Creating MEs for new Cabling ";
74  ibooker.setCurrentFolder("Track/GlobalParameter");
75  if (!BadFedNumber) {
76  BadFedNumber =
77  ibooker.book1D("FaultyFedNumberAndChannel", "Faulty Fed Id and Channel and Numbers", 60000, 0.5, 600.5);
78  BadFedNumber->setAxisTitle("Fed Id and Channel numbers", 1);
79  }
80  }
81 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
edm::ESWatcher< SiStripDetCablingRcd > detCablingWatcher_
Log< level::Info, false > LogInfo
std::vector< uint32_t > SelectedDetIds
edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > detCablingToken_
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * BadFedNumber
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

◆ dqmEndRun()

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

Reimplemented from DQMOneEDAnalyzer<>.

Definition at line 113 of file SiStripMonitorRawData.cc.

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

113  {
114  bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
116  if (outputMEsInRootFile) {
118  }
119 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
Definition: DQMStore.cc:824

◆ endJob()

void SiStripMonitorRawData::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 123 of file SiStripMonitorRawData.cc.

123  {
124  edm::LogInfo("SiStripMonitorRawData") << "SiStripMonitorRawData::EndJob: "
125  << " Finishing!! ";
126 }
Log< level::Info, false > LogInfo

Member Data Documentation

◆ BadFedNumber

MonitorElement* SiStripMonitorRawData::BadFedNumber
private

Definition at line 55 of file SiStripMonitorRawData.h.

Referenced by analyze(), and bookHistograms().

◆ conf_

edm::ParameterSet SiStripMonitorRawData::conf_
private

Definition at line 58 of file SiStripMonitorRawData.h.

Referenced by dqmEndRun(), and SiStripMonitorRawData().

◆ detCablingToken_

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

Definition at line 61 of file SiStripMonitorRawData.h.

Referenced by analyze(), and bookHistograms().

◆ detCablingWatcher_

edm::ESWatcher<SiStripDetCablingRcd> SiStripMonitorRawData::detCablingWatcher_
private

Definition at line 62 of file SiStripMonitorRawData.h.

Referenced by bookHistograms().

◆ digiToken_

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

Definition at line 53 of file SiStripMonitorRawData.h.

Referenced by analyze(), and SiStripMonitorRawData().

◆ dqmStore_

DQMStore* SiStripMonitorRawData::dqmStore_
private

Definition at line 57 of file SiStripMonitorRawData.h.

Referenced by dqmEndRun().

◆ SelectedDetIds

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

Definition at line 59 of file SiStripMonitorRawData.h.

Referenced by analyze(), and bookHistograms().