CMS 3D CMS Logo

DQMDaqInfo.cc
Go to the documentation of this file.
1 #include "DQMDaqInfo.h"
3 
5 
6 DQMDaqInfo::~DQMDaqInfo() = default;
7 
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 }
53 
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 }
139 
141 
142 void DQMDaqInfo::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {}
DQMDaqInfo::SiStrip
Definition: DQMDaqInfo.h:60
DQMDaqInfo::~DQMDaqInfo
~DQMDaqInfo() override
FEDNumbering.h
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
DQMDaqInfo::endJob
void endJob() override
Definition: DQMDaqInfo.cc:140
dqm::implementation::IBooker::bookFloat
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
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
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DQMDaqInfo::NumberOfFeds
float NumberOfFeds[9]
Definition: DQMDaqInfo.h:75
DQMDaqInfo::beginJob
void beginJob() override
Definition: DQMDaqInfo.cc:54
FEDNumbering::MAXSiStripFEDID
Definition: FEDNumbering.h:30
edm::ParameterSet
Definition: ParameterSet.h:36
DQMDaqInfo::Pixel
Definition: DQMDaqInfo.h:60
edm::Service
Definition: Service.h:30
iEvent
int iEvent
Definition: GenABIO.cc:224
DQMDaqInfo::L1T
Definition: DQMDaqInfo.h:60
edm::EventSetup
Definition: EventSetup.h:57
FEDNumbering::MINCSCFEDID
Definition: FEDNumbering.h:51
DQMDaqInfo::Hcal
Definition: DQMDaqInfo.h:60
FEDNumbering::MINSiPixelFEDID
Definition: FEDNumbering.h:27
DQMDaqInfo.h
DQMDaqInfo::RPCRange
std::pair< int, int > RPCRange
Definition: DQMDaqInfo.h:67
DQMDaqInfo::DQMDaqInfo
DQMDaqInfo(const edm::ParameterSet &)
Definition: DQMDaqInfo.cc:4
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
DQMDaqInfo::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: DQMDaqInfo.cc:142
FEDNumbering::MAXHCALFEDID
Definition: FEDNumbering.h:48
DQMDaqInfo::PixelRange
std::pair< int, int > PixelRange
Definition: DQMDaqInfo.h:64
edm::Event
Definition: Event.h:73
DQMDaqInfo::L1TRange
std::pair< int, int > L1TRange
Definition: DQMDaqInfo.h:73
DQMDaqInfo::beginLuminosityBlock
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
Definition: DQMDaqInfo.cc:8
DQMDaqInfo::CSCRange
std::pair< int, int > CSCRange
Definition: DQMDaqInfo.h:66
FEDNumbering::MINTriggerGTPFEDID
Definition: FEDNumbering.h:61
FEDNumbering::MINSiStripFEDID
Definition: FEDNumbering.h:29