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=default
 
- 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 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)
 

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

Detailed Description

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

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

Definition at line 46 of file DQMDaqInfo.cc.

Member Typedef Documentation

◆ DQMStore

Definition at line 48 of file DQMDaqInfo.cc.

◆ MonitorElement

Definition at line 49 of file DQMDaqInfo.cc.

Member Enumeration Documentation

◆ subDetList

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

Definition at line 61 of file DQMDaqInfo.cc.

Constructor & Destructor Documentation

◆ DQMDaqInfo()

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

Definition at line 79 of file DQMDaqInfo.cc.

80  : runInfoToken_{esConsumes<edm::Transition::BeginLuminosityBlock>()} {}
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Definition: DQMDaqInfo.cc:58

◆ ~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 212 of file DQMDaqInfo.cc.

212 {}

◆ beginJob()

void DQMDaqInfo::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 126 of file DQMDaqInfo.cc.

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, Utilities::operator, Pixel, PixelRange, RPC, RPCRange, dqm::implementation::DQMStore::setCurrentFolder(), SiStrip, AlCaHLTBitMon_QueryRunRegistry::string, and TrackerRange.

126  {
127  dbe_ = nullptr;
129 
130  std::string commonFolder = "/EventInfo/DAQContents";
131  std::string subsystFolder;
132  std::string curentFolder;
133 
134  subsystFolder = "Pixel";
135  curentFolder = subsystFolder + commonFolder;
136  dbe_->setCurrentFolder(curentFolder);
137  DaqFraction[Pixel] = dbe_->bookFloat("PixelDaqFraction");
138 
139  subsystFolder = "SiStrip";
140  curentFolder = subsystFolder + commonFolder;
141  dbe_->setCurrentFolder(curentFolder);
142  DaqFraction[SiStrip] = dbe_->bookFloat("SiStripDaqFraction");
143 
144  subsystFolder = "RPC";
145  curentFolder = subsystFolder + commonFolder;
146  dbe_->setCurrentFolder(curentFolder);
147  DaqFraction[RPC] = dbe_->bookFloat("RPCDaqFraction");
148 
149  subsystFolder = "CSC";
150  curentFolder = subsystFolder + commonFolder;
151  dbe_->setCurrentFolder(curentFolder);
152  DaqFraction[CSC] = dbe_->bookFloat("CSCDaqFraction");
153 
154  subsystFolder = "DT";
155  curentFolder = subsystFolder + commonFolder;
156  dbe_->setCurrentFolder(curentFolder);
157  DaqFraction[DT] = dbe_->bookFloat("DTDaqFraction");
158 
159  subsystFolder = "Hcal";
160  curentFolder = subsystFolder + commonFolder;
161  dbe_->setCurrentFolder(curentFolder);
162  DaqFraction[Hcal] = dbe_->bookFloat("HcalDaqFraction");
163 
164  subsystFolder = "EcalBarrel";
165  curentFolder = subsystFolder + commonFolder;
166  dbe_->setCurrentFolder(curentFolder);
167  DaqFraction[EcalBarrel] = dbe_->bookFloat("EcalBarrDaqFraction");
168 
169  subsystFolder = "EcalEndcap";
170  curentFolder = subsystFolder + commonFolder;
171  dbe_->setCurrentFolder(curentFolder);
172  DaqFraction[EcalEndcap] = dbe_->bookFloat("EcalEndDaqFraction");
173 
174  subsystFolder = "L1T";
175  curentFolder = subsystFolder + commonFolder;
176  dbe_->setCurrentFolder(curentFolder);
177  DaqFraction[L1T] = dbe_->bookFloat("L1TDaqFraction");
178 
185  RPCRange.first = 790;
186  RPCRange.second = 792;
187  DTRange.first = 770;
188  DTRange.second = 774;
193  ECALBarrRange.first = 610;
194  ECALBarrRange.second = 645;
195  ECALEndcapRangeLow.first = 601;
196  ECALEndcapRangeLow.second = 609;
197  ECALEndcapRangeHigh.first = 646;
198  ECALEndcapRangeHigh.second = 654;
199 
200  NumberOfFeds[Pixel] = PixelRange.second - PixelRange.first + 1;
201  NumberOfFeds[SiStrip] = TrackerRange.second - TrackerRange.first + 1;
202  NumberOfFeds[CSC] = CSCRange.second - CSCRange.first + 1;
203  NumberOfFeds[RPC] = RPCRange.second - RPCRange.first + 1;
204  NumberOfFeds[DT] = DTRange.second - DTRange.first + 1;
205  NumberOfFeds[Hcal] = HcalRange.second - HcalRange.first + 1;
206  NumberOfFeds[EcalBarrel] = ECALBarrRange.second - ECALBarrRange.first + 1;
208  (ECALEndcapRangeHigh.second - ECALEndcapRangeHigh.first + 1);
209  NumberOfFeds[L1T] = L1TRange.second - L1TRange.first + 1;
210 }
std::pair< int, int > DTRange
Definition: DQMDaqInfo.cc:69
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:646
float NumberOfFeds[9]
Definition: DQMDaqInfo.cc:76
MonitorElement * DaqFraction[9]
Definition: DQMDaqInfo.cc:63
std::pair< int, int > RPCRange
Definition: DQMDaqInfo.cc:68
DQMStore * dbe_
Definition: DQMDaqInfo.cc:59
std::pair< int, int > TrackerRange
Definition: DQMDaqInfo.cc:66
std::pair< int, int > CSCRange
Definition: DQMDaqInfo.cc:67
std::pair< int, int > ECALEndcapRangeHigh
Definition: DQMDaqInfo.cc:73
std::pair< int, int > PixelRange
Definition: DQMDaqInfo.cc:65
std::pair< int, int > ECALBarrRange
Definition: DQMDaqInfo.cc:71
std::pair< int, int > L1TRange
Definition: DQMDaqInfo.cc:74
std::pair< int, int > ECALEndcapRangeLow
Definition: DQMDaqInfo.cc:72
std::pair< int, int > HcalRange
Definition: DQMDaqInfo.cc:70

◆ beginLuminosityBlock()

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

Definition at line 82 of file DQMDaqInfo.cc.

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

82  {
84 
85  if (iSetup.tryToGet<RunInfoRcd>()) {
86  if (auto sumFED = iSetup.getHandle(runInfoToken_)) {
87  //const RunInfo* summaryFED=sumFED.product();
88 
89  std::vector<int> FedsInIds = sumFED->m_fed_in;
90 
91  float FedCount[9] = {0., 0., 0., 0., 0., 0., 0., 0., 0.};
92 
93  for (int fedID : FedsInIds) {
94  if (fedID >= PixelRange.first && fedID <= PixelRange.second)
95  ++FedCount[Pixel];
96  if (fedID >= TrackerRange.first && fedID <= TrackerRange.second)
97  ++FedCount[SiStrip];
98  if (fedID >= CSCRange.first && fedID <= CSCRange.second)
99  ++FedCount[CSC];
100  if (fedID >= RPCRange.first && fedID <= RPCRange.second)
101  ++FedCount[RPC];
102  if (fedID >= DTRange.first && fedID <= DTRange.second)
103  ++FedCount[DT];
104  if (fedID >= HcalRange.first && fedID <= HcalRange.second)
105  ++FedCount[Hcal];
106  if (fedID >= ECALBarrRange.first && fedID <= ECALBarrRange.second)
107  ++FedCount[EcalBarrel];
108  if ((fedID >= ECALEndcapRangeLow.first && fedID <= ECALEndcapRangeLow.second) ||
109  (fedID >= ECALEndcapRangeHigh.first && fedID <= ECALEndcapRangeHigh.second))
110  ++FedCount[EcalEndcap];
111  if (fedID >= L1TRange.first && fedID <= L1TRange.second)
112  ++FedCount[L1T];
113  }
114 
115  for (int detIndex = 0; detIndex < 9; ++detIndex) {
116  DaqFraction[detIndex]->Fill(FedCount[detIndex] / NumberOfFeds[detIndex]);
117  }
118  }
119  } else {
120  for (auto& detIndex : DaqFraction)
121  detIndex->Fill(-1);
122  return;
123  }
124 }
std::pair< int, int > DTRange
Definition: DQMDaqInfo.cc:69
std::optional< T > tryToGet() const
Definition: EventSetup.h:103
float NumberOfFeds[9]
Definition: DQMDaqInfo.cc:76
MonitorElement * DaqFraction[9]
Definition: DQMDaqInfo.cc:63
std::pair< int, int > RPCRange
Definition: DQMDaqInfo.cc:68
void Fill(long long x)
std::pair< int, int > TrackerRange
Definition: DQMDaqInfo.cc:66
std::pair< int, int > CSCRange
Definition: DQMDaqInfo.cc:67
std::pair< int, int > ECALEndcapRangeHigh
Definition: DQMDaqInfo.cc:73
std::pair< int, int > PixelRange
Definition: DQMDaqInfo.cc:65
std::pair< int, int > ECALBarrRange
Definition: DQMDaqInfo.cc:71
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
std::pair< int, int > L1TRange
Definition: DQMDaqInfo.cc:74
std::pair< int, int > ECALEndcapRangeLow
Definition: DQMDaqInfo.cc:72
std::pair< int, int > HcalRange
Definition: DQMDaqInfo.cc:70
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Definition: DQMDaqInfo.cc:58
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

Member Data Documentation

◆ CSCRange

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

Definition at line 67 of file DQMDaqInfo.cc.

Referenced by beginJob(), and beginLuminosityBlock().

◆ DaqFraction

MonitorElement* DQMDaqInfo::DaqFraction[9]
private

Definition at line 63 of file DQMDaqInfo.cc.

Referenced by beginJob(), and beginLuminosityBlock().

◆ dbe_

DQMStore* DQMDaqInfo::dbe_
private

Definition at line 59 of file DQMDaqInfo.cc.

Referenced by beginJob().

◆ DTRange

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

Definition at line 69 of file DQMDaqInfo.cc.

Referenced by beginJob(), and beginLuminosityBlock().

◆ ECALBarrRange

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

Definition at line 71 of file DQMDaqInfo.cc.

Referenced by beginJob(), and beginLuminosityBlock().

◆ ECALEndcapRangeHigh

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

Definition at line 73 of file DQMDaqInfo.cc.

Referenced by beginJob(), and beginLuminosityBlock().

◆ ECALEndcapRangeLow

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

Definition at line 72 of file DQMDaqInfo.cc.

Referenced by beginJob(), and beginLuminosityBlock().

◆ HcalRange

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

Definition at line 70 of file DQMDaqInfo.cc.

Referenced by beginJob(), and beginLuminosityBlock().

◆ L1TRange

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

Definition at line 74 of file DQMDaqInfo.cc.

Referenced by beginJob(), and beginLuminosityBlock().

◆ NumberOfFeds

float DQMDaqInfo::NumberOfFeds[9]
private

Definition at line 76 of file DQMDaqInfo.cc.

Referenced by beginJob(), and beginLuminosityBlock().

◆ PixelRange

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

Definition at line 65 of file DQMDaqInfo.cc.

Referenced by beginJob(), and beginLuminosityBlock().

◆ RPCRange

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

Definition at line 68 of file DQMDaqInfo.cc.

Referenced by beginJob(), and beginLuminosityBlock().

◆ runInfoToken_

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

Definition at line 58 of file DQMDaqInfo.cc.

Referenced by beginLuminosityBlock().

◆ TrackerRange

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

Definition at line 66 of file DQMDaqInfo.cc.

Referenced by beginJob(), and beginLuminosityBlock().