15 : fName(
""),
verbosity(0), frequency(0), vtxunit(0),
20 "GlobalHitsProdHistStripper_GlobalHitsProdHistStripper";
32 m_Prov.getUntrackedParameter<
bool>(
"GetAllProvenances");
34 m_Prov.getUntrackedParameter<
bool>(
"PrintProvenanceInfo");
59 <<
"\n===============================\n" 60 <<
"Initialized as EDAnalyzer with parameter values:\n" 61 <<
" Name = " <<
fName <<
"\n" 62 <<
" Verbosity = " << verbosity <<
"\n" 63 <<
" Frequency = " << frequency <<
"\n" 64 <<
" VtxUnit = " << vtxunit <<
"\n" 65 <<
" OutputFile = " << outputfile <<
"\n" 66 <<
" DoOutput = " << doOutput <<
"\n" 67 <<
" GetProv = " << getAllProvenances <<
"\n" 68 <<
" PrintProv = " << printProvenanceInfo <<
"\n" 69 <<
"===============================\n";
87 std::string MsgLoggerCat =
"GlobalHitsProdHistStripper_endJob";
90 <<
"Terminating having processed " <<
count <<
" runs.";
97 std::string MsgLoggerCat =
"GlobalHitsProdHistStripper_beginRun";
101 int nrun = iRun.
run();
105 <<
"Processing run " << nrun <<
" (" <<
count <<
" runs total)";
109 <<
"Processing run " << nrun <<
" (" <<
count <<
" runs total)";
115 std::vector<const edm::StableProvenance*> AllProv;
120 <<
"Number of Provenances = " << AllProv.size();
123 TString eventout(
"\nProvenance info:\n");
125 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
126 eventout +=
"\n ******************************";
127 eventout +=
"\n Module : ";
128 eventout += AllProv[
i]->moduleLabel();
129 eventout +=
"\n ProductID : ";
130 eventout += AllProv[
i]->productID().id();
131 eventout +=
"\n ClassName : ";
132 eventout += AllProv[
i]->className();
133 eventout +=
"\n InstanceName : ";
134 eventout += AllProv[
i]->productInstanceName();
135 eventout +=
"\n BranchName : ";
136 eventout += AllProv[
i]->branchName();
138 eventout +=
"\n ******************************\n";
151 std::string MsgLoggerCat =
"GlobalHitsProdHistStripper_endRun";
154 std::vector<edm::Handle<TH1F> > allhistogram1D;
157 me.resize(allhistogram1D.size());
159 for (uint
i = 0;
i < allhistogram1D.size(); ++
i) {
160 histogram1D = allhistogram1D[
i];
163 <<
"Invalid histogram extracted from event.";
188 if ((histogram1D.
provenance()->branchDescription()).moduleLabel()
189 !=
"globalhitsprodhist")
continue;
197 if (subhist1 ==
"CaloE" || subhist1 ==
"CaloP") {
199 }
else if (subhist1 ==
"CaloH") {
201 }
else if (subhist1 ==
"Geant" || subhist2 ==
"MCG4" ||
202 subhist1 ==
"MCRGP") {
204 }
else if (subhist2 ==
"Muon") {
206 }
else if (subhist1 ==
"Track") {
211 histogram1D->GetXaxis()->GetNbins(),
212 histogram1D->GetXaxis()->GetXmin(),
213 histogram1D->GetXaxis()->GetXmax());
214 me[
i]->setAxisTitle(histogram1D->GetXaxis()->GetTitle(),1);
215 me[
i]->setAxisTitle(histogram1D->GetYaxis()->GetTitle(),2);
225 for (Int_t
x = 1;
x <= histogram1D->GetXaxis()->GetNbins(); ++
x) {
226 Double_t binx = histogram1D->GetBinCenter(
x);
227 Double_t
value = histogram1D->GetBinContent(
x);
228 me[
i]->Fill(binx,value);
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
virtual ~GlobalHitsProdHistStripper()
virtual void endRun(const edm::Run &, const edm::EventSetup &)
GlobalHitsProdHistStripper(const edm::ParameterSet &)
void setVerbose(unsigned level)
virtual void beginJob(void)
void getManyByType(std::vector< Handle< PROD > > &results) const
std::vector< MonitorElement * > me
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
void showDirStructure(void) const
void setCurrentFolder(const std::string &fullpath)
Provenance const * provenance() const