CMS 3D CMS Logo

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

#include <DTDAQInfo.h>

Inheritance diagram for DTDAQInfo:
DQMEDHarvester edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 DTDAQInfo (const edm::ParameterSet &pset)
 Constructor. More...
 
 ~DTDAQInfo () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginJob () override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &) override
 
virtual void dqmAnalyze (DQMStore::IBooker &, DQMStore::IGetter &, edm::Event const &, edm::EventSetup const &)
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
 DQMEDHarvester ()
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endProcessBlockProduce (edm::ProcessBlock &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &es) final
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 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
 
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)
 

Protected Member Functions

void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 
- 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 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)
 

Private Attributes

bool bookingdone
 
bool checkUros
 
std::map< int, MonitorElement * > daqFractions
 
MonitorElementdaqMap
 
const DTReadOutMappingmapping
 
edm::ESGetToken< DTReadOutMapping, DTReadOutMappingRcdmappingToken_
 
edm::ESGetToken< RunInfo, RunInfoRcdrunInfoToken_
 
const RunInfosumFED
 
MonitorElementtotalDAQFraction
 

Additional Inherited Members

- Public Types inherited from DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::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 Attributes inherited from DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenjobmegetter_
 
edm::EDPutTokenT< DQMTokenjobToken_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

No description available.

Author
G. Cerminara - INFN Torino

threadsafe version (//-) oct/nov 2014 - WATWanAbdullah ncpp-um-my

Definition at line 27 of file DTDAQInfo.h.

Constructor & Destructor Documentation

◆ DTDAQInfo()

DTDAQInfo::DTDAQInfo ( const edm::ParameterSet pset)

Constructor.

Definition at line 29 of file DTDAQInfo.cc.

References bookingdone, checkUros, edm::EndLuminosityBlock, and muonDTDigis_cfi::pset.

30  : mappingToken_(esConsumes<edm::Transition::EndLuminosityBlock>()),
31  runInfoToken_(esConsumes<edm::Transition::EndLuminosityBlock>()) {
32  bookingdone = false;
33  checkUros = pset.getUntrackedParameter<bool>("checkUros", true);
34 }
bool checkUros
Definition: DTDAQInfo.h:48
edm::ESGetToken< DTReadOutMapping, DTReadOutMappingRcd > mappingToken_
Definition: DTDAQInfo.h:53
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Definition: DTDAQInfo.h:56
bool bookingdone
Definition: DTDAQInfo.h:45

◆ ~DTDAQInfo()

DTDAQInfo::~DTDAQInfo ( )
override

Destructor.

Definition at line 36 of file DTDAQInfo.cc.

36 {}

Member Function Documentation

◆ dqmEndJob()

void DTDAQInfo::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 125 of file DTDAQInfo.cc.

125 {}

◆ dqmEndLuminosityBlock()

void DTDAQInfo::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  setup 
)
overrideprotectedvirtual

Reimplemented from DQMEDHarvester.

Definition at line 38 of file DTDAQInfo.cc.

References dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookFloat(), bookingdone, checkUros, daqFractions, daqMap, dqm::impl::MonitorElement::Fill(), dqm::impl::MonitorElement::getFloatValue(), LogTrace, RunInfo::m_fed_in, mapping, mappingToken_, FEDNumbering::MAXDTFEDID, FEDNumbering::MINDTFEDID, DTReadOutMapping::readOutToGeometry(), dqm::impl::MonitorElement::Reset(), runInfoToken_, dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), singleTopDQM_cfi::setup, HLT_2022v11_cff::streams, sumFED, totalDAQFraction, and makeMuonMisalignmentScenario::wheel.

41  {
42  if (!bookingdone) {
43  // retrieve the mapping
44  mapping = &setup.getData(mappingToken_);
45 
46  // book the ME
47  // global fraction
48 
49  ibooker.setCurrentFolder("DT/EventInfo");
50 
51  totalDAQFraction = ibooker.bookFloat("DAQSummary");
53 
54  // map
55  daqMap = ibooker.book2D("DAQSummaryMap", "DT Certification Summary Map", 12, 1, 13, 5, -2, 3);
56  daqMap->setAxisTitle("sector", 1);
57  daqMap->setAxisTitle("wheel", 2);
58 
59  // Wheel "fractions" -> will be 0 or 1
60 
61  ibooker.setCurrentFolder("DT/EventInfo/DAQContents");
62  for (int wheel = -2; wheel != 3; ++wheel) {
63  stringstream streams;
64  streams << "DT_Wheel" << wheel;
65 
66  daqFractions[wheel] = ibooker.bookFloat(streams.str());
67  daqFractions[wheel]->Fill(-1);
68  }
69  bookingdone = true;
70  } //booking done
71 
72  if (auto runInfoRec = setup.tryToGet<RunInfoRcd>()) {
73  // reset to 0
75  daqFractions[-2]->Fill(0.);
76  daqFractions[-1]->Fill(0.);
77  daqFractions[-0]->Fill(0.);
78  daqFractions[1]->Fill(0.);
79  daqFractions[2]->Fill(0.);
80 
81  daqMap->Reset();
82  //get fed summary information
83  auto sumFED = runInfoRec->get(runInfoToken_);
84  const vector<int> fedInIDs = sumFED.m_fed_in;
85 
86  // the range of DT feds
87  static const int FEDIDmin = FEDNumbering::MINDTFEDID;
88  static const int FEDIDMax = FEDNumbering::MAXDTFEDID;
89 
90  //FIXME for uROS FEDIDs once mapping has been defined
91  if (checkUros) {
92  LogTrace("DQM|DTMonitorClient|DTDAQInfo") << "Checking uROS FEDs as Legacy FEDs" << endl;
93  }
94 
95  // loop on all active feds
96  for (vector<int>::const_iterator fed = fedInIDs.begin(); fed != fedInIDs.end(); ++fed) {
97  // check if the fed is in the DT range
98  if (!(*fed >= FEDIDmin && *fed <= FEDIDMax))
99  continue;
100 
101  // check if the 12 channels are connected to any sector and fill the wheel percentage accordignly
102  int wheel = -99;
103  int sector = -99;
104  int dummy = -99;
105  for (int ros = 1; ros != 13; ++ros) {
106  if (!mapping->readOutToGeometry(*fed, ros, 2, 2, 2, wheel, dummy, sector, dummy, dummy, dummy)) {
107  LogTrace("DQM|DTMonitorClient|DTDAQInfo")
108  << "FED: " << *fed << " Ch: " << ros << " wheel: " << wheel << " Sect: " << sector << endl;
109  daqFractions[wheel]->Fill(daqFractions[wheel]->getFloatValue() + 1. / 12.);
111  daqMap->Fill(sector, wheel);
112  }
113  }
114  }
115  } else {
116  LogWarning("DQM|DTMonitorClient|DTDAQInfo") << "*** Warning: record key not found for RunInfoRcd" << endl;
117  totalDAQFraction->Fill(-1);
118  for (int wheel = -2; wheel != 3; ++wheel) {
119  daqFractions[wheel]->Fill(-1);
120  }
121  return;
122  }
123 }
int readOutToGeometry(int dduId, int rosId, int robId, int tdcId, int channelId, DTWireId &wireId) const
transform identifiers
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
bool checkUros
Definition: DTDAQInfo.h:48
edm::ESGetToken< DTReadOutMapping, DTReadOutMappingRcd > mappingToken_
Definition: DTDAQInfo.h:53
#define LogTrace(id)
const RunInfo * sumFED
Definition: DTDAQInfo.h:57
void Fill(long long x)
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Definition: DTDAQInfo.h:56
virtual double getFloatValue() const
std::vector< int > m_fed_in
Definition: RunInfo.h:25
MonitorElement * daqMap
Definition: DTDAQInfo.h:51
MonitorElement * totalDAQFraction
Definition: DTDAQInfo.h:50
bool bookingdone
Definition: DTDAQInfo.h:45
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
std::map< int, MonitorElement * > daqFractions
Definition: DTDAQInfo.h:52
const DTReadOutMapping * mapping
Definition: DTDAQInfo.h:54
Log< level::Warning, false > LogWarning
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

Member Data Documentation

◆ bookingdone

bool DTDAQInfo::bookingdone
private

Definition at line 45 of file DTDAQInfo.h.

Referenced by dqmEndLuminosityBlock(), and DTDAQInfo().

◆ checkUros

bool DTDAQInfo::checkUros
private

Definition at line 48 of file DTDAQInfo.h.

Referenced by dqmEndLuminosityBlock(), and DTDAQInfo().

◆ daqFractions

std::map<int, MonitorElement *> DTDAQInfo::daqFractions
private

Definition at line 52 of file DTDAQInfo.h.

Referenced by dqmEndLuminosityBlock().

◆ daqMap

MonitorElement* DTDAQInfo::daqMap
private

Definition at line 51 of file DTDAQInfo.h.

Referenced by dqmEndLuminosityBlock().

◆ mapping

const DTReadOutMapping* DTDAQInfo::mapping
private

Definition at line 54 of file DTDAQInfo.h.

Referenced by dqmEndLuminosityBlock(), and progressbar.FormatLabel::update().

◆ mappingToken_

edm::ESGetToken<DTReadOutMapping, DTReadOutMappingRcd> DTDAQInfo::mappingToken_
private

Definition at line 53 of file DTDAQInfo.h.

Referenced by dqmEndLuminosityBlock().

◆ runInfoToken_

edm::ESGetToken<RunInfo, RunInfoRcd> DTDAQInfo::runInfoToken_
private

Definition at line 56 of file DTDAQInfo.h.

Referenced by dqmEndLuminosityBlock().

◆ sumFED

const RunInfo* DTDAQInfo::sumFED
private

Definition at line 57 of file DTDAQInfo.h.

Referenced by dqmEndLuminosityBlock().

◆ totalDAQFraction

MonitorElement* DTDAQInfo::totalDAQFraction
private

Definition at line 50 of file DTDAQInfo.h.

Referenced by dqmEndLuminosityBlock().