28 meESDcsFraction_ =
nullptr;
29 meESDcsActiveMap_ =
nullptr;
38 dqmStore_->setCurrentFolder(prefixME_ +
"/EventInfo");
40 sprintf(histo,
"DCSSummary");
41 meESDcsFraction_ = dqmStore_->bookFloat(histo);
42 meESDcsFraction_->Fill(-1.0);
44 sprintf(histo,
"DCSSummaryMap");
45 meESDcsActiveMap_ = dqmStore_->book1D(histo, histo, 2, 0., 2.);
46 meESDcsActiveMap_->setAxisTitle(
"(ES+/ES-)", 1);
55 for (
int i = 0;
i < 2;
i++) {
56 meESDcsActiveMap_->setBinContent(
i + 1, -1.0);
62 meESDcsFraction_->Reset();
64 if (meESDcsActiveMap_)
65 meESDcsActiveMap_->Reset();
71 float ESpDcsStatus = 0;
72 float ESmDcsStatus = 0;
77 for (DcsStatusCollection::const_iterator dcsStatusItr = dcsStatus->begin(); dcsStatusItr != dcsStatus->end();
83 ESpDcsStatus = (ESpDcsStatus + float(ievt_ - 1) * meESDcsActiveMap_->getBinContent(1)) /
float(ievt_);
84 ESmDcsStatus = (ESmDcsStatus + float(ievt_ - 1) * meESDcsActiveMap_->getBinContent(2)) /
float(ievt_);
87 meESDcsActiveMap_->setBinContent(1, ESpDcsStatus);
88 meESDcsActiveMap_->setBinContent(2, ESmDcsStatus);
90 meESDcsFraction_->Fill((ESpDcsStatus + ESmDcsStatus) / 2.);
T getUntrackedParameter(std::string const &, T const &) const
const edm::EventSetup & c
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
void beginJob(void) override
BeginJob.
ESDcsInfoTask(const edm::ParameterSet &ps)
Constructor.
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
void beginLuminosityBlock(const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &iSetup) override
BeginLuminosityBlock.
void endJob(void) override
EndJob.
~ESDcsInfoTask() override
Destructor.
T getParameter(std::string const &) const
void reset(double vett[256])