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::EDAnalyzer edm::EDConsumerBase

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer 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::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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 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 &) override
 
void endJob () override
 

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
 
std::pair< int, int > TrackerRange
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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)
 

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.

4 {}

◆ ~DQMDaqInfo()

DQMDaqInfo::~DQMDaqInfo ( )
overridedefault

Member Function Documentation

◆ analyze()

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

Implements edm::EDAnalyzer.

Definition at line 142 of file DQMDaqInfo.cc.

142 {}

◆ beginJob()

void DQMDaqInfo::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 54 of file DQMDaqInfo.cc.

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

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 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 8 of file DQMDaqInfo.cc.

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

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

◆ endJob()

void DQMDaqInfo::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 140 of file DQMDaqInfo.cc.

140 {}

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().

◆ 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
dqm::implementation::IBooker::bookFloat
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
DQMDaqInfo::TrackerRange
std::pair< int, int > TrackerRange
Definition: DQMDaqInfo.h:65
FEDNumbering::MAXCSCFEDID
Definition: FEDNumbering.h:52
RunInfo::m_fed_in
std::vector< int > m_fed_in
Definition: RunInfo.h:25
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
edm::EventSetup::tryToGet
std::optional< T > tryToGet() const
Definition: EventSetup.h:94
FEDNumbering::MAXSiPixelFEDID
Definition: FEDNumbering.h:28
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
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
edm::ESHandle
Definition: DTSurvey.h:22
FEDNumbering::MAXTriggerGTPFEDID
Definition: FEDNumbering.h:62
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
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DQMDaqInfo::NumberOfFeds
float NumberOfFeds[9]
Definition: DQMDaqInfo.h:75
FEDNumbering::MAXSiStripFEDID
Definition: FEDNumbering.h:30
DQMDaqInfo::Pixel
Definition: DQMDaqInfo.h:60
edm::Service
Definition: Service.h:30
DQMDaqInfo::L1T
Definition: DQMDaqInfo.h:60
FEDNumbering::MINCSCFEDID
Definition: FEDNumbering.h:51
DQMDaqInfo::Hcal
Definition: DQMDaqInfo.h:60
FEDNumbering::MINSiPixelFEDID
Definition: FEDNumbering.h:27
DQMDaqInfo::RPCRange
std::pair< int, int > RPCRange
Definition: DQMDaqInfo.h:67
DQMDaqInfo::ECALBarrRange
std::pair< int, int > ECALBarrRange
Definition: DQMDaqInfo.h:70
DQMDaqInfo::DT
Definition: DQMDaqInfo.h:60
FEDNumbering::MINHCALFEDID
Definition: FEDNumbering.h:47
DQMDaqInfo::ECALEndcapRangeLow
std::pair< int, int > ECALEndcapRangeLow
Definition: DQMDaqInfo.h:71
DQMDaqInfo::CSC
Definition: DQMDaqInfo.h:60
FEDNumbering::MAXHCALFEDID
Definition: FEDNumbering.h:48
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
FEDNumbering::MINTriggerGTPFEDID
Definition: FEDNumbering.h:61
FEDNumbering::MINSiStripFEDID
Definition: FEDNumbering.h:29