16 getAllProvenances(
false),
17 printProvenanceInfo(
false),
20 std::string MsgLoggerCat =
"GlobalHitsProdHistStripper_GlobalHitsProdHistStripper";
43 edm::LogInfo(MsgLoggerCat) <<
"\n===============================\n" 44 <<
"Initialized as EDAnalyzer with parameter values:\n" 45 <<
" Name = " <<
fName <<
"\n" 48 <<
" VtxUnit = " <<
vtxunit <<
"\n" 50 <<
" DoOutput = " <<
doOutput <<
"\n" 53 <<
"===============================\n";
66 std::string MsgLoggerCat =
"GlobalHitsProdHistStripper_endJob";
68 edm::LogInfo(MsgLoggerCat) <<
"Terminating having processed " <<
count <<
" runs.";
73 std::string MsgLoggerCat =
"GlobalHitsProdHistStripper_beginRun";
77 int nrun = iRun.
run();
80 edm::LogInfo(MsgLoggerCat) <<
"Processing run " << nrun <<
" (" <<
count <<
" runs total)";
83 edm::LogInfo(MsgLoggerCat) <<
"Processing run " << nrun <<
" (" <<
count <<
" runs total)";
88 std::vector<const edm::StableProvenance *> AllProv;
92 edm::LogInfo(MsgLoggerCat) <<
"Number of Provenances = " << AllProv.size();
95 TString eventout(
"\nProvenance info:\n");
97 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
98 eventout +=
"\n ******************************";
99 eventout +=
"\n Module : ";
100 eventout += AllProv[
i]->moduleLabel();
101 eventout +=
"\n ProductID : ";
102 eventout += AllProv[
i]->productID().id();
103 eventout +=
"\n ClassName : ";
104 eventout += AllProv[
i]->className();
105 eventout +=
"\n InstanceName : ";
106 eventout += AllProv[
i]->productInstanceName();
107 eventout +=
"\n BranchName : ";
108 eventout += AllProv[
i]->branchName();
110 eventout +=
"\n ******************************\n";
121 std::string MsgLoggerCat =
"GlobalHitsProdHistStripper_endRun";
124 std::vector<edm::Handle<TH1F>> allhistogram1D;
127 me.resize(allhistogram1D.size());
129 for (
uint i = 0;
i < allhistogram1D.size(); ++
i) {
130 histogram1D = allhistogram1D[
i];
132 edm::LogWarning(MsgLoggerCat) <<
"Invalid histogram extracted from event.";
168 if (subhist1 ==
"CaloE" || subhist1 ==
"CaloP") {
170 }
else if (subhist1 ==
"CaloH") {
172 }
else if (subhist1 ==
"Geant" || subhist2 ==
"MCG4" || subhist1 ==
"MCRGP") {
174 }
else if (subhist2 ==
"Muon") {
176 }
else if (subhist1 ==
"Track") {
181 histogram1D->GetTitle(),
182 histogram1D->GetXaxis()->GetNbins(),
183 histogram1D->GetXaxis()->GetXmin(),
184 histogram1D->GetXaxis()->GetXmax());
185 me[
i]->setAxisTitle(histogram1D->GetXaxis()->GetTitle(), 1);
186 me[
i]->setAxisTitle(histogram1D->GetYaxis()->GetTitle(), 2);
195 for (Int_t
x = 1;
x <= histogram1D->GetXaxis()->GetNbins(); ++
x) {
196 Double_t binx = histogram1D->GetBinCenter(
x);
197 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
void getManyByType(std::vector< Handle< PROD >> &results) 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