CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 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,
RunInfoRcd
runInfoToken_
 
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 45 of file DQMDaqInfo.h.

Member Typedef Documentation

Definition at line 47 of file DQMDaqInfo.h.

Definition at line 48 of file DQMDaqInfo.h.

Member Enumeration Documentation

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 ( const edm::ParameterSet iConfig)
explicit

Definition at line 4 of file DQMDaqInfo.cc.

References ~DQMDaqInfo().

5  : runInfoToken_{esConsumes<edm::Transition::BeginLuminosityBlock>()} {}
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Definition: DQMDaqInfo.h:57
DQMDaqInfo::~DQMDaqInfo ( )
overridedefault

Referenced by DQMDaqInfo().

Member Function Documentation

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 {}
void DQMDaqInfo::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 53 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.

53  {
54  dbe_ = nullptr;
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 }
std::pair< int, int > DTRange
Definition: DQMDaqInfo.h:68
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:569
float NumberOfFeds[9]
Definition: DQMDaqInfo.h:75
MonitorElement * DaqFraction[9]
Definition: DQMDaqInfo.h:62
std::pair< int, int > RPCRange
Definition: DQMDaqInfo.h:67
DQMStore * dbe_
Definition: DQMDaqInfo.h:58
std::pair< int, int > TrackerRange
Definition: DQMDaqInfo.h:65
std::pair< int, int > CSCRange
Definition: DQMDaqInfo.h:66
std::pair< int, int > ECALEndcapRangeHigh
Definition: DQMDaqInfo.h:72
std::pair< int, int > PixelRange
Definition: DQMDaqInfo.h:64
std::pair< int, int > ECALBarrRange
Definition: DQMDaqInfo.h:70
std::pair< int, int > L1TRange
Definition: DQMDaqInfo.h:73
std::pair< int, int > ECALEndcapRangeLow
Definition: DQMDaqInfo.h:71
std::pair< int, int > HcalRange
Definition: DQMDaqInfo.h:69
void DQMDaqInfo::beginLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
private

Definition at line 9 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().

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 }
std::pair< int, int > DTRange
Definition: DQMDaqInfo.h:68
std::optional< T > tryToGet() const
Definition: EventSetup.h:103
float NumberOfFeds[9]
Definition: DQMDaqInfo.h:75
MonitorElement * DaqFraction[9]
Definition: DQMDaqInfo.h:62
std::pair< int, int > RPCRange
Definition: DQMDaqInfo.h:67
void Fill(long long x)
std::pair< int, int > TrackerRange
Definition: DQMDaqInfo.h:65
std::pair< int, int > CSCRange
Definition: DQMDaqInfo.h:66
std::pair< int, int > ECALEndcapRangeHigh
Definition: DQMDaqInfo.h:72
std::pair< int, int > PixelRange
Definition: DQMDaqInfo.h:64
std::pair< int, int > ECALBarrRange
Definition: DQMDaqInfo.h:70
std::pair< int, int > L1TRange
Definition: DQMDaqInfo.h:73
std::pair< int, int > ECALEndcapRangeLow
Definition: DQMDaqInfo.h:71
std::pair< int, int > HcalRange
Definition: DQMDaqInfo.h:69
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Definition: DQMDaqInfo.h:57
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

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

Definition at line 66 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

MonitorElement* DQMDaqInfo::DaqFraction[9]
private

Definition at line 62 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

DQMStore* DQMDaqInfo::dbe_
private

Definition at line 58 of file DQMDaqInfo.h.

Referenced by beginJob().

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

Definition at line 68 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 70 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 72 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 71 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 69 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 73 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

float DQMDaqInfo::NumberOfFeds[9]
private

Definition at line 75 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 64 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 67 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 57 of file DQMDaqInfo.h.

Referenced by beginLuminosityBlock().

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

Definition at line 65 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().