Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-05-25 06:38:15

0001 #ifndef DQM_HcalCommon_DQClient_h
0002 #define DQM_HcalCommon_DQClient_h
0003 
0004 /**
0005  *  file:
0006  *  Author:
0007  *  Description:
0008  */
0009 
0010 #include "DQM/HcalCommon/interface/Container1D.h"
0011 #include "DQM/HcalCommon/interface/Container2D.h"
0012 #include "DQM/HcalCommon/interface/ContainerProf1D.h"
0013 #include "DQM/HcalCommon/interface/ContainerProf2D.h"
0014 #include "DQM/HcalCommon/interface/ContainerSingle1D.h"
0015 #include "DQM/HcalCommon/interface/ContainerSingle2D.h"
0016 #include "DQM/HcalCommon/interface/ContainerXXX.h"
0017 #include "DQM/HcalCommon/interface/DQModule.h"
0018 #include "DQM/HcalCommon/interface/Flag.h"
0019 #include "DQM/HcalCommon/interface/HashFilter.h"
0020 #include "DQM/HcalCommon/interface/Utilities.h"
0021 
0022 namespace hcaldqm {
0023   class DQClient : public DQModule {
0024   public:
0025     typedef dqm::legacy::MonitorElement MonitorElement;
0026     typedef dqm::legacy::DQMStore DQMStore;
0027 
0028     DQClient(std::string const &, std::string const &, edm::ParameterSet const &, edm::ConsumesCollector &iC);
0029     ~DQClient() override {}
0030 
0031     virtual void beginRun(edm::Run const &, edm::EventSetup const &);
0032     virtual void beginLuminosityBlock(DQMStore::IBooker &,
0033                                       DQMStore::IGetter &,
0034                                       edm::LuminosityBlock const &lb,
0035                                       edm::EventSetup const &);
0036     virtual void endLuminosityBlock(DQMStore::IBooker &,
0037                                     DQMStore::IGetter &,
0038                                     edm::LuminosityBlock const &,
0039                                     edm::EventSetup const &);
0040     virtual std::vector<flag::Flag> endJob(DQMStore::IBooker &, DQMStore::IGetter &);
0041 
0042   protected:
0043     struct LSSummary {
0044       //    vector of flags per each FED
0045       std::vector<std::vector<flag::Flag>> _vflags;
0046       int _LS;
0047     };
0048 
0049     //  task name
0050     std::string _taskname;
0051 
0052     //  counters
0053     int _totalLS;
0054     int _maxProcessedLS;
0055 
0056     //  emap
0057     edm::ESGetToken<HcalDbService, HcalDbRecord> hcalDbServiceToken_;
0058     edm::ESGetToken<RunInfo, RunInfoRcd> runInfoToken_;
0059     edm::ESGetToken<HcalChannelQuality, HcalChannelQualityRcd> hcalChannelQualityToken_;
0060     HcalElectronicsMap const *_emap;
0061 
0062     // Crate and crate eid lists
0063     std::vector<int> _vCrates;
0064     std::vector<uint32_t> _vhashCrates;
0065 
0066     //  FED and FED Eids lists
0067     std::vector<int> _vFEDs;
0068     std::vector<uint32_t> _vhashFEDs;
0069 
0070     //  Container of Quality masks
0071     ContainerXXX<uint32_t> _xQuality;
0072 
0073     //  vector of FEDs registered at cDAQ
0074     std::vector<uint32_t> _vcdaqEids;
0075   };
0076 }  // namespace hcaldqm
0077 
0078 #endif