CMS 3D CMS Logo

List of all members | 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 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
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

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 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)
 

Detailed Description

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

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

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 62 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 {
6 }
DQMDaqInfo::~DQMDaqInfo ( )
overridedefault

Referenced by DQMDaqInfo().

Member Function Documentation

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

Definition at line 153 of file DQMDaqInfo.cc.

154 {
155 
156 
157 }
void DQMDaqInfo::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 56 of file DQMDaqInfo.cc.

References DQMStore::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, DQMStore::setCurrentFolder(), SiStrip, AlCaHLTBitMon_QueryRunRegistry::string, and TrackerRange.

57 {
58  dbe_ = nullptr;
60 
61  std::string commonFolder = "/EventInfo/DAQContents";
62  std::string subsystFolder;
63  std::string curentFolder;
64 
65  subsystFolder="Pixel";
66  curentFolder= subsystFolder+commonFolder;
67  dbe_->setCurrentFolder(curentFolder);
68  DaqFraction[Pixel] = dbe_->bookFloat("PixelDaqFraction");
69 
70 
71  subsystFolder="SiStrip";
72  curentFolder=subsystFolder+commonFolder;
73  dbe_->setCurrentFolder(curentFolder);
74  DaqFraction[SiStrip] = dbe_->bookFloat("SiStripDaqFraction");
75 
76  subsystFolder="RPC";
77  curentFolder=subsystFolder+commonFolder;
78  dbe_->setCurrentFolder(curentFolder);
79  DaqFraction[RPC] = dbe_->bookFloat("RPCDaqFraction");
80 
81  subsystFolder="CSC";
82  curentFolder=subsystFolder+commonFolder;
83  dbe_->setCurrentFolder(curentFolder);
84  DaqFraction[CSC] = dbe_->bookFloat("CSCDaqFraction");
85 
86  subsystFolder="DT";
87  curentFolder=subsystFolder+commonFolder;
88  dbe_->setCurrentFolder(curentFolder);
89  DaqFraction[DT] = dbe_->bookFloat("DTDaqFraction");
90 
91  subsystFolder="Hcal";
92  curentFolder=subsystFolder+commonFolder;
93  dbe_->setCurrentFolder(curentFolder);
94  DaqFraction[Hcal] = dbe_->bookFloat("HcalDaqFraction");
95 
96  subsystFolder="EcalBarrel";
97  curentFolder=subsystFolder+commonFolder;
98  dbe_->setCurrentFolder(curentFolder);
99  DaqFraction[EcalBarrel] = dbe_->bookFloat("EcalBarrDaqFraction");
100 
101  subsystFolder="EcalEndcap";
102  curentFolder=subsystFolder+commonFolder;
103  dbe_->setCurrentFolder(curentFolder);
104  DaqFraction[EcalEndcap] = dbe_->bookFloat("EcalEndDaqFraction");
105 
106  subsystFolder="L1T";
107  curentFolder=subsystFolder+commonFolder;
108  dbe_->setCurrentFolder(curentFolder);
109  DaqFraction[L1T] = dbe_->bookFloat("L1TDaqFraction");
110 
111 
118  RPCRange.first = 790;
119  RPCRange.second = 792;
120  DTRange.first = 770;
121  DTRange.second = 774;
126  ECALBarrRange.first = 610;
127  ECALBarrRange.second = 645;
128  ECALEndcapRangeLow.first = 601;
129  ECALEndcapRangeLow.second = 609;
130  ECALEndcapRangeHigh.first = 646;
131  ECALEndcapRangeHigh.second = 654;
132 
133  NumberOfFeds[Pixel] = PixelRange.second-PixelRange.first +1;
134  NumberOfFeds[SiStrip] = TrackerRange.second-TrackerRange.first +1;
135  NumberOfFeds[CSC] = CSCRange.second-CSCRange.first +1;
136  NumberOfFeds[RPC] = RPCRange.second-RPCRange.first +1;
137  NumberOfFeds[DT] = DTRange.second-DTRange.first +1;
138  NumberOfFeds[Hcal] = HcalRange.second-HcalRange.first +1;
141  NumberOfFeds[L1T] = L1TRange.second-L1TRange.first +1;
142 
143 }
std::pair< int, int > ECALBarrRange
Definition: DQMDaqInfo.h:72
std::pair< int, int > TrackerRange
Definition: DQMDaqInfo.h:67
float NumberOfFeds[9]
Definition: DQMDaqInfo.h:77
MonitorElement * DaqFraction[9]
Definition: DQMDaqInfo.h:64
std::pair< int, int > PixelRange
Definition: DQMDaqInfo.h:66
std::pair< int, int > DTRange
Definition: DQMDaqInfo.h:70
MonitorElement * bookFloat(char_string const &name)
Book float.
Definition: DQMStore.cc:1036
std::pair< int, int > RPCRange
Definition: DQMDaqInfo.h:69
DQMStore * dbe_
Definition: DQMDaqInfo.h:60
std::pair< int, int > CSCRange
Definition: DQMDaqInfo.h:68
std::pair< int, int > ECALEndcapRangeHigh
Definition: DQMDaqInfo.h:74
std::pair< int, int > L1TRange
Definition: DQMDaqInfo.h:75
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:565
std::pair< int, int > HcalRange
Definition: DQMDaqInfo.h:71
std::pair< int, int > ECALEndcapRangeLow
Definition: DQMDaqInfo.h:73
void DQMDaqInfo::beginLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 10 of file DQMDaqInfo.cc.

References CSC, CSCRange, DaqFraction, DT, DTRange, EcalBarrel, ECALBarrRange, EcalEndcap, ECALEndcapRangeHigh, ECALEndcapRangeLow, 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().

10  {
11 
13 
14  if(auto runInfoRec = iSetup.tryToGet<RunInfoRcd>()) {
15 
17  runInfoRec->get(sumFED);
18 
19  //const RunInfo* summaryFED=sumFED.product();
20 
21  std::vector<int> FedsInIds= sumFED->m_fed_in;
22 
23  float FedCount[9]={0., 0., 0., 0., 0., 0., 0., 0., 0.};
24 
25  for(int fedID : FedsInIds) {
26  if(fedID>=PixelRange.first && fedID<=PixelRange.second) ++FedCount[Pixel];
27  if(fedID>=TrackerRange.first && fedID<=TrackerRange.second) ++FedCount[SiStrip];
28  if(fedID>=CSCRange.first && fedID<=CSCRange.second) ++FedCount[CSC];
29  if(fedID>=RPCRange.first && fedID<=RPCRange.second) ++FedCount[RPC];
30  if(fedID>=DTRange.first && fedID<=DTRange.second) ++FedCount[DT];
31  if(fedID>=HcalRange.first && fedID<=HcalRange.second) ++FedCount[Hcal];
32  if(fedID>=ECALBarrRange.first && fedID<=ECALBarrRange.second) ++FedCount[EcalBarrel];
33  if((fedID>=ECALEndcapRangeLow.first && fedID<=ECALEndcapRangeLow.second) ||
34  (fedID>=ECALEndcapRangeHigh.first && fedID<=ECALEndcapRangeHigh.second)) ++FedCount[EcalEndcap];
35  if(fedID>=L1TRange.first && fedID<=L1TRange.second) ++FedCount[L1T];
36 
37  }
38 
39  for(int detIndex=0; detIndex<9; ++detIndex) {
40  DaqFraction[detIndex]->Fill( FedCount[detIndex]/NumberOfFeds[detIndex]);
41  }
42 
43  }else{
44 
45  for(auto & detIndex : DaqFraction) detIndex->Fill(-1);
46  return;
47  }
48 
49 
50 }
std::optional< T > tryToGet() const
Definition: EventSetup.h:80
std::pair< int, int > ECALBarrRange
Definition: DQMDaqInfo.h:72
std::pair< int, int > TrackerRange
Definition: DQMDaqInfo.h:67
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
float NumberOfFeds[9]
Definition: DQMDaqInfo.h:77
MonitorElement * DaqFraction[9]
Definition: DQMDaqInfo.h:64
std::pair< int, int > PixelRange
Definition: DQMDaqInfo.h:66
std::pair< int, int > DTRange
Definition: DQMDaqInfo.h:70
void Fill(long long x)
std::pair< int, int > RPCRange
Definition: DQMDaqInfo.h:69
std::pair< int, int > CSCRange
Definition: DQMDaqInfo.h:68
std::pair< int, int > ECALEndcapRangeHigh
Definition: DQMDaqInfo.h:74
std::vector< int > m_fed_in
Definition: RunInfo.h:26
std::pair< int, int > L1TRange
Definition: DQMDaqInfo.h:75
std::pair< int, int > HcalRange
Definition: DQMDaqInfo.h:71
std::pair< int, int > ECALEndcapRangeLow
Definition: DQMDaqInfo.h:73
void DQMDaqInfo::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 147 of file DQMDaqInfo.cc.

147  {
148 }

Member Data Documentation

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

Definition at line 68 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

MonitorElement* DQMDaqInfo::DaqFraction[9]
private

Definition at line 64 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

DQMStore* DQMDaqInfo::dbe_
private

Definition at line 60 of file DQMDaqInfo.h.

Referenced by beginJob().

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

Definition at line 70 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 72 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 74 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 73 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 71 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 75 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

float DQMDaqInfo::NumberOfFeds[9]
private

Definition at line 77 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 66 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 69 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 67 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().