13 #include "classlib/utils/StringList.h"
14 #include "classlib/utils/StringOps.h"
21 std::string MsgLoggerCat =
"MEtoEDMConverter_MEtoEDMConverter";
34 edm::LogInfo(MsgLoggerCat) <<
"\n===============================\n"
35 <<
"Initialized as EDProducer with parameter values:\n"
36 <<
" Name = " <<
fName <<
"\n"
37 <<
" Verbosity = " << verbosity <<
"\n"
38 <<
" Frequency = " << frequency <<
"\n"
39 <<
" Path = " << path <<
"\n"
40 <<
"===============================\n";
47 sName =
fName +
"Run";
63 sName =
fName +
"Lumi";
79 consumesMany<DQMToken, edm::InLumi>();
80 consumesMany<DQMToken, edm::InRun>();
81 usesResource(
"DQMStore");
83 static_assert(
sizeof(int64_t) ==
sizeof(
long long),
"type int64_t is not the same length as long long");
92 return std::shared_ptr<meedm::Void>();
104 return std::shared_ptr<meedm::Void>();
116 std::string MsgLoggerCat =
"MEtoEDMConverter_putData";
119 edm::LogInfo(MsgLoggerCat) <<
"\nStoring MEtoEDM dataformat histograms.";
122 std::vector<MonitorElement*>::iterator mmi, mme;
125 unsigned int n1F = 0;
126 unsigned int n1S = 0;
127 unsigned int n1D = 0;
128 unsigned int n1I = 0;
129 unsigned int n2F = 0;
130 unsigned int n2S = 0;
131 unsigned int n2D = 0;
132 unsigned int n2I = 0;
133 unsigned int n3F = 0;
134 unsigned int nProf = 0;
135 unsigned int nProf2 = 0;
136 unsigned int nDouble = 0;
137 unsigned int nInt64 = 0;
138 unsigned int nString = 0;
140 for (mmi =
items.begin(), mme =
items.end(); mmi != mme; ++mmi) {
150 switch (me->
kind()) {
209 <<
"' is neither a ROOT object nor a recognised "
210 <<
"simple object.\n";
216 std::unique_ptr<MEtoEDM<double> > pOutDouble(
new MEtoEDM<double>(nDouble));
217 std::unique_ptr<MEtoEDM<TString> > pOutString(
new MEtoEDM<TString>(nString));
218 std::unique_ptr<MEtoEDM<TH1F> > pOut1(
new MEtoEDM<TH1F>(n1F));
219 std::unique_ptr<MEtoEDM<TH1S> > pOut1s(
new MEtoEDM<TH1S>(n1S));
220 std::unique_ptr<MEtoEDM<TH1D> > pOut1d(
new MEtoEDM<TH1D>(n1D));
221 std::unique_ptr<MEtoEDM<TH1I> > pOut1i(
new MEtoEDM<TH1I>(n1I));
222 std::unique_ptr<MEtoEDM<TH2F> > pOut2(
new MEtoEDM<TH2F>(n2F));
223 std::unique_ptr<MEtoEDM<TH2S> > pOut2s(
new MEtoEDM<TH2S>(n2S));
224 std::unique_ptr<MEtoEDM<TH2D> > pOut2d(
new MEtoEDM<TH2D>(n2D));
225 std::unique_ptr<MEtoEDM<TH2I> > pOut2i(
new MEtoEDM<TH2I>(n2I));
226 std::unique_ptr<MEtoEDM<TH3F> > pOut3(
new MEtoEDM<TH3F>(n3F));
230 for (mmi =
items.begin(), mme =
items.end(); mmi != mme; ++mmi) {
239 switch (me->
kind()) {
298 <<
"' is neither a ROOT object nor a recognised "
299 <<
"simple object.\n";
308 sName =
fName +
"Lumi";
310 sName =
fName +
"Run";
315 iPutTo.put(
std::move(pOutDouble), sName);
316 iPutTo.put(
std::move(pOutString), sName);
LuminosityBlockID id() const
virtual TH2D * getTH2D() const
T getUntrackedParameter(std::string const &, T const &) const
virtual TH2F * getTH2F() const
virtual TH1I * getTH1I() const
virtual TH1F * getTH1F() const
virtual int64_t getIntValue() const
Kind kind() const
Get the type of the monitor element.
~MEtoEDMConverter() override
Log< level::Error, false > LogError
void endRunProduce(edm::Run &, const edm::EventSetup &) override
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
virtual TH1S * getTH1S() const
virtual std::vector< dqm::harvesting::MonitorElement * > getAllContents(std::string const &path) const
void produce(edm::Event &, const edm::EventSetup &) override
std::shared_ptr< meedm::Void > globalBeginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) const override
std::shared_ptr< meedm::Void > globalBeginRun(edm::Run const &, const edm::EventSetup &) const override
virtual TH2I * getTH2I() const
void meBookerGetter(iFunc f)
void globalEndRun(edm::Run const &, const edm::EventSetup &) override
virtual TProfile2D * getTProfile2D() const
virtual TH2S * getTH2S() const
Log< level::Info, false > LogInfo
virtual TProfile * getTProfile() const
virtual TH1D * getTH1D() const
LuminosityBlockNumber_t luminosityBlock() const
bool getLumiFlag() const
true if ME is meant to be stored for each luminosity section
virtual double getFloatValue() const
virtual const std::string & getStringValue() const
std::string getFullname() const
get full name of ME including Pathname
MEtoEDMConverter(const edm::ParameterSet &)
void putData(DQMStore::IGetter &g, T &iPutTo, bool iLumiOnly, uint32_t run, uint32_t lumi)
virtual TH3F * getTH3F() const
void endLuminosityBlockProduce(edm::LuminosityBlock &, const edm::EventSetup &) override