32 meESDcsFraction_ =
nullptr;
33 meESDcsActiveMap_ =
nullptr;
47 dqmStore_->setCurrentFolder(prefixME_ +
"/EventInfo");
49 sprintf(histo,
"DCSSummary");
50 meESDcsFraction_ = dqmStore_->bookFloat(histo);
51 meESDcsFraction_->Fill(-1.0);
53 sprintf(histo,
"DCSSummaryMap");
54 meESDcsActiveMap_ = dqmStore_->book1D(histo,histo, 2, 0., 2.);
55 meESDcsActiveMap_->setAxisTitle(
"(ES+/ES-)", 1);
64 if ( enableCleanup_ ) this->
cleanup();
72 for(
int i = 0;
i < 2;
i++) {
73 meESDcsActiveMap_->setBinContent(
i+1 , -1.0);
84 if ( meESDcsFraction_ ) meESDcsFraction_->Reset();
86 if ( meESDcsActiveMap_ ) meESDcsActiveMap_->Reset();
95 dqmStore_->setCurrentFolder(prefixME_ +
"/EventInfo");
97 if ( meESDcsFraction_ ) dqmStore_->removeElement( meESDcsFraction_->getName() );
99 if ( meESDcsActiveMap_ ) dqmStore_->removeElement( meESDcsActiveMap_->getName() );
109 float ESpDcsStatus = 0;
110 float ESmDcsStatus = 0;
115 for (DcsStatusCollection::const_iterator dcsStatusItr = dcsStatus->begin(); dcsStatusItr != dcsStatus->end(); ++dcsStatusItr) {
120 ESpDcsStatus = (ESpDcsStatus +
float(ievt_-1)*meESDcsActiveMap_->getBinContent(1))/
float(ievt_);
121 ESmDcsStatus = (ESmDcsStatus +
float(ievt_-1)*meESDcsActiveMap_->getBinContent(2))/
float(ievt_);
124 meESDcsActiveMap_->setBinContent(1, ESpDcsStatus);
125 meESDcsActiveMap_->setBinContent(2, ESmDcsStatus);
127 meESDcsFraction_->Fill( (ESpDcsStatus + ESmDcsStatus)/2. );
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
static void cleanup(const Factory::MakerMap::value_type &v)
void beginJob(void) override
BeginJob.
ESDcsInfoTask(const edm::ParameterSet &ps)
Constructor.
void endLuminosityBlock(const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &iSetup) override
EndLuminosityBlock.
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.
void reset(double vett[256])
void cleanup(void)
Cleanup.