File indexing completed on 2024-04-06 12:07:19
0001 #ifndef EcalDQMonitorTask_H
0002 #define EcalDQMonitorTask_H
0003
0004 #include "DQM/EcalCommon/interface/EcalDQMonitor.h"
0005 #include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
0006
0007 #include "DQWorkerTask.h"
0008 #include "Collections.h"
0009
0010 #include <set>
0011 #include <map>
0012
0013 namespace edm {
0014 class InputTag;
0015 class ParameterSetDescription;
0016 }
0017
0018 class EcalDQMonitorTask : public DQMOneEDAnalyzer<edm::LuminosityBlockCache<ecaldqm::EcalLSCache>>,
0019 public ecaldqm::EcalDQMonitor {
0020 public:
0021 EcalDQMonitorTask(edm::ParameterSet const&);
0022 ~EcalDQMonitorTask() override {}
0023
0024 static void fillDescriptions(edm::ConfigurationDescriptions&);
0025
0026 void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0027 void dqmBeginRun(edm::Run const&, edm::EventSetup const&) override;
0028
0029 private:
0030 void dqmEndRun(edm::Run const&, edm::EventSetup const&) override;
0031 std::shared_ptr<ecaldqm::EcalLSCache> globalBeginLuminosityBlock(edm::LuminosityBlock const&,
0032 edm::EventSetup const&) const override;
0033 void globalEndLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
0034 void analyze(edm::Event const&, edm::EventSetup const&) override;
0035
0036 typedef void (EcalDQMonitorTask::*Processor)(edm::Event const&,
0037 ecaldqm::Collections,
0038 std::set<ecaldqm::DQWorker*> const&);
0039
0040 template <typename CollectionClass>
0041 void runOnCollection(edm::Event const&, ecaldqm::Collections, std::set<ecaldqm::DQWorker*> const&);
0042
0043 void formSchedule(std::vector<ecaldqm::Collections> const&, edm::ParameterSet const&);
0044
0045
0046
0047 edm::EDGetToken collectionTokens_[ecaldqm::nCollections];
0048 std::vector<std::pair<Processor, ecaldqm::Collections>> schedule_;
0049
0050 std::vector<std::string> skipCollections_;
0051
0052
0053
0054
0055 bool allowMissingCollections_;
0056
0057
0058
0059 int processedEvents_;
0060
0061
0062 time_t lastResetTime_;
0063 float resetInterval_;
0064 };
0065
0066 #endif