16 runInputTag_(iPSet.getParameter<edm::InputTag>(
"runInputTag")),
17 lumiInputTag_(iPSet.getParameter<edm::InputTag>(
"lumiInputTag"))
19 std::string MsgLoggerCat =
"EDMtoMEConverter_EDMtoMEConverter";
40 <<
"\n===============================\n"
41 <<
"Initialized as EDAnalyzer with parameter values:\n"
42 <<
" Name = " <<
name <<
"\n"
43 <<
" Verbosity = " << verbosity <<
"\n"
44 <<
" Frequency = " << frequency <<
"\n"
45 <<
"===============================\n";
66 assert(
sizeof(int64_t) ==
sizeof(
long long));
78 std::string MsgLoggerCat =
"EDMtoMEConverter_endJob";
81 <<
"Terminating having processed " <<
iCount.size() <<
" runs across "
94 std::string MsgLoggerCat =
"EDMtoMEConverter_beginRun";
96 int nrun = iRun.
run();
103 <<
"Processing run " << nrun <<
" (" <<
iCount.size() <<
" runs total)";
107 <<
"Processing run " << nrun <<
" (" <<
iCount.size() <<
" runs total)";
146 std::string MsgLoggerCat =
"EDMtoMEConverter_getData";
149 edm::LogInfo (MsgLoggerCat) <<
"\nRestoring MonitorElements.";
155 iGetFrom.getByLabel(*inputTag, metoedm);
163 std::vector<MEtoEDM<TH1F>::MEtoEDMObject> metoedmobject =
164 metoedm->getMEtoEdmObject();
166 me1.resize(metoedmobject.size());
168 for (
unsigned int i = 0;
i < metoedmobject.size(); ++
i) {
181 for (
unsigned j = 0;
j < fulldir.size() - 1; ++
j) {
183 if (
j != fulldir.size() - 2) dir +=
"/";
188 me1[
i] =
dbe->
get(dir+
"/"+metoedmobject[
i].
object.GetName());
191 list.Add(&metoedmobject[
i].
object);
193 std::cout <<
"ERROR EDMtoMEConverter::getData(): merge failed for '"
194 << metoedmobject[
i].object.GetName() <<
"'" << std::endl;
198 &metoedmobject[
i].
object);
200 if (!iEndRun)
me1[
i]->setLumiFlag();
206 for (
unsigned int j = 0;
j < tags.size(); ++
j) {
214 iGetFrom.getByLabel(*inputTag, metoedm);
222 std::vector<MEtoEDM<TH1S>::MEtoEDMObject> metoedmobject =
223 metoedm->getMEtoEdmObject();
225 me1.resize(metoedmobject.size());
227 for (
unsigned int i = 0;
i < metoedmobject.size(); ++
i) {
240 for (
unsigned j = 0;
j < fulldir.size() - 1; ++
j) {
242 if (
j != fulldir.size() - 2) dir +=
"/";
247 me1[
i] =
dbe->
get(dir+
"/"+metoedmobject[
i].
object.GetName());
248 if (
me1[
i] &&
me1[
i]->getTH1S() &&
me1[
i]->getTH1S()->TestBit(TH1::kCanRebin) ==
true) {
250 list.Add(&metoedmobject[
i].
object);
251 if (
me1[
i]->getTH1S()->Merge(&list) == -1)
252 std::cout <<
"ERROR EDMtoMEConverter::getData(): merge failed for '"
253 << metoedmobject[
i].object.GetName() <<
"'" << std::endl;
257 &metoedmobject[
i].
object);
259 if (!iEndRun)
me1[
i]->setLumiFlag();
265 for (
unsigned int j = 0;
j < tags.size(); ++
j) {
273 iGetFrom.getByLabel(*inputTag, metoedm);
281 std::vector<MEtoEDM<TH1D>::MEtoEDMObject> metoedmobject =
282 metoedm->getMEtoEdmObject();
284 me1.resize(metoedmobject.size());
286 for (
unsigned int i = 0;
i < metoedmobject.size(); ++
i) {
299 for (
unsigned j = 0;
j < fulldir.size() - 1; ++
j) {
301 if (
j != fulldir.size() - 2) dir +=
"/";
306 me1[
i] =
dbe->
get(dir+
"/"+metoedmobject[
i].
object.GetName());
307 if (
me1[
i] &&
me1[
i]->getTH1D() &&
me1[
i]->getTH1D()->TestBit(TH1::kCanRebin) ==
true) {
309 list.Add(&metoedmobject[
i].
object);
310 if (
me1[
i]->getTH1D()->Merge(&list) == -1)
311 std::cout <<
"ERROR EDMtoMEConverter::getData(): merge failed for '"
312 << metoedmobject[
i].object.GetName() <<
"'" << std::endl;
316 &metoedmobject[
i].
object);
318 if (!iEndRun)
me1[
i]->setLumiFlag();
324 for (
unsigned int j = 0;
j < tags.size(); ++
j) {
332 iGetFrom.getByLabel(*inputTag, metoedm);
340 std::vector<MEtoEDM<TH2F>::MEtoEDMObject> metoedmobject =
341 metoedm->getMEtoEdmObject();
343 me2.resize(metoedmobject.size());
345 for (
unsigned int i = 0;
i < metoedmobject.size(); ++
i) {
358 for (
unsigned j = 0;
j < fulldir.size() - 1; ++
j) {
360 if (
j != fulldir.size() - 2) dir +=
"/";
365 me2[
i] =
dbe->
get(dir+
"/"+metoedmobject[
i].
object.GetName());
368 list.Add(&metoedmobject[
i].
object);
370 std::cout <<
"ERROR EDMtoMEConverter::getData(): merge failed for '"
371 << metoedmobject[
i].object.GetName() <<
"'" << std::endl;
375 &metoedmobject[
i].
object);
377 if (!iEndRun)
me2[
i]->setLumiFlag();
383 for (
unsigned int j = 0;
j < tags.size(); ++
j) {
391 iGetFrom.getByLabel(*inputTag, metoedm);
399 std::vector<MEtoEDM<TH2S>::MEtoEDMObject> metoedmobject =
400 metoedm->getMEtoEdmObject();
402 me2.resize(metoedmobject.size());
404 for (
unsigned int i = 0;
i < metoedmobject.size(); ++
i) {
417 for (
unsigned j = 0;
j < fulldir.size() - 1; ++
j) {
419 if (
j != fulldir.size() - 2) dir +=
"/";
424 me2[
i] =
dbe->
get(dir+
"/"+metoedmobject[
i].
object.GetName());
425 if (
me2[
i] &&
me2[
i]->getTH2S() &&
me2[
i]->getTH2S()->TestBit(TH1::kCanRebin) ==
true) {
427 list.Add(&metoedmobject[
i].
object);
428 if (
me2[
i]->getTH2S()->Merge(&list) == -1)
429 std::cout <<
"ERROR EDMtoMEConverter::getData(): merge failed for '"
430 << metoedmobject[
i].object.GetName() <<
"'" << std::endl;
434 &metoedmobject[
i].
object);
436 if (!iEndRun)
me2[
i]->setLumiFlag();
442 for (
unsigned int j = 0;
j < tags.size(); ++
j) {
450 iGetFrom.getByLabel(*inputTag, metoedm);
458 std::vector<MEtoEDM<TH2D>::MEtoEDMObject> metoedmobject =
459 metoedm->getMEtoEdmObject();
461 me2.resize(metoedmobject.size());
463 for (
unsigned int i = 0;
i < metoedmobject.size(); ++
i) {
476 for (
unsigned j = 0;
j < fulldir.size() - 1; ++
j) {
478 if (
j != fulldir.size() - 2) dir +=
"/";
483 me2[
i] =
dbe->
get(dir+
"/"+metoedmobject[
i].
object.GetName());
484 if (
me2[
i] &&
me2[
i]->getTH2D() &&
me2[
i]->getTH2D()->TestBit(TH1::kCanRebin) ==
true) {
486 list.Add(&metoedmobject[
i].
object);
487 if (
me2[
i]->getTH2D()->Merge(&list) == -1)
488 std::cout <<
"ERROR EDMtoMEConverter::getData(): merge failed for '"
489 << metoedmobject[
i].object.GetName() <<
"'" << std::endl;
493 &metoedmobject[
i].
object);
495 if (!iEndRun)
me2[
i]->setLumiFlag();
501 for (
unsigned int j = 0;
j < tags.size(); ++
j) {
509 iGetFrom.getByLabel(*inputTag, metoedm);
517 std::vector<MEtoEDM<TH3F>::MEtoEDMObject> metoedmobject =
518 metoedm->getMEtoEdmObject();
520 me3.resize(metoedmobject.size());
522 for (
unsigned int i = 0;
i < metoedmobject.size(); ++
i) {
535 for (
unsigned j = 0;
j < fulldir.size() - 1; ++
j) {
537 if (
j != fulldir.size() - 2) dir +=
"/";
542 me3[
i] =
dbe->
get(dir+
"/"+metoedmobject[
i].
object.GetName());
545 list.Add(&metoedmobject[
i].
object);
547 std::cout <<
"ERROR EDMtoMEConverter::getData(): merge failed for '"
548 << metoedmobject[
i].object.GetName() <<
"'" << std::endl;
552 &metoedmobject[
i].
object);
554 if (!iEndRun)
me3[
i]->setLumiFlag();
560 for (
unsigned int j = 0;
j < tags.size(); ++
j) {
568 iGetFrom.getByLabel(*inputTag, metoedm);
576 std::vector<MEtoEDM<TProfile>::MEtoEDMObject> metoedmobject =
577 metoedm->getMEtoEdmObject();
579 me4.resize(metoedmobject.size());
581 for (
unsigned int i = 0;
i < metoedmobject.size(); ++
i) {
594 for (
unsigned j = 0;
j < fulldir.size() - 1; ++
j) {
596 if (
j != fulldir.size() - 2) dir +=
"/";
602 me4[
i] =
dbe->
get(dir+
"/"+metoedmobject[
i].
object.GetName());
605 list.Add(&metoedmobject[
i].
object);
607 std::cout <<
"ERROR EDMtoMEConverter::getData(): merge failed for '"
608 << metoedmobject[
i].object.GetName() <<
"'" << std::endl;
612 &metoedmobject[
i].
object);
614 if (!iEndRun)
me4[
i]->setLumiFlag();
620 for (
unsigned int j = 0;
j < tags.size(); ++
j) {
628 iGetFrom.getByLabel(*inputTag, metoedm);
636 std::vector<MEtoEDM<TProfile2D>::MEtoEDMObject> metoedmobject =
637 metoedm->getMEtoEdmObject();
639 me5.resize(metoedmobject.size());
641 for (
unsigned int i = 0;
i < metoedmobject.size(); ++
i) {
654 for (
unsigned j = 0;
j < fulldir.size() - 1; ++
j) {
656 if (
j != fulldir.size() - 2) dir +=
"/";
661 me5[
i] =
dbe->
get(dir+
"/"+metoedmobject[
i].
object.GetName());
664 list.Add(&metoedmobject[
i].
object);
666 std::cout <<
"ERROR EDMtoMEConverter::getData(): merge failed for '"
667 << metoedmobject[
i].object.GetName() <<
"'" << std::endl;
671 &metoedmobject[
i].
object);
673 if (!iEndRun)
me5[
i]->setLumiFlag();
679 for (
unsigned int j = 0;
j < tags.size(); ++
j) {
687 iGetFrom.getByLabel(*inputTag, metoedm);
695 std::vector<MEtoEDM<double>::MEtoEDMObject> metoedmobject =
696 metoedm->getMEtoEdmObject();
698 me6.resize(metoedmobject.size());
700 for (
unsigned int i = 0;
i < metoedmobject.size(); ++
i) {
714 name = *(fulldir.end() - 1);
716 for (
unsigned j = 0;
j < fulldir.size() - 1; ++
j) {
718 if (
j != fulldir.size() - 2) dir +=
"/";
725 me6[
i]->Fill(metoedmobject[
i].
object);
726 if (!iEndRun)
me6[
i]->setLumiFlag();
732 for (
unsigned int j = 0;
j < tags.size(); ++
j) {
740 iGetFrom.getByLabel(*inputTag, metoedm);
748 std::vector<MEtoEDM<long long>::MEtoEDMObject> metoedmobject =
749 metoedm->getMEtoEdmObject();
751 me7.resize(metoedmobject.size());
753 for (
unsigned int i = 0;
i < metoedmobject.size(); ++
i) {
766 name = *(fulldir.end() - 1);
768 for (
unsigned j = 0;
j < fulldir.size() - 1; ++
j) {
770 if (
j != fulldir.size() - 2) dir +=
"/";
778 if (name.find(
"processedEvents") != std::string::npos) {
780 ival = me->getIntValue();
785 me7[
i]->Fill(metoedmobject[
i].
object+ival);
786 if (!iEndRun)
me7[
i]->setLumiFlag();
792 for (
unsigned int j = 0;
j < tags.size(); ++
j) {
800 iGetFrom.getByLabel(*inputTag, metoedm);
808 std::vector<MEtoEDM<int>::MEtoEDMObject> metoedmobject =
809 metoedm->getMEtoEdmObject();
811 me7.resize(metoedmobject.size());
813 for (
unsigned int i = 0;
i < metoedmobject.size(); ++
i) {
826 name = *(fulldir.end() - 1);
828 for (
unsigned j = 0;
j < fulldir.size() - 1; ++
j) {
830 if (
j != fulldir.size() - 2) dir +=
"/";
838 if (name.find(
"processedEvents") != std::string::npos) {
840 ival = me->getIntValue();
845 me7[
i]->Fill(metoedmobject[
i].
object+ival);
846 if (!iEndRun)
me7[
i]->setLumiFlag();
852 for (
unsigned int j = 0;
j < tags.size(); ++
j) {
860 iGetFrom.getByLabel(*inputTag, metoedm);
868 std::vector<MEtoEDM<TString>::MEtoEDMObject> metoedmobject =
869 metoedm->getMEtoEdmObject();
871 me8.resize(metoedmobject.size());
873 for (
unsigned int i = 0;
i < metoedmobject.size(); ++
i) {
886 name = *(fulldir.end() - 1);
888 for (
unsigned j = 0;
j < fulldir.size() - 1; ++
j) {
890 if (
j != fulldir.size() - 2) dir +=
"/";
898 if (!iEndRun)
me8[
i]->setLumiFlag();
904 for (
unsigned int j = 0;
j < tags.size(); ++
j) {
913 std::vector<std::string> stags;
915 for (
unsigned int i = 0;
i < stags.size(); ++
i) {
916 std::cout <<
"Tags: " << stags[
i] << std::endl;
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::vector< uint32_t > TagList
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * book2S(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2S histogram.
TProfile * getTProfile(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
MonitorElement * book3D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ)
Book 3D histogram.
MonitorElement * book2DD(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D double histogram.
EDMtoMEConverter(const edm::ParameterSet &)
std::vector< MonitorElement * > me6
virtual void endRun(const edm::Run &, const edm::EventSetup &)
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
std::vector< std::string > classtypes
MonitorElement * bookFloat(const char *name)
Book float.
void tag(MonitorElement *me, unsigned int myTag)
edm::InputTag lumiInputTag_
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
std::vector< MonitorElement * > me8
MonitorElement * bookString(const char *name, const char *value)
Book string.
TH3F * getTH3F(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
virtual void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
std::vector< MonitorElement * > me7
std::vector< MonitorElement * > me1
edm::InputTag runInputTag_
std::vector< MonitorElement * > me4
std::vector< MonitorElement * > me5
TH1F * getTH1F(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
TProfile2D * getTProfile2D(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
void getAllTags(std::vector< std::string > &into) const
virtual void respondToOpenInputFile(const edm::FileBlock &)
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
std::vector< MonitorElement * > me2
virtual ~EDMtoMEConverter()
TH2F * getTH2F(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
MonitorElement * bookInt(const char *name)
Book int.
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
std::vector< MonitorElement * > me3
MonitorElement * book1S(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
void setCurrentFolder(const std::string &fullpath)
std::map< int, int > iCount
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
void getData(T &iGetFrom, bool iEndRun)
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")