30{
33
35
38 JRange_t X;
39 JRange_t Y;
40 double precision;
42
43 try {
44
45 JParser<> zap(
"Auxiliary program to zoom 2D histograms.");
46
47 zap[
'f'] =
make_field(inputFile,
"<input file>:<object name>");
53
55 }
56 catch(const exception &error) {
58 }
59
61
63
65
67
69 ERROR(
"File: " << input->getFullFilename() <<
" not opened." <<
endl);
70 continue;
71 }
72
74
76
78
79 const TString tag(
key->GetName());
80
82
83
84
86
88
90
91 const Int_t ix1 = max(
ha->GetXaxis()->FindBin(X.getLowerLimit()), 1);
92 const Int_t ix2 = min(
ha->GetXaxis()->FindBin(X.getUpperLimit()),
ha->GetXaxis()->GetNbins());
93 const Int_t iy1 = max(
ha->GetYaxis()->FindBin(Y.getLowerLimit()), 1);
94 const Int_t iy2 = min(
ha->GetYaxis()->FindBin(Y.getUpperLimit()),
ha->GetYaxis()->GetNbins());
95
97 <<
"[" <<
ix1 <<
"," <<
ix2 <<
"]" <<
" x "
99
101 ix2 -
ix1 + 1,
ha->GetXaxis()->GetBinLowEdge(
ix1),
ha->GetXaxis()->GetBinUpEdge(
ix2),
102 iy2 -
iy1 + 1,
ha->GetYaxis()->GetBinLowEdge(
iy1),
ha->GetYaxis()->GetBinUpEdge(
iy2));
103
104 if (fabs(
ha->GetXaxis()->GetBinWidth(1) -
hb->GetXaxis()->GetBinWidth(1)) > precision) {
105 FATAL(
"Binwidth x " <<
FIXED(9,5) <<
ha->GetXaxis()->GetBinWidth(1) <<
" != " <<
FIXED(9,5) <<
hb->GetXaxis()->GetBinWidth(1) <<
endl);
106 }
107 if (fabs(
ha->GetYaxis()->GetBinWidth(1) -
hb->GetYaxis()->GetBinWidth(1)) > precision) {
108 FATAL(
"Binwidth y " <<
FIXED(9,5) <<
ha->GetYaxis()->GetBinWidth(1) <<
" != " <<
FIXED(9,5) <<
hb->GetYaxis()->GetBinWidth(1) <<
endl);
109 }
110
113
115
116 if (
ha->GetSumw2N()) {
118 }
119 }
120 }
121
123 }
124 }
125 }
126 }
127
129
131
133 (*i)->Write();
134 }
135
136 out.Write();
137 out.Close();
138 }
139}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
#define MAKE_CSTRING(A)
Make C-string.
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
TDirectory * getDirectory(const JRootObjectID &id)
Get TDirectory pointer.
bool isTObject(const TKey *key)
Check if given key corresponds to a TObject.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...