17 getAllProvenances(
false),
18 printProvenanceInfo(
false),
21 std::string MsgLoggerCat =
"GlobalHitsProdHistStripper_GlobalHitsProdHistStripper";
44 edm::LogInfo(MsgLoggerCat) <<
"\n===============================\n" 45 <<
"Initialized as EDAnalyzer with parameter values:\n" 46 <<
" Name = " <<
fName <<
"\n" 49 <<
" VtxUnit = " <<
vtxunit <<
"\n" 51 <<
" DoOutput = " <<
doOutput <<
"\n" 54 <<
"===============================\n";
67 std::string MsgLoggerCat =
"GlobalHitsProdHistStripper_endJob";
69 edm::LogInfo(MsgLoggerCat) <<
"Terminating having processed " <<
count <<
" runs.";
74 std::string MsgLoggerCat =
"GlobalHitsProdHistStripper_beginRun";
78 int nrun = iRun.
run();
81 edm::LogInfo(MsgLoggerCat) <<
"Processing run " << nrun <<
" (" <<
count <<
" runs total)";
84 edm::LogInfo(MsgLoggerCat) <<
"Processing run " << nrun <<
" (" <<
count <<
" runs total)";
89 std::vector<const edm::StableProvenance *> AllProv;
93 edm::LogInfo(MsgLoggerCat) <<
"Number of Provenances = " << AllProv.size();
96 TString eventout(
"\nProvenance info:\n");
98 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
99 eventout +=
"\n ******************************";
100 eventout +=
"\n Module : ";
101 eventout += AllProv[
i]->moduleLabel();
102 eventout +=
"\n ProductID : ";
103 eventout += AllProv[
i]->productID().id();
104 eventout +=
"\n ClassName : ";
105 eventout += AllProv[
i]->className();
106 eventout +=
"\n InstanceName : ";
107 eventout += AllProv[
i]->productInstanceName();
108 eventout +=
"\n BranchName : ";
109 eventout += AllProv[
i]->branchName();
111 eventout +=
"\n ******************************\n";
122 std::string MsgLoggerCat =
"GlobalHitsProdHistStripper_endRun";
125 std::vector<edm::Handle<TH1F>> allhistogram1D;
128 throw cms::Exception(
"UnsupportedFunction") <<
"GlobalHitsProdHistStripper::endRun: " 129 <<
"getManyByType has not been supported by the Framework since 2015. " 130 <<
"This module has been broken since then. Maybe it should be deleted. " 131 <<
"Another possibility is to upgrade to use GetterOfProducts instead.";
133 me.resize(allhistogram1D.size());
135 for (
uint i = 0;
i < allhistogram1D.size(); ++
i) {
136 histogram1D = allhistogram1D[
i];
138 edm::LogWarning(MsgLoggerCat) <<
"Invalid histogram extracted from event.";
174 if (subhist1 ==
"CaloE" || subhist1 ==
"CaloP") {
176 }
else if (subhist1 ==
"CaloH") {
178 }
else if (subhist1 ==
"Geant" || subhist2 ==
"MCG4" || subhist1 ==
"MCRGP") {
180 }
else if (subhist2 ==
"Muon") {
182 }
else if (subhist1 ==
"Track") {
187 histogram1D->GetTitle(),
188 histogram1D->GetXaxis()->GetNbins(),
189 histogram1D->GetXaxis()->GetXmin(),
190 histogram1D->GetXaxis()->GetXmax());
191 me[
i]->setAxisTitle(histogram1D->GetXaxis()->GetTitle(), 1);
192 me[
i]->setAxisTitle(histogram1D->GetYaxis()->GetTitle(), 2);
201 for (Int_t
x = 1;
x <= histogram1D->GetXaxis()->GetNbins(); ++
x) {
202 Double_t binx = histogram1D->GetBinCenter(
x);
203 Double_t
value = histogram1D->GetBinContent(
x);
T getParameter(std::string const &) const
void getAllStableProvenance(std::vector< StableProvenance const *> &provenances) const
void setCurrentFolder(std::string const &fullpath) override
Provenance const * provenance() const
T getUntrackedParameter(std::string const &, T const &) const
GlobalHitsProdHistStripper(const edm::ParameterSet &)
std::vector< MonitorElement * > me
Log< level::Info, false > LogInfo
void beginRun(const edm::Run &, const edm::EventSetup &) override
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
void beginJob(void) override
Log< level::Warning, false > LogWarning
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
~GlobalHitsProdHistStripper() override
void analyze(const edm::Event &, const edm::EventSetup &) override
void endRun(const edm::Run &, const edm::EventSetup &) override