17 getAllProvenances(
false),
18 printProvenanceInfo(
false),
21 std::string MsgLoggerCat =
"GlobalHitsProdHistStripper_GlobalHitsProdHistStripper";
56 edm::LogInfo(MsgLoggerCat) <<
"\n===============================\n" 57 <<
"Initialized as EDAnalyzer with parameter values:\n" 58 <<
" Name = " <<
fName <<
"\n" 59 <<
" Verbosity = " << verbosity <<
"\n" 60 <<
" Frequency = " << frequency <<
"\n" 61 <<
" VtxUnit = " << vtxunit <<
"\n" 62 <<
" OutputFile = " << outputfile <<
"\n" 63 <<
" DoOutput = " << doOutput <<
"\n" 64 <<
" GetProv = " << getAllProvenances <<
"\n" 65 <<
" PrintProv = " << printProvenanceInfo <<
"\n" 66 <<
"===============================\n";
79 std::string MsgLoggerCat =
"GlobalHitsProdHistStripper_endJob";
81 edm::LogInfo(MsgLoggerCat) <<
"Terminating having processed " <<
count <<
" runs.";
86 std::string MsgLoggerCat =
"GlobalHitsProdHistStripper_beginRun";
90 int nrun = iRun.
run();
93 edm::LogInfo(MsgLoggerCat) <<
"Processing run " << nrun <<
" (" <<
count <<
" runs total)";
96 edm::LogInfo(MsgLoggerCat) <<
"Processing run " << nrun <<
" (" <<
count <<
" runs total)";
101 std::vector<const edm::StableProvenance *> AllProv;
105 edm::LogInfo(MsgLoggerCat) <<
"Number of Provenances = " << AllProv.size();
108 TString eventout(
"\nProvenance info:\n");
110 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
111 eventout +=
"\n ******************************";
112 eventout +=
"\n Module : ";
113 eventout += AllProv[
i]->moduleLabel();
114 eventout +=
"\n ProductID : ";
115 eventout += AllProv[
i]->productID().id();
116 eventout +=
"\n ClassName : ";
117 eventout += AllProv[
i]->className();
118 eventout +=
"\n InstanceName : ";
119 eventout += AllProv[
i]->productInstanceName();
120 eventout +=
"\n BranchName : ";
121 eventout += AllProv[
i]->branchName();
123 eventout +=
"\n ******************************\n";
134 std::string MsgLoggerCat =
"GlobalHitsProdHistStripper_endRun";
137 std::vector<edm::Handle<TH1F>> allhistogram1D;
140 me.resize(allhistogram1D.size());
142 for (
uint i = 0;
i < allhistogram1D.size(); ++
i) {
143 histogram1D = allhistogram1D[
i];
145 edm::LogWarning(MsgLoggerCat) <<
"Invalid histogram extracted from event.";
172 if ((histogram1D.
provenance()->branchDescription()).moduleLabel() !=
"globalhitsprodhist")
181 if (subhist1 ==
"CaloE" || subhist1 ==
"CaloP") {
183 }
else if (subhist1 ==
"CaloH") {
185 }
else if (subhist1 ==
"Geant" || subhist2 ==
"MCG4" || subhist1 ==
"MCRGP") {
187 }
else if (subhist2 ==
"Muon") {
189 }
else if (subhist1 ==
"Track") {
194 histogram1D->GetTitle(),
195 histogram1D->GetXaxis()->GetNbins(),
196 histogram1D->GetXaxis()->GetXmin(),
197 histogram1D->GetXaxis()->GetXmax());
198 me[
i]->setAxisTitle(histogram1D->GetXaxis()->GetTitle(), 1);
199 me[
i]->setAxisTitle(histogram1D->GetYaxis()->GetTitle(), 2);
208 for (Int_t
x = 1;
x <= histogram1D->GetXaxis()->GetNbins(); ++
x) {
209 Double_t binx = histogram1D->GetBinCenter(
x);
210 Double_t
value = histogram1D->GetBinContent(
x);
211 me[
i]->Fill(binx, value);
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const
MonitorElement * book1D(char_string const &name, char_string const &title, int const nchX, double const lowX, double const highX)
Book 1D histogram.
GlobalHitsProdHistStripper(const edm::ParameterSet &)
void setVerbose(unsigned level)
std::vector< MonitorElement * > me
void setCurrentFolder(std::string const &fullpath)
void showDirStructure() const
void getManyByType(std::vector< Handle< PROD >> &results) const
void beginRun(const edm::Run &, const edm::EventSetup &) override
void save(std::string const &filename, std::string const &path="", std::string const &pattern="", std::string const &rewrite="", uint32_t run=0, uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, std::string const &fileupdate="RECREATE")
void beginJob(void) override
~GlobalHitsProdHistStripper() override
void analyze(const edm::Event &, const edm::EventSetup &) override
void endRun(const edm::Run &, const edm::EventSetup &) override
Provenance const * provenance() const