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
 
void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) 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 63 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 155 of file DQMDaqInfo.cc.

156 {
157 
158 
159 }
void DQMDaqInfo::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

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

59 {
60  dbe_ = nullptr;
62 
63  std::string commonFolder = "/EventInfo/DAQContents";
64  std::string subsystFolder;
65  std::string curentFolder;
66 
67  subsystFolder="Pixel";
68  curentFolder= subsystFolder+commonFolder;
69  dbe_->setCurrentFolder(curentFolder);
70  DaqFraction[Pixel] = dbe_->bookFloat("PixelDaqFraction");
71 
72 
73  subsystFolder="SiStrip";
74  curentFolder=subsystFolder+commonFolder;
75  dbe_->setCurrentFolder(curentFolder);
76  DaqFraction[SiStrip] = dbe_->bookFloat("SiStripDaqFraction");
77 
78  subsystFolder="RPC";
79  curentFolder=subsystFolder+commonFolder;
80  dbe_->setCurrentFolder(curentFolder);
81  DaqFraction[RPC] = dbe_->bookFloat("RPCDaqFraction");
82 
83  subsystFolder="CSC";
84  curentFolder=subsystFolder+commonFolder;
85  dbe_->setCurrentFolder(curentFolder);
86  DaqFraction[CSC] = dbe_->bookFloat("CSCDaqFraction");
87 
88  subsystFolder="DT";
89  curentFolder=subsystFolder+commonFolder;
90  dbe_->setCurrentFolder(curentFolder);
91  DaqFraction[DT] = dbe_->bookFloat("DTDaqFraction");
92 
93  subsystFolder="Hcal";
94  curentFolder=subsystFolder+commonFolder;
95  dbe_->setCurrentFolder(curentFolder);
96  DaqFraction[Hcal] = dbe_->bookFloat("HcalDaqFraction");
97 
98  subsystFolder="EcalBarrel";
99  curentFolder=subsystFolder+commonFolder;
100  dbe_->setCurrentFolder(curentFolder);
101  DaqFraction[EcalBarrel] = dbe_->bookFloat("EcalBarrDaqFraction");
102 
103  subsystFolder="EcalEndcap";
104  curentFolder=subsystFolder+commonFolder;
105  dbe_->setCurrentFolder(curentFolder);
106  DaqFraction[EcalEndcap] = dbe_->bookFloat("EcalEndDaqFraction");
107 
108  subsystFolder="L1T";
109  curentFolder=subsystFolder+commonFolder;
110  dbe_->setCurrentFolder(curentFolder);
111  DaqFraction[L1T] = dbe_->bookFloat("L1TDaqFraction");
112 
113 
120  RPCRange.first = 790;
121  RPCRange.second = 792;
122  DTRange.first = 770;
123  DTRange.second = 774;
128  ECALBarrRange.first = 610;
129  ECALBarrRange.second = 645;
130  ECALEndcapRangeLow.first = 601;
131  ECALEndcapRangeLow.second = 609;
132  ECALEndcapRangeHigh.first = 646;
133  ECALEndcapRangeHigh.second = 654;
134 
135  NumberOfFeds[Pixel] = PixelRange.second-PixelRange.first +1;
136  NumberOfFeds[SiStrip] = TrackerRange.second-TrackerRange.first +1;
137  NumberOfFeds[CSC] = CSCRange.second-CSCRange.first +1;
138  NumberOfFeds[RPC] = RPCRange.second-RPCRange.first +1;
139  NumberOfFeds[DT] = DTRange.second-DTRange.first +1;
140  NumberOfFeds[Hcal] = HcalRange.second-HcalRange.first +1;
143  NumberOfFeds[L1T] = L1TRange.second-L1TRange.first +1;
144 
145 }
std::pair< int, int > ECALBarrRange
Definition: DQMDaqInfo.h:73
std::pair< int, int > TrackerRange
Definition: DQMDaqInfo.h:68
float NumberOfFeds[9]
Definition: DQMDaqInfo.h:78
MonitorElement * DaqFraction[9]
Definition: DQMDaqInfo.h:65
std::pair< int, int > PixelRange
Definition: DQMDaqInfo.h:67
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:819
std::pair< int, int > DTRange
Definition: DQMDaqInfo.h:71
std::pair< int, int > RPCRange
Definition: DQMDaqInfo.h:70
DQMStore * dbe_
Definition: DQMDaqInfo.h:61
std::pair< int, int > CSCRange
Definition: DQMDaqInfo.h:69
std::pair< int, int > ECALEndcapRangeHigh
Definition: DQMDaqInfo.h:75
std::pair< int, int > L1TRange
Definition: DQMDaqInfo.h:76
std::pair< int, int > HcalRange
Definition: DQMDaqInfo.h:72
std::pair< int, int > ECALEndcapRangeLow
Definition: DQMDaqInfo.h:74
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:588
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::find(), edm::eventsetup::heterocontainer::HCTypeTag::findType(), edm::EventSetup::get(), Hcal, HcalRange, L1T, L1TRange, RunInfo::m_fed_in, NumberOfFeds, Pixel, PixelRange, RPC, RPCRange, SiStrip, and TrackerRange.

10  {
11 
13 
14  if( nullptr != iSetup.find( recordKey ) ) {
15 
17  iSetup.get<RunInfoRcd>().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::pair< int, int > ECALBarrRange
Definition: DQMDaqInfo.h:73
std::pair< int, int > TrackerRange
Definition: DQMDaqInfo.h:68
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:78
MonitorElement * DaqFraction[9]
Definition: DQMDaqInfo.h:65
std::pair< int, int > PixelRange
Definition: DQMDaqInfo.h:67
std::pair< int, int > DTRange
Definition: DQMDaqInfo.h:71
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
Definition: EventSetup.cc:88
void Fill(long long x)
std::pair< int, int > RPCRange
Definition: DQMDaqInfo.h:70
std::pair< int, int > CSCRange
Definition: DQMDaqInfo.h:69
std::pair< int, int > ECALEndcapRangeHigh
Definition: DQMDaqInfo.h:75
std::vector< int > m_fed_in
Definition: RunInfo.h:26
std::pair< int, int > L1TRange
Definition: DQMDaqInfo.h:76
const T & get() const
Definition: EventSetup.h:59
std::pair< int, int > HcalRange
Definition: DQMDaqInfo.h:72
std::pair< int, int > ECALEndcapRangeLow
Definition: DQMDaqInfo.h:74
void DQMDaqInfo::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 149 of file DQMDaqInfo.cc.

149  {
150 }
void DQMDaqInfo::endLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 53 of file DQMDaqInfo.cc.

53  {
54 }

Member Data Documentation

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

Definition at line 69 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

MonitorElement* DQMDaqInfo::DaqFraction[9]
private

Definition at line 65 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

DQMStore* DQMDaqInfo::dbe_
private

Definition at line 61 of file DQMDaqInfo.h.

Referenced by beginJob().

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

Definition at line 71 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 73 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 75 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 74 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 72 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 76 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

float DQMDaqInfo::NumberOfFeds[9]
private

Definition at line 78 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 67 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 70 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

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

Definition at line 68 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().