CMS 3D CMS Logo

CSCDQM_EventProcessor.cc
Go to the documentation of this file.
1 /*
2  * =====================================================================================
3  *
4  * Filename: EventProcessor.cc
5  *
6  * Description: EventProcessor Object General methods
7  *
8  * Version: 1.0
9  * Created: 10/03/2008 10:47:11 AM
10  * Revision: none
11  * Compiler: gcc
12  *
13  * Author: Valdas Rapsevicius (VR), Valdas.Rapsevicius@cern.ch
14  * Company: CERN, CH
15  *
16  * =====================================================================================
17  */
18 
19 #include "CSCDQM_EventProcessor.h"
20 
21 namespace cscdqm {
22 
28  config = p_config;
29  // fFirstEvent = true;
30  fCloseL1As = true;
31  }
32 
33 #ifdef DQMGLOBAL
34 
42  const edm::InputTag& itag,
43  edm::ConsumesCollector& coco) {
44  config = p_config;
45 
46  // set token for data access
48 
49  // fFirstEvent = true;
50  fCloseL1As = true;
51  }
52 
53 #endif
54 
59 
67  if (config->fnGetCacheEMUHisto(histo, me))
68  return (me != nullptr);
69  EMUHistoDef histoD(histo);
70  if (config->fnGetHisto(histoD, me))
71  return (me != nullptr);
72  return false;
73  }
74 
82  const bool EventProcessor::getFEDHisto(const HistoId& histo, const HwId& fedID, MonitorObject*& me) {
83  if (config->fnGetCacheFEDHisto(histo, fedID, me))
84  return (me != nullptr);
85  FEDHistoDef histoD(histo, fedID);
86  if (config->fnGetHisto(histoD, me))
87  return (me != nullptr);
88  return false;
89  }
90 
98  const bool EventProcessor::getDDUHisto(const HistoId& histo, const HwId& dduID, MonitorObject*& me) {
99  if (config->fnGetCacheDDUHisto(histo, dduID, me))
100  return (me != nullptr);
101  DDUHistoDef histoD(histo, dduID);
102  if (config->fnGetHisto(histoD, me))
103  return (me != nullptr);
104  return false;
105  }
106 
116  const HwId& crateID,
117  const HwId& dmbSlot,
118  MonitorObject*& me) {
119  if (config->fnGetCacheCSCHisto(histo, crateID, dmbSlot, 0, me))
120  return (me != nullptr);
121  CSCHistoDef histoD(histo, crateID, dmbSlot);
122  if (config->fnGetHisto(histoD, me))
123  return (me != nullptr);
124  return false;
125  }
126 
138  const HistoId& histo, const HwId& crateID, const HwId& dmbSlot, const HwId& adId, MonitorObject*& me) {
139  if (config->fnGetCacheCSCHisto(histo, crateID, dmbSlot, adId, me))
140  return (me != nullptr);
141  CSCHistoDef histoD(histo, crateID, dmbSlot, adId);
142  if (config->fnGetHisto(histoD, me))
143  return (me != nullptr);
144  return false;
145  }
146 
154  if (config->fnGetCacheParHisto(histo, me))
155  return (me != nullptr);
156  ParHistoDef histoD(histo);
157  if (config->fnGetHisto(histoD, me))
158  return (me != nullptr);
159  return false;
160  }
161 
170  const bool EventProcessor::getCSCFromMap(const unsigned int& crateId,
171  const unsigned int& dmbId,
172  unsigned int& cscType,
173  unsigned int& cscPosition) const {
174  bool result = false;
175 
176  CSCDetId cid;
177  if (config->fnGetCSCDetId(crateId, dmbId, cid)) {
178  cscPosition = cid.chamber();
179  int iring = cid.ring();
180  int istation = cid.station();
181  int iendcap = cid.endcap();
182  std::string tlabel = cscdqm::Utility::getCSCTypeLabel(iendcap, istation, iring);
184  result = true;
185  }
186 
187  /*
188  if (!result) {
189  LOG_ERROR << "Event #" << config->getNEvents() << ": Invalid CSC=" << CSCHistoDef::getPath(crateId, dmbId);
190  }
191  */
192 
193  return result;
194  }
195 
202  unsigned int EventProcessor::maskHWElements(std::vector<std::string>& tokens) {
203  unsigned int masked = summary.setMaskedHWElements(tokens);
204  LOG_INFO << masked << " HW Elements masked";
205  return masked;
206  }
207 
208 } // namespace cscdqm
cscdqm::EventProcessor::getEMUHisto
const bool getEMUHisto(const HistoId &histo, MonitorObject *&me)
Get EMU (Top Level) Monitoring Object.
Definition: CSCDQM_EventProcessor.cc:66
cscdqm::EventProcessor::fCloseL1As
bool fCloseL1As
Data Format version (2005, 2013)
Definition: CSCDQM_EventProcessor.h:169
cscdqm::HistoId
unsigned int HistoId
Definition: CSCDQM_HistoDef.h:35
FEDRawDataCollection
Definition: FEDRawDataCollection.h:18
CSCDetId::ring
int ring() const
Definition: CSCDetId.h:68
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:279
LOG_INFO
#define LOG_INFO
Definition: CSCDQM_Logger.h:42
cscdqm::CSCHistoDef
CSC Level Histogram Type.
Definition: CSCDQM_HistoDef.h:362
cscdqm::ParHistoDef
Parameter Histogram Definition.
Definition: CSCDQM_HistoDef.h:425
cscdqm::EventProcessor::getCSCFromMap
const bool getCSCFromMap(const unsigned int &crateId, const unsigned int &dmbId, unsigned int &cscType, unsigned int &cscPosition) const
Get CSC type and position from crate and dmb identifiers.
Definition: CSCDQM_EventProcessor.cc:170
cscdqm::EventProcessor::getDDUHisto
const bool getDDUHisto(const HistoId &histo, const HwId &dduID, MonitorObject *&me)
Get DDU Level Monitoring Object.
Definition: CSCDQM_EventProcessor.cc:98
config
Definition: config.py:1
cscdqm::EventProcessor::init
void init()
Initialize EventProcessor: reading out config information.
Definition: CSCDQM_EventProcessor.cc:58
cscdqm::HwId
unsigned int HwId
Definition: CSCDQM_HistoDef.h:38
compare.tlabel
tlabel
Definition: compare.py:28
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
cscdqm::Utility::getCSCTypeLabel
static std::string getCSCTypeLabel(int endcap, int station, int ring)
Get CSC label from CSC parameters.
Definition: CSCDQM_Utility.cc:80
cscdqm::EMUHistoDef
EMU Level Histogram Definition.
Definition: CSCDQM_HistoDef.h:258
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cscdqm::EventProcessor::summary
Summary summary
Definition: CSCDQM_EventProcessor.h:155
cscdqm
Definition: CSCDQM_DCSBase.h:29
cscdqm::Utility::getCSCTypeBin
static int getCSCTypeBin(const std::string &cstr)
Get CSC y-axis position from chamber string.
Definition: CSCDQM_Utility.cc:33
CSCDetId
Definition: CSCDetId.h:26
cscdqm::EventProcessor::getCSCHisto
const bool getCSCHisto(const HistoId &histo, const HwId &crateID, const HwId &dmbSlot, MonitorObject *&me)
Get CSC (Chamber) Level Monitoring Object.
Definition: CSCDQM_EventProcessor.cc:115
cscdqm::DDUHistoDef
DDU Level Histogram Definition.
Definition: CSCDQM_HistoDef.h:317
cscdqm::EventProcessor::EventProcessor
EventProcessor(Configuration *const p_config)
Constructor.
Definition: CSCDQM_EventProcessor.cc:27
cscdqm::EventProcessor::frdtoken
edm::EDGetTokenT< FEDRawDataCollection > frdtoken
Definition: CSCDQM_EventProcessor.h:173
CSCDetId::chamber
int chamber() const
Definition: CSCDetId.h:62
cscdqm::Summary::setMaskedHWElements
const unsigned int setMaskedHWElements(std::vector< std::string > &tokens)
Read HW element masks (strings), create Address and apply to detector map.
Definition: CSCDQM_Summary.cc:788
cscdqm::EventProcessor::getFEDHisto
const bool getFEDHisto(const HistoId &histo, const HwId &fedID, MonitorObject *&me)
Get FED Level Monitoring Object.
Definition: CSCDQM_EventProcessor.cc:82
cscdqm::Configuration
CSCDQM Framework Global Configuration.
Definition: CSCDQM_Configuration.h:231
CSCDetId::endcap
int endcap() const
Definition: CSCDetId.h:85
cscdqm::EventProcessor::getParHisto
const bool getParHisto(const HistoId &histo, MonitorObject *&me)
Get Parameter Monitoring Object.
Definition: CSCDQM_EventProcessor.cc:153
CSCDQM_EventProcessor.h
cscdqm::FEDHistoDef
FED Level Histogram Definition.
Definition: CSCDQM_HistoDef.h:272
cscdqm::EventProcessor::maskHWElements
unsigned int maskHWElements(std::vector< std::string > &tokens)
Mask HW elements from the efficiency calculations. Can be applied on runtime!
Definition: CSCDQM_EventProcessor.cc:202
cscdqm::MonitorObject
Monitoring Object interface used to cover Root object and provide common interface to EventProcessor ...
Definition: CSCDQM_MonitorObject.h:35
mps_fire.result
result
Definition: mps_fire.py:311
CSCDetId::station
int station() const
Definition: CSCDetId.h:79
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:45