CMS 3D CMS Logo

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

#include <CondCore/DQMDaqInfo/src/DQMDaqInfo.cc>

Inheritance diagram for DQMDaqInfo:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 DQMDaqInfo (const edm::ParameterSet &)
 
 ~DQMDaqInfo () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
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 Types

enum  subDetList {
  Pixel, SiStrip, EcalBarrel, EcalEndcap,
  Hcal, DT, CSC, RPC,
  L1T
}
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 

Private Attributes

std::pair< int, int > CSCRange
 
MonitorElementDaqFraction [9]
 
DQMStoredbe_
 
std::pair< int, int > DTRange
 
std::pair< int, int > ECALBarrRange
 
std::pair< int, int > ECALEndcapRangeHigh
 
std::pair< int, int > ECALEndcapRangeLow
 
std::pair< int, int > HcalRange
 
std::pair< int, int > L1TRange
 
float NumberOfFeds [9]
 
std::pair< int, int > PixelRange
 
std::pair< int, int > RPCRange
 
edm::ESGetToken< RunInfo, RunInfoRcdrunInfoToken_
 
std::pair< int, int > TrackerRange
 

Additional Inherited Members

- 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
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 = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 

Detailed Description

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

Implementation: <Notes on="" implementation>="">

Definition at line 45 of file DQMDaqInfo.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 47 of file DQMDaqInfo.h.

◆ MonitorElement

Definition at line 48 of file DQMDaqInfo.h.

Member Enumeration Documentation

◆ subDetList

enum DQMDaqInfo::subDetList
private
Enumerator
Pixel 
SiStrip 
EcalBarrel 
EcalEndcap 
Hcal 
DT 
CSC 
RPC 
L1T 

Definition at line 60 of file DQMDaqInfo.h.

Constructor & Destructor Documentation

◆ DQMDaqInfo()

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

Definition at line 4 of file DQMDaqInfo.cc.

5  : runInfoToken_{esConsumes<edm::Transition::BeginLuminosityBlock>()} {}

◆ ~DQMDaqInfo()

DQMDaqInfo::~DQMDaqInfo ( )
overridedefault

Member Function Documentation

◆ analyze()

void DQMDaqInfo::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 139 of file DQMDaqInfo.cc.

139 {}

◆ beginJob()

void DQMDaqInfo::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 53 of file DQMDaqInfo.cc.

53  {
54  dbe_ = nullptr;
55  dbe_ = edm::Service<DQMStore>().operator->();
56 
57  std::string commonFolder = "/EventInfo/DAQContents";
58  std::string subsystFolder;
59  std::string curentFolder;
60 
61  subsystFolder = "Pixel";
62  curentFolder = subsystFolder + commonFolder;
63  dbe_->setCurrentFolder(curentFolder);
64  DaqFraction[Pixel] = dbe_->bookFloat("PixelDaqFraction");
65 
66  subsystFolder = "SiStrip";
67  curentFolder = subsystFolder + commonFolder;
68  dbe_->setCurrentFolder(curentFolder);
69  DaqFraction[SiStrip] = dbe_->bookFloat("SiStripDaqFraction");
70 
71  subsystFolder = "RPC";
72  curentFolder = subsystFolder + commonFolder;
73  dbe_->setCurrentFolder(curentFolder);
74  DaqFraction[RPC] = dbe_->bookFloat("RPCDaqFraction");
75 
76  subsystFolder = "CSC";
77  curentFolder = subsystFolder + commonFolder;
78  dbe_->setCurrentFolder(curentFolder);
79  DaqFraction[CSC] = dbe_->bookFloat("CSCDaqFraction");
80 
81  subsystFolder = "DT";
82  curentFolder = subsystFolder + commonFolder;
83  dbe_->setCurrentFolder(curentFolder);
84  DaqFraction[DT] = dbe_->bookFloat("DTDaqFraction");
85 
86  subsystFolder = "Hcal";
87  curentFolder = subsystFolder + commonFolder;
88  dbe_->setCurrentFolder(curentFolder);
89  DaqFraction[Hcal] = dbe_->bookFloat("HcalDaqFraction");
90 
91  subsystFolder = "EcalBarrel";
92  curentFolder = subsystFolder + commonFolder;
93  dbe_->setCurrentFolder(curentFolder);
94  DaqFraction[EcalBarrel] = dbe_->bookFloat("EcalBarrDaqFraction");
95 
96  subsystFolder = "EcalEndcap";
97  curentFolder = subsystFolder + commonFolder;
98  dbe_->setCurrentFolder(curentFolder);
99  DaqFraction[EcalEndcap] = dbe_->bookFloat("EcalEndDaqFraction");
100 
101  subsystFolder = "L1T";
102  curentFolder = subsystFolder + commonFolder;
103  dbe_->setCurrentFolder(curentFolder);
104  DaqFraction[L1T] = dbe_->bookFloat("L1TDaqFraction");
105 
112  RPCRange.first = 790;
113  RPCRange.second = 792;
114  DTRange.first = 770;
115  DTRange.second = 774;
120  ECALBarrRange.first = 610;
121  ECALBarrRange.second = 645;
122  ECALEndcapRangeLow.first = 601;
123  ECALEndcapRangeLow.second = 609;
124  ECALEndcapRangeHigh.first = 646;
125  ECALEndcapRangeHigh.second = 654;
126 
127  NumberOfFeds[Pixel] = PixelRange.second - PixelRange.first + 1;
128  NumberOfFeds[SiStrip] = TrackerRange.second - TrackerRange.first + 1;
129  NumberOfFeds[CSC] = CSCRange.second - CSCRange.first + 1;
130  NumberOfFeds[RPC] = RPCRange.second - RPCRange.first + 1;
131  NumberOfFeds[DT] = DTRange.second - DTRange.first + 1;
132  NumberOfFeds[Hcal] = HcalRange.second - HcalRange.first + 1;
133  NumberOfFeds[EcalBarrel] = ECALBarrRange.second - ECALBarrRange.first + 1;
135  (ECALEndcapRangeHigh.second - ECALEndcapRangeHigh.first + 1);
136  NumberOfFeds[L1T] = L1TRange.second - L1TRange.first + 1;
137 }

References dqm::implementation::IBooker::bookFloat(), CSC, CSCRange, DaqFraction, dbe_, DT, DTRange, EcalBarrel, ECALBarrRange, EcalEndcap, ECALEndcapRangeHigh, ECALEndcapRangeLow, Hcal, HcalRange, L1T, L1TRange, FEDNumbering::MAXCSCFEDID, FEDNumbering::MAXHCALFEDID, FEDNumbering::MAXSiPixelFEDID, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MAXTriggerGTPFEDID, FEDNumbering::MINCSCFEDID, FEDNumbering::MINHCALFEDID, FEDNumbering::MINSiPixelFEDID, FEDNumbering::MINSiStripFEDID, FEDNumbering::MINTriggerGTPFEDID, NumberOfFeds, Pixel, PixelRange, RPC, RPCRange, dqm::implementation::DQMStore::setCurrentFolder(), SiStrip, AlCaHLTBitMon_QueryRunRegistry::string, and TrackerRange.

◆ beginLuminosityBlock()

void DQMDaqInfo::beginLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
private

Definition at line 9 of file DQMDaqInfo.cc.

9  {
11 
12  if (iSetup.tryToGet<RunInfoRcd>()) {
13  if (auto sumFED = iSetup.getHandle(runInfoToken_)) {
14  //const RunInfo* summaryFED=sumFED.product();
15 
16  std::vector<int> FedsInIds = sumFED->m_fed_in;
17 
18  float FedCount[9] = {0., 0., 0., 0., 0., 0., 0., 0., 0.};
19 
20  for (int fedID : FedsInIds) {
21  if (fedID >= PixelRange.first && fedID <= PixelRange.second)
22  ++FedCount[Pixel];
23  if (fedID >= TrackerRange.first && fedID <= TrackerRange.second)
24  ++FedCount[SiStrip];
25  if (fedID >= CSCRange.first && fedID <= CSCRange.second)
26  ++FedCount[CSC];
27  if (fedID >= RPCRange.first && fedID <= RPCRange.second)
28  ++FedCount[RPC];
29  if (fedID >= DTRange.first && fedID <= DTRange.second)
30  ++FedCount[DT];
31  if (fedID >= HcalRange.first && fedID <= HcalRange.second)
32  ++FedCount[Hcal];
33  if (fedID >= ECALBarrRange.first && fedID <= ECALBarrRange.second)
34  ++FedCount[EcalBarrel];
35  if ((fedID >= ECALEndcapRangeLow.first && fedID <= ECALEndcapRangeLow.second) ||
36  (fedID >= ECALEndcapRangeHigh.first && fedID <= ECALEndcapRangeHigh.second))
37  ++FedCount[EcalEndcap];
38  if (fedID >= L1TRange.first && fedID <= L1TRange.second)
39  ++FedCount[L1T];
40  }
41 
42  for (int detIndex = 0; detIndex < 9; ++detIndex) {
43  DaqFraction[detIndex]->Fill(FedCount[detIndex] / NumberOfFeds[detIndex]);
44  }
45  }
46  } else {
47  for (auto& detIndex : DaqFraction)
48  detIndex->Fill(-1);
49  return;
50  }
51 }

References CSC, CSCRange, DaqFraction, DT, DTRange, EcalBarrel, ECALBarrRange, EcalEndcap, ECALEndcapRangeHigh, ECALEndcapRangeLow, dqm::impl::MonitorElement::Fill(), edm::eventsetup::heterocontainer::HCTypeTag::findType(), edm::EventSetup::getHandle(), Hcal, HcalRange, L1T, L1TRange, NumberOfFeds, Pixel, PixelRange, RPC, RPCRange, runInfoToken_, SiStrip, TrackerRange, and edm::EventSetup::tryToGet().

Member Data Documentation

◆ CSCRange

std::pair<int, int> DQMDaqInfo::CSCRange
private

Definition at line 66 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

◆ DaqFraction

MonitorElement* DQMDaqInfo::DaqFraction[9]
private

Definition at line 62 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

◆ dbe_

DQMStore* DQMDaqInfo::dbe_
private

Definition at line 58 of file DQMDaqInfo.h.

Referenced by beginJob().

◆ DTRange

std::pair<int, int> DQMDaqInfo::DTRange
private

Definition at line 68 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

◆ ECALBarrRange

std::pair<int, int> DQMDaqInfo::ECALBarrRange
private

Definition at line 70 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

◆ ECALEndcapRangeHigh

std::pair<int, int> DQMDaqInfo::ECALEndcapRangeHigh
private

Definition at line 72 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

◆ ECALEndcapRangeLow

std::pair<int, int> DQMDaqInfo::ECALEndcapRangeLow
private

Definition at line 71 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

◆ HcalRange

std::pair<int, int> DQMDaqInfo::HcalRange
private

Definition at line 69 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

◆ L1TRange

std::pair<int, int> DQMDaqInfo::L1TRange
private

Definition at line 73 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

◆ NumberOfFeds

float DQMDaqInfo::NumberOfFeds[9]
private

Definition at line 75 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

◆ PixelRange

std::pair<int, int> DQMDaqInfo::PixelRange
private

Definition at line 64 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

◆ RPCRange

std::pair<int, int> DQMDaqInfo::RPCRange
private

Definition at line 67 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

◆ runInfoToken_

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

Definition at line 57 of file DQMDaqInfo.h.

Referenced by beginLuminosityBlock().

◆ TrackerRange

std::pair<int, int> DQMDaqInfo::TrackerRange
private

Definition at line 65 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

DQMDaqInfo::SiStrip
Definition: DQMDaqInfo.h:60
edm::eventsetup::heterocontainer::HCTypeTag::findType
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:121
FEDNumbering::MINCSCFEDID
Definition: FEDNumbering.h:51
dqm::implementation::IBooker::bookFloat
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
FEDNumbering::MINSiPixelFEDID
Definition: FEDNumbering.h:27
FEDNumbering::MAXSiPixelFEDID
Definition: FEDNumbering.h:28
DQMDaqInfo::runInfoToken_
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Definition: DQMDaqInfo.h:57
DQMDaqInfo::TrackerRange
std::pair< int, int > TrackerRange
Definition: DQMDaqInfo.h:65
DQMDaqInfo::dbe_
DQMStore * dbe_
Definition: DQMDaqInfo.h:58
DQMDaqInfo::EcalBarrel
Definition: DQMDaqInfo.h:60
edm::eventsetup::EventSetupRecordKey
Definition: EventSetupRecordKey.h:30
DQMDaqInfo::HcalRange
std::pair< int, int > HcalRange
Definition: DQMDaqInfo.h:69
FEDNumbering::MINTriggerGTPFEDID
Definition: FEDNumbering.h:61
FEDNumbering::MAXHCALFEDID
Definition: FEDNumbering.h:48
edm::EventSetup::tryToGet
std::optional< T > tryToGet() const
Definition: EventSetup.h:108
FEDNumbering::MAXTriggerGTPFEDID
Definition: FEDNumbering.h:62
DQMDaqInfo::ECALEndcapRangeHigh
std::pair< int, int > ECALEndcapRangeHigh
Definition: DQMDaqInfo.h:72
DQMDaqInfo::DaqFraction
MonitorElement * DaqFraction[9]
Definition: DQMDaqInfo.h:62
DQMDaqInfo::RPC
Definition: DQMDaqInfo.h:60
FEDNumbering::MINSiStripFEDID
Definition: FEDNumbering.h:29
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
DQMDaqInfo::EcalEndcap
Definition: DQMDaqInfo.h:60
dqm::implementation::DQMStore::setCurrentFolder
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:569
DQMDaqInfo::DTRange
std::pair< int, int > DTRange
Definition: DQMDaqInfo.h:68
RunInfoRcd
Definition: RunSummaryRcd.h:26
L1T
DQMDaqInfo::NumberOfFeds
float NumberOfFeds[9]
Definition: DQMDaqInfo.h:75
FEDNumbering::MINHCALFEDID
Definition: FEDNumbering.h:47
DQMDaqInfo::Pixel
Definition: DQMDaqInfo.h:60
edm::Service
Definition: Service.h:30
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
DQMDaqInfo::L1T
Definition: DQMDaqInfo.h:60
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DQMDaqInfo::Hcal
Definition: DQMDaqInfo.h:60
DQMDaqInfo::RPCRange
std::pair< int, int > RPCRange
Definition: DQMDaqInfo.h:67
DQMDaqInfo::ECALBarrRange
std::pair< int, int > ECALBarrRange
Definition: DQMDaqInfo.h:70
FEDNumbering::MAXCSCFEDID
Definition: FEDNumbering.h:52
DQMDaqInfo::DT
Definition: DQMDaqInfo.h:60
DQMDaqInfo::ECALEndcapRangeLow
std::pair< int, int > ECALEndcapRangeLow
Definition: DQMDaqInfo.h:71
FEDNumbering::MAXSiStripFEDID
Definition: FEDNumbering.h:30
DQMDaqInfo::CSC
Definition: DQMDaqInfo.h:60
DQMDaqInfo::PixelRange
std::pair< int, int > PixelRange
Definition: DQMDaqInfo.h:64
DQMDaqInfo::L1TRange
std::pair< int, int > L1TRange
Definition: DQMDaqInfo.h:73
DQMDaqInfo::CSCRange
std::pair< int, int > CSCRange
Definition: DQMDaqInfo.h:66