18 using namespace hcaldqm;
19 using namespace hcaldqm::constants;
51 tagHBHE_ref_(ps.getUntrackedParameter<edm::
InputTag>(
"tagHBHE_ref", edm::
InputTag(
"hltHbhereco@cpu"))),
52 tagHBHE_target_(ps.getUntrackedParameter<edm::
InputTag>(
"tagHBHE_target", edm::
InputTag(
"hltHbhereco@cuda"))),
64 _emap = dbs->getHcalMapping();
107 std::map<HcalDetId, double> mRecHitEnergy;
110 double energy = it->energy();
115 if (mRecHitEnergy.find(did) == mRecHitEnergy.end())
116 mRecHitEnergy.insert(std::make_pair(did, energy));
118 edm::LogError(
"HcalDQM|RechitTask") <<
"Duplicate Rechit from the same HcalDetId";
122 double energy = it->energy();
125 if (mRecHitEnergy.find(did) != mRecHitEnergy.end()) {
128 if (mRecHitEnergy[did] != 0.) {
131 }
else if (mRecHitEnergy[did] == 0. && energy == 0.) {
139 mRecHitEnergy.erase(did);
141 edm::LogError(
"HcalDQM|RechitTask") <<
"GPU Rechit id not found in CPU Rechit id collection";
143 if (!mRecHitEnergy.empty())
144 edm::LogError(
"HcalDQM|RechitTask") <<
"CPU Rechit id not found in GPU Rechit id collection";
149 return DQTask::globalBeginLuminosityBlock(lb, es);
157 auto lumiCache = luminosityBlockCache(lb.
index());
161 DQTask::globalEndLuminosityBlock(lb, es);
hcaldqm::Container2D energyDiffGPUCPU_depth_
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
virtual void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *qy=new quantity::ValueQuantity(quantity::fN), int debug=0)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
LuminosityBlockIndex index() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
void _resetMonitors(hcaldqm::UpdateFreq) override
edm::InputTag tagHBHE_target_
std::vector< T >::const_iterator const_iterator
HcalGPUComparisonTask(edm::ParameterSet const &)
void _process(edm::Event const &, edm::EventSetup const &) override
hcaldqm::Container2D energyGPUvsCPU_subdet_
Log< level::Error, false > LogError
edm::EDGetTokenT< HBHERecHitCollection > tokHBHE_target_
example_stream void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
virtual void fill(uint32_t)
void globalEndLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
void dqmthrow(std::string const &msg) const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
LuminosityBlock const & getLuminosityBlock() const
edm::InputTag tagHBHE_ref_
HcalElectronicsMap const * _emap
edm::EDGetTokenT< HBHERecHitCollection > tokHBHE_ref_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="")
virtual void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fN), int debug=0)
edm::ESGetToken< HcalDbService, HcalDbRecord > hcalDbServiceToken_
void fill(HcalDetId const &) override
hcaldqm::Container1D energyDiffGPUCPU_subdet_
std::shared_ptr< hcaldqm::Cache > globalBeginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) const override
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="") override