41 for ( i = 0; i <= 10; i++ ) edges.
push_back(
double( i ) *
double( i ) );
45 info() <<
"Got histogram from file" <<
endmsg;
48 error() <<
"Histogram h1 not found" <<
endmsg;
51 info() <<
"Booking Histograms" <<
endmsg;
54 m_h1D =
histoSvc()->book(
"1",
"1D fix binning", 50, 0., 100. );
57 m_h2D =
histoSvc()->book(
"2",
"2D fix binning", 50, 0., 100., 50, 0., 100. );
60 m_h3D =
histoSvc()->book(
"3",
"3D fix binning", 50, 0., 100., 50, 0., 100., 10, 0., 100. );
61 m_h3DVar =
histoSvc()->book(
"Var/3",
"3D variable binning", edges, edges, edges );
62 m_p1D =
histoSvc()->bookProf(
"Prof/1",
"Profile 1D", 50, 0., 100. );
63 m_p2D =
histoSvc()->bookProf(
"Prof/2",
"Profile 2D", 50, 0., 100., 50, 0., 100. );
67 error() <<
"----- Cannot book or register histograms -----" <<
endmsg;
70 info() <<
"Finished booking Histograms" <<
endmsg;
82 double x = sin(
double(
n ) ) * 52. + 50.;
83 double y = cos(
double( 2 *
n ) ) * 52. + 50.;
84 double z = cos(
double( 5 *
n ) ) * 52. + 50.;
92 m_h3D->fill( x, y, z );
96 m_p2D->fill( x, y, z );
106 debug() <<
"Finalizing..." <<
endmsg;
109 debug() <<
"Info about Histogram 1D\n" <<
endmsg;
112 debug() <<
"dim: " <<
m_h1D->dimension() <<
endmsg;
114 debug() <<
"Entries (In): " <<
m_h1D->entries() <<
endmsg;
115 debug() <<
"Entries (Out): " <<
m_h1D->extraEntries() <<
endmsg;
116 debug() <<
"Entries (All): " <<
m_h1D->allEntries() <<
endmsg;
117 debug() <<
"Entries (Eq.): " <<
m_h1D->equivalentBinEntries() <<
endmsg;
119 debug() <<
"Sum of Heights(In): " <<
m_h1D->sumBinHeights() <<
endmsg;
120 debug() <<
"Sum of Heights(Out): " <<
m_h1D->sumExtraBinHeights() <<
endmsg;
121 debug() <<
"Sum of Heights(All): " <<
m_h1D->sumAllBinHeights() <<
endmsg;
122 debug() <<
"Min. Heights(In): " <<
m_h1D->minBinHeight() <<
endmsg;
123 debug() <<
"Max. Heights(In): " <<
m_h1D->maxBinHeight() <<
endmsg;
128 debug() <<
"Printing H1: " <<
endmsg;
132 debug() <<
"Info about Histogram 1DVar\n" <<
endmsg;
138 debug() <<
"Entries (Out): " <<
m_h1DVar->extraEntries() <<
endmsg;
140 debug() <<
"Entries (Eq.): " <<
m_h1DVar->equivalentBinEntries() <<
endmsg;
141 debug() <<
"Sum of Heights(In): " <<
m_h1DVar->sumBinHeights() <<
endmsg;
142 debug() <<
"Sum of Heights(Out): " <<
m_h1DVar->sumExtraBinHeights() <<
endmsg;
143 debug() <<
"Sum of Heights(All): " <<
m_h1DVar->sumAllBinHeights() <<
endmsg;
144 debug() <<
"Min. Heights(In): " <<
m_h1DVar->minBinHeight() <<
endmsg;
145 debug() <<
"Max. Heights(In): " <<
m_h1DVar->maxBinHeight() <<
endmsg;
150 debug() <<
"Printing H1Var: " <<
endmsg;
154 debug() <<
"Info about Histogram 2D\n" <<
endmsg;
157 debug() <<
"dim: " <<
m_h2D->dimension() <<
endmsg;
159 debug() <<
"Entries (In): " <<
m_h2D->entries() <<
endmsg;
160 debug() <<
"Entries (Out): " <<
m_h2D->extraEntries() <<
endmsg;
161 debug() <<
"Entries (All): " <<
m_h2D->allEntries() <<
endmsg;
162 debug() <<
"Entries (Eq.): " <<
m_h2D->equivalentBinEntries() <<
endmsg;
163 debug() <<
"Sum of Heights(In): " <<
m_h2D->sumBinHeights() <<
endmsg;
164 debug() <<
"Sum of Heights(Out): " <<
m_h2D->sumExtraBinHeights() <<
endmsg;
165 debug() <<
"Sum of Heights(All): " <<
m_h2D->sumAllBinHeights() <<
endmsg;
166 debug() <<
"Min. Heights(In): " <<
m_h2D->minBinHeight() <<
endmsg;
167 debug() <<
"Max. Heights(In): " <<
m_h2D->maxBinHeight() <<
endmsg;
174 debug() <<
"Printing H1Var: " <<
endmsg;
178 debug() <<
"Info about Histogram 2DVar\n" <<
endmsg;
184 debug() <<
"Entries (Out): " <<
m_h2DVar->extraEntries() <<
endmsg;
186 debug() <<
"Entries (Eq.): " <<
m_h2DVar->equivalentBinEntries() <<
endmsg;
188 debug() <<
"Sum of Heights(In): " <<
m_h2DVar->sumBinHeights() <<
endmsg;
189 debug() <<
"Sum of Heights(Out): " <<
m_h2DVar->sumExtraBinHeights() <<
endmsg;
190 debug() <<
"Sum of Heights(All): " <<
m_h2DVar->sumAllBinHeights() <<
endmsg;
191 debug() <<
"Min. Heights(In): " <<
m_h2DVar->minBinHeight() <<
endmsg;
192 debug() <<
"Max. Heights(In): " <<
m_h2DVar->maxBinHeight() <<
endmsg;