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);