4 #pragma warning( disable : 2259 ) 10 #pragma warning( disable : 4996 ) 34 inline string histoAddr(
const string&
name )
36 if ( 0 == name.find(
"/stat/" ) ) {
37 return string( name, 6 );
42 inline string histoAddr(
const DataObject* obj,
const string& rel )
54 return histoAddr( name );
56 if (
'/' == name[name.size() - 1] ||
'/' == rel[0] ) {
57 return histoAddr( name + rel );
59 return histoAddr( name +
"/" + rel );
64 for (
auto it = m.
begin(); m.
end() != it; ++it ) {
65 if ( 0 == it->first.find( lead ) ) {
66 string addr = string( it->first, lead.size() );
70 return 1 + removeLeading( m, lead );
81 return registerObject( split.first, split.second, obj );
90 if ( !hObj->annotation().addItem(
"id", obj.substr( 1 ) ) ) hObj->annotation().setValue(
"id", obj.substr( 1 ) );
93 if ( !hObj->annotation().addItem(
"id", obj ) ) hObj->annotation().setValue(
"id", obj );
102 TH3D* h3d = Gaudi::getRepresentation<IHistogram3D, TH3D>(
h );
104 TH2D* h2d =
dynamic_cast<TH2D*
>( h3d->Project3D( dir.c_str() ) );
107 if ( r.second && registerObject( nameAndTitle, r.second ).isSuccess() ) {
121 if ( b )
return b->
print( s );
122 error() <<
"Unknown histogram type: Cannot cast to Gaudi::HistogramBase." <<
endmsg;
130 if ( b )
return b->
write( s );
131 error() <<
"Unknown histogram type: Cannot cast to Gaudi::HistogramBase." <<
endmsg;
139 if ( b )
return b->
write( file_name );
140 error() <<
"Unknown histogram type: Cannot cast to Gaudi::HistogramBase." <<
endmsg;
150 tmp.insert( tmp.begin(), m_rootName.begin(), m_rootName.end() );
153 if ( tmp.rfind(
SEPARATOR ) == tmp.length() - 1 ) {
157 return {tmp.substr( 0, sep ), tmp.substr( sep )};
163 string tmpPath = newPath;
165 tmpPath.insert( tmpPath.begin(),
SEPARATOR );
166 tmpPath.insert( tmpPath.begin(), m_rootName.begin(), m_rootName.end() );
169 if ( tmpPath.rfind(
SEPARATOR ) == tmpPath.length() - 1 ) {
170 tmpPath.erase( tmpPath.rfind(
SEPARATOR ), 1 );
178 string rest( tmpPath, sep + 1, tmpPath.length() - sep );
179 string subPath( tmpPath, 0, sep );
181 createPath( subPath );
183 error() <<
"Unable to create the histogram path" <<
endmsg;
186 pObject = createDirectory( subPath, rest );
200 error() <<
"Unable to create the histogram directory: " << parentDir <<
"/" << subDir <<
endmsg;
204 error() <<
"Unable to create the histogram directory: " << parentDir <<
"/" << subDir <<
endmsg;
208 return directory.release();
214 setDataLoader(
nullptr ).ignore();
215 clearStore().ignore();
223 StatusCode status = this->findObject( m_rootName, pO );
225 string::size_type loc = ident.find(
" " );
226 string filename, auth, svc =
"", typ =
"";
227 string logname = ident.substr( 0, loc );
228 for (
auto attrib : Parser( ident.substr( loc + 1 ) ) ) {
229 switch (::
toupper( attrib.tag[0] ) ) {
241 if ( typ.length() > 0 ) {
243 string entryname = m_rootName;
245 entryname += logname;
247 switch (::
toupper( typ[0] ) ) {
256 status = registerAddress( pO, logname, pA );
258 info() <<
"Added stream file:" << filename <<
" as " << logname <<
endmsg;
265 error() <<
"Cannot add " << ident <<
" invalid filename!" <<
endmsg;
276 status = setRoot(
"/stat", rootObj.get() );
280 error() <<
"Unable to set hstogram data store root." <<
endmsg;
283 auto svc = service<IConversionSvc>(
"HistogramPersistencySvc", true );
285 setDataLoader( svc.get() ).ignore();
287 error() <<
"Could not find HistogramPersistencySvc." <<
endmsg;
291 for (
auto& j : m_input ) {
292 status = connectInput( j );
293 if ( !status.
isSuccess() )
return status;
296 if ( !m_defs1D.empty() ) {
297 info() <<
" Predefined 1D-Histograms: " <<
endmsg;
298 for (
const auto& ih : m_defs1D ) {
299 info() <<
" Path='" << ih.first <<
"'" 300 <<
" Description " << ih.second <<
endmsg;
313 IHistogram1D*
HistogramSvc::sliceX(
const string& name,
const IHistogram2D& h,
int idxY1,
int idxY2 )
321 throw GaudiException(
"Cannot cast 2D histogram to H2D to create sliceX `" + name +
"'!",
"HistogramSvc",
324 if ( o.first && registerObject( name, (IBaseHistogram*)o.second ).isSuccess() ) {
332 IHistogram1D*
HistogramSvc::sliceY(
const string& name,
const IHistogram2D& h,
int indexX1,
int indexX2 )
343 if ( o.first && registerObject( name, (IBaseHistogram*)o.second ).isSuccess() ) {
353 StatusCode sc = unregisterObject( dynamic_cast<IHistogram*>( hist ) );
361 const string& title,
int nx,
double lowx,
double upx )
363 if ( m_defs1D.empty() ) {
364 return i_book( pPar, rel, title,
Gaudi::createH1D( title, nx, lowx, upx ) );
366 string hn = histoAddr( pPar, rel );
367 auto ifound = m_defs1D.find( hn );
368 if ( m_defs1D.end() == ifound ) {
369 return i_book( pPar, rel, title,
Gaudi::createH1D( title, nx, lowx, upx ) );
372 debug() <<
" Redefine the parameters for the histogram '" + hn +
"' to be " << ifound->second <<
endmsg;
374 m_mods1D.insert( hn );
375 return i_book( pPar, rel, ifound->second.title(),
376 Gaudi::createH1D( ifound->second.title(), ifound->second.bins(), ifound->second.lowEdge(),
377 ifound->second.lowEdge() ) );
396 removeLeading(
m_defs1D.value(),
"/stat/" );
410 debug() <<
" " << im->second;
421 int nx,
double lowx,
double upx )
429 int nx,
double lowx,
double upx )
437 int nx,
double lowx,
double upx )
445 int nx,
double lowx,
double upx )
447 return book( loc.first, loc.second, title, nx, lowx, upx );
452 int nx,
double lowx,
double upx )
460 int nx,
double lowx,
double upx,
const string& opt )
467 int nx,
double lowx,
double upx,
const string& opt )
474 int nx,
double lowx,
double upx,
const string& opt )
482 int nx,
double lowx,
double upx,
const string& opt )
484 return bookProf( loc.first, loc.second, title, nx, lowx, upx, opt );
489 int nx,
double lowx,
double upx,
const string& opt )
497 int nx,
double lowx,
double upx,
const string& opt )
505 int nx,
double lowx,
double upx,
506 double upper,
double lower,
const string& opt )
513 int nx,
double lowx,
double upx,
514 double upper,
double lower,
const string& opt )
521 int nx,
double lowx,
double upx,
522 double upper,
double lower,
const string& opt )
530 int nx,
double lowx,
double upx,
531 double upper,
double lower,
const string& opt )
533 return bookProf( loc.first, loc.second, title, nx, lowx, upx, upper, lower, opt );
538 int nx,
double lowx,
double upx,
539 double upper,
double lower,
const string& opt )
547 int nx,
double lowx,
double upx,
548 double upper,
double lower,
const string& opt )
578 return book( loc.first, loc.second, title, e );
627 return bookProf( loc.first, loc.second, title, e );
640 double upper,
double lower )
648 double upper,
double lower )
656 double upper,
double lower )
664 double upper,
double lower )
672 double upper,
double lower )
674 return bookProf( loc.first, loc.second, title, e, upper, lower );
680 double upper,
double lower )
687 int nx,
double lowx,
double upx,
int ny,
688 double lowy,
double upy )
690 return book(
i_splitPath( full ), title, nx, lowx, upx, ny, lowy, upy );
696 int nx,
double lowx,
double upx,
697 int ny,
double lowy,
double upy )
699 return book(
createPath( par ), rel, title, nx, lowx, upx, ny, lowy, upy );
705 int nx,
double lowx,
double upx,
706 int ny,
double lowy,
double upy )
714 int nx,
double lowx,
double upx,
715 int ny,
double lowy,
double upy )
717 return book( loc.first, loc.second, title, nx, lowx, upx, ny, lowy, upy );
723 int nx,
double lowx,
double upx,
724 int ny,
double lowy,
double upy )
732 int nx,
double lowx,
double upx,
733 int ny,
double lowy,
double upy )
741 int nx,
double lowx,
double upx,
742 int ny,
double lowy,
double upy,
743 double upper,
double lower )
751 int nx,
double lowx,
double upx,
752 int ny,
double lowy,
double upy,
753 double upper,
double lower )
755 return bookProf(
createPath( par ), rel, title, nx, lowx, upx, ny, lowy, upy, upper, lower );
761 int nx,
double lowx,
double upx,
762 int ny,
double lowy,
double upy,
763 double upper,
double lower )
765 return bookProf( loc.first, loc.second, title, nx, lowx, upx, ny, lowy, upy, upper, lower );
771 int nx,
double lowx,
double upx,
772 int ny,
double lowy,
double upy,
773 double upper,
double lower )
775 return bookProf( par,
std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy, upper, lower );
781 int nx,
double lowx,
double upx,
782 int ny,
double lowy,
double upy,
783 double upper,
double lower )
785 return bookProf( pPar,
std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy, upper, lower );
791 int nx,
double lowx,
double upx,
792 int ny,
double lowy,
double upy,
793 double upper,
double lower )
795 return i_book( pPar, rel, title,
Gaudi::createProf2D( title, nx, lowx, upx, ny, lowy, upy, upper, lower ) );
801 int nx,
double lowx,
double upx,
802 int ny,
double lowy,
double upy )
810 int nx,
double lowx,
double upx,
811 int ny,
double lowy,
double upy )
819 int nx,
double lowx,
double upx,
820 int ny,
double lowy,
double upy )
822 return bookProf( loc.first, loc.second, title, nx, lowx, upx, ny, lowy, upy );
828 int nx,
double lowx,
double upx,
829 int ny,
double lowy,
double upy )
837 int nx,
double lowx,
double upx,
838 int ny,
double lowy,
double upy )
846 int nx,
double lowx,
double upx,
847 int ny,
double lowy,
double upy )
849 return i_book( pPar, rel, title,
Gaudi::createProf2D( title, nx, lowx, upx, ny, lowy, upy, 0, 0 ) );
881 return book( loc.first, loc.second, title, x, y );
937 return bookProf( loc.first, loc.second, title, x, y );
951 Edges x,
Edges y,
double upper,
double lower )
959 Edges x,
Edges y,
double upper,
double lower )
967 Edges x,
Edges y,
double upper,
double lower )
975 Edges x,
Edges y,
double upper,
double lower )
983 Edges x,
Edges y,
double upper,
double lower )
985 return bookProf( loc.first, loc.second, title, x, y, upper, lower );
991 Edges x,
Edges y,
double upper,
double lower )
999 int nx,
double lowx,
double upx,
1000 int ny,
double lowy,
double upy,
1001 int nz,
double lowz,
double upz )
1003 return book(
i_splitPath( full ), title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
1009 int nx,
double lowx,
double upx,
1010 int ny,
double lowy,
double upy,
1011 int nz,
double lowz,
double upz )
1013 return book(
createPath( par ), rel, title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
1019 int nx,
double lowx,
double upx,
1020 int ny,
double lowy,
double upy,
1021 int nz,
double lowz,
double upz )
1023 return book( par,
std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
1029 int nx,
double lowx,
double upx,
1030 int ny,
double lowy,
double upy,
1031 int nz,
double lowz,
double upz )
1033 return book( pPar,
std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
1039 int nx,
double lowx,
double upx,
1040 int ny,
double lowy,
double upy,
1041 int nz,
double lowz,
double upz )
1043 return book( loc.first, loc.second, title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
1049 int nx,
double lowx,
double upx,
1050 int ny,
double lowy,
double upy,
1051 int nz,
double lowz,
double upz )
1053 return i_book( pPar, rel, title,
Gaudi::createH3D( title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz ) );
1093 return book( loc.first, loc.second, title, x, y, z );
1113 int item,
Base* obj )
1157 AIDA::IHistogram1D*& obj )
1159 return Helper(
this ).retrieve( pReg, path, obj );
1164 AIDA::IProfile1D*& obj )
1166 return Helper(
this ).retrieve( pReg, path, obj );
1171 AIDA::IHistogram2D*& obj )
1173 return Helper(
this ).retrieve( pReg, path, obj );
1178 AIDA::IProfile2D*& obj )
1180 return Helper(
this ).retrieve( pReg, path, obj );
1185 AIDA::IHistogram3D*& obj )
1187 return Helper(
this ).retrieve( pReg, path, obj );
1192 AIDA::IProfile1D*& obj )
1194 return Helper(
this ).retrieve( full, obj );
1199 AIDA::IProfile2D*& obj )
1201 return Helper(
this ).retrieve( full, obj );
1206 AIDA::IHistogram1D*& obj )
1208 return Helper(
this ).retrieve( full, obj );
1213 AIDA::IHistogram2D*& obj )
1215 return Helper(
this ).retrieve( full, obj );
1220 AIDA::IHistogram3D*& obj )
1222 return Helper(
this ).retrieve( full, obj );
1228 AIDA::IProfile1D*& obj )
1230 return Helper(
this ).retrieve( parent, rel, obj );
1235 AIDA::IProfile2D*& obj )
1237 return Helper(
this ).retrieve( parent, rel, obj );
1242 AIDA::IHistogram1D*& obj )
1244 return Helper(
this ).retrieve( parent, rel, obj );
1249 AIDA::IHistogram2D*& obj )
1251 return Helper(
this ).retrieve( parent, rel, obj );
1256 AIDA::IHistogram3D*& obj )
1258 return Helper(
this ).retrieve( parent, rel, obj );
1263 AIDA::IProfile1D*& obj )
1265 return Helper(
this ).retrieve( parent, item, obj );
1270 AIDA::IProfile2D*& obj )
1272 return Helper(
this ).retrieve( parent, item, obj );
1277 AIDA::IHistogram1D*& obj )
1279 return Helper(
this ).retrieve( parent, item, obj );
1284 AIDA::IHistogram2D*& obj )
1286 return Helper(
this ).retrieve( parent, item, obj );
1291 AIDA::IHistogram3D*& obj )
1293 return Helper(
this ).retrieve( parent, item, obj );
1297 AIDA::IProfile1D*& obj )
1299 return Helper(
this ).retrieve( par, item, obj );
1304 AIDA::IProfile2D*& obj )
1306 return Helper(
this ).retrieve( par, item, obj );
1311 AIDA::IHistogram1D*& obj )
1313 return Helper(
this ).retrieve( par, item, obj );
1318 AIDA::IHistogram2D*& obj )
1320 return Helper(
this ).retrieve( par, item, obj );
1325 AIDA::IHistogram3D*& obj )
1327 return Helper(
this ).retrieve( par, item, obj );
1332 AIDA::IProfile1D*& obj )
1334 return Helper(
this ).retrieve( par, item, obj );
1339 AIDA::IProfile2D*& obj )
1341 return Helper(
this ).retrieve( par, item, obj );
1346 AIDA::IHistogram1D*& obj )
1348 return Helper(
this ).retrieve( par, item, obj );
1353 AIDA::IHistogram2D*& obj )
1355 return Helper(
this ).retrieve( par, item, obj );
1360 AIDA::IHistogram3D*& obj )
1362 return Helper(
this ).retrieve( par, item, obj );
1367 AIDA::IProfile1D*& obj )
1369 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1374 AIDA::IProfile2D*& obj )
1376 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1381 AIDA::IHistogram1D*& obj )
1383 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1388 AIDA::IHistogram2D*& obj )
1390 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1395 AIDA::IHistogram3D*& obj )
1397 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1402 AIDA::IProfile1D*& obj )
1404 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1409 AIDA::IProfile2D*& obj )
1411 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1416 AIDA::IHistogram1D*& obj )
1418 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1423 AIDA::IHistogram2D*& obj )
1425 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1430 AIDA::IHistogram3D*& obj )
1432 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1438 return Helper(
this ).find( pReg, path, obj );
1443 return Helper(
this ).find( pReg, path, obj );
1448 return Helper(
this ).find( pReg, path, obj );
1453 return Helper(
this ).find( pReg, path, obj );
1458 return Helper(
this ).find( pReg, path, obj );
1463 return Helper(
this ).find( full, obj );
1468 return Helper(
this ).find( full, obj );
1474 return Helper(
this ).find( full, obj );
1480 return Helper(
this ).find( full, obj );
1486 return Helper(
this ).find( full, obj );
1492 return Helper(
this ).find( par, rel, obj );
1498 return Helper(
this ).find( par, rel, obj );
1504 return Helper(
this ).find( par, rel, obj );
1510 return Helper(
this ).find( par, rel, obj );
1516 return Helper(
this ).find( par, rel, obj );
1522 return Helper(
this ).find( par, item, obj );
1528 return Helper(
this ).find( par, item, obj );
1534 return Helper(
this ).find( par, item, obj );
1540 return Helper(
this ).find( par, item, obj );
1546 return Helper(
this ).find( par, item, obj );
1552 return Helper(
this ).find( par, item, obj );
1558 return Helper(
this ).find( par, item, obj );
1564 return Helper(
this ).find( par, item, obj );
1570 return Helper(
this ).find( par, item, obj );
1576 return Helper(
this ).find( par, item, obj );
1582 return Helper(
this ).find( par, item, obj );
1588 return Helper(
this ).find( par, item, obj );
1594 return Helper(
this ).find( par, item, obj );
1600 return Helper(
this ).find( par, item, obj );
1606 return Helper(
this ).find( par, item, obj );
1612 return Helper(
this ).find( detail::cast( par ), item, obj );
1618 return Helper(
this ).find( detail::cast( par ), item, obj );
1624 return Helper(
this ).find( detail::cast( par ), item, obj );
1630 return Helper(
this ).find( detail::cast( par ), item, obj );
1636 return Helper(
this ).find( detail::cast( par ), item, obj );
1641 AIDA::IProfile1D*& obj )
1643 return Helper(
this ).find( detail::cast( par ), item, obj );
1648 AIDA::IProfile2D*& obj )
1650 return Helper(
this ).find( detail::cast( par ), item, obj );
1655 AIDA::IHistogram1D*& obj )
1657 return Helper(
this ).find( detail::cast( par ), item, obj );
1662 AIDA::IHistogram2D*& obj )
1664 return Helper(
this ).find( detail::cast( par ), item, obj );
1669 AIDA::IHistogram3D*& obj )
1671 return Helper(
this ).find( detail::cast( par ), item, obj );
1676 const AIDA::IHistogram2D& h )
1678 return sliceX( name, h, IAxis::UNDERFLOW_BIN, IAxis::OVERFLOW_BIN );
1683 const AIDA::IHistogram2D& h )
1685 return sliceY( name, h, IAxis::UNDERFLOW_BIN, IAxis::OVERFLOW_BIN );
1690 const AIDA::IHistogram2D& h,
int indexY )
1692 return sliceX( name, h, indexY, indexY );
1697 const AIDA::IHistogram2D& h,
int indexX )
1699 return sliceY( name, h, indexX, indexX );
1704 const AIDA::IHistogram1D& a,
1705 const AIDA::IHistogram1D& b )
1712 const AIDA::IHistogram1D& a,
1713 const AIDA::IHistogram1D& b )
1720 const AIDA::IHistogram1D& a,
1721 const AIDA::IHistogram1D& b )
1728 const AIDA::IHistogram1D& a,
1729 const AIDA::IHistogram1D& b )
1736 const AIDA::IHistogram2D& a,
1737 const AIDA::IHistogram2D& b )
1744 const AIDA::IHistogram2D& a,
1745 const AIDA::IHistogram2D& b )
1752 const AIDA::IHistogram2D& a,
1753 const AIDA::IHistogram2D& b )
1760 const AIDA::IHistogram2D& a,
1761 const AIDA::IHistogram2D& b )
1768 const AIDA::IHistogram3D& a,
1769 const AIDA::IHistogram3D& b )
1776 const AIDA::IHistogram3D& a,
1777 const AIDA::IHistogram3D& b )
1784 const AIDA::IHistogram3D& a,
1785 const AIDA::IHistogram3D& b )
1792 const AIDA::IHistogram3D& a,
1793 const AIDA::IHistogram3D& b )
1800 const AIDA::IHistogram3D& h )
1802 return i_project( nameAndTitle, h,
"xy" );
1807 const AIDA::IHistogram3D& h )
1809 return i_project( nameAndTitle, h,
"xz" );
1814 const AIDA::IHistogram3D& h )
1816 return i_project( nameAndTitle, h,
"yz" );
1822 int nx,
double lowx,
double upx )
1824 return book( name, tit, nx, lowx, upx );
1830 int nx,
double lowx,
double upx,
1833 return book( name, tit, nx, lowx, upx );
1842 return book( name, title, x );
1847 int nx,
double lowx,
double upx )
1849 return book( nameAndTitle, nameAndTitle, nx, lowx, upx );
1854 const AIDA::IHistogram1D& h )
1862 const AIDA::IHistogram1D& h )
1869 const AIDA::IHistogram1D& h )
1871 return createCopy( loc.first, loc.second, h );
1876 const AIDA::IHistogram1D& h )
1883 int nx,
double lowx,
double upx,
1884 int ny,
double lowy,
double upy )
1886 return book( name, tit, nx, lowx, upx, ny, lowy, upy );
1891 int nx,
double lowx,
double upx,
1892 int ny,
double lowy,
double upy,
1895 return book( name, tit, nx, lowx, upx, ny, lowy, upy );
1903 return book( name, title, x, y );
1908 int nx,
double lowx,
double upx,
1909 int ny,
double lowy,
double upy )
1911 return book( nameAndTitle, nameAndTitle, nx, lowx, upx, ny, lowy, upy );
1916 const AIDA::IHistogram2D& h )
1923 const AIDA::IHistogram2D& h )
1930 const AIDA::IHistogram2D& h )
1932 return createCopy( loc.first, loc.second, h );
1937 const AIDA::IHistogram2D& h )
1944 int nx,
double lowx,
double upx,
1945 int ny,
double lowy,
double upy,
1946 int nz,
double lowz,
double upz )
1948 return book( name, tit, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
1953 int nx,
double lowx,
double upx,
1954 int ny,
double lowy,
double upy,
1955 int nz,
double lowz,
double upz,
1958 return book( name, tit, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
1966 return book( name, title, x, y, z );
1971 int nx,
double lowx,
double upx,
1972 int ny,
double lowy,
double upy,
1973 int nz,
double lowz,
double upz )
1975 return book( nameAndTitle, nameAndTitle, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
1980 const AIDA::IHistogram3D& h )
1987 const AIDA::IHistogram3D& h )
1994 const AIDA::IHistogram3D& h )
1996 return createCopy( loc.first, loc.second, h );
2001 const AIDA::IHistogram3D& h )
2008 int nx,
double lowx,
double upx,
2011 return bookProf( name, tit, nx, lowx, upx, opt );
2016 int nx,
double lowx,
double upx,
2017 double upper,
double lower,
2020 return bookProf( name, tit, nx, lowx, upx, upper, lower, opt );
2035 double upper,
double lower,
2038 return bookProf( name, title, x, upper, lower );
2043 int nx,
double lowx,
double upx )
2045 return bookProf( nametit, nametit, nx, lowx, upx,
"s" );
2050 int nx,
double lowx,
double upx,
2051 double upper,
double lower )
2053 return bookProf( nametit, nametit, nx, lowx, upx, upper, lower,
"s" );
2058 const AIDA::IProfile1D& h )
2065 const AIDA::IProfile1D& h )
2072 const AIDA::IProfile1D& h )
2074 return createCopy( loc.first, loc.second, h );
2079 const AIDA::IProfile1D& h )
2086 int nx,
double lowx,
double upx,
2087 int ny,
double lowy,
double upy )
2089 return bookProf( name, tit, nx, lowx, upx, ny, lowy, upy );
2094 int nx,
double lowx,
double upx,
2095 int ny,
double lowy,
double upy,
2098 return bookProf( name, tit, nx, lowx, upx, ny, lowy, upy );
2107 return bookProf( name, title, x, y );
2112 int nx,
double lowx,
double upx,
2113 int ny,
double lowy,
double upy )
2115 return bookProf( nameAndTitle, nameAndTitle, nx, lowx, upx, ny, lowy, upy );
2121 int nx,
double lowx,
double upx,
2122 int ny,
double lowy,
double upy,
2123 double upper,
double lower )
2125 return bookProf( name, tit, nx, lowx, upx, ny, lowy, upy, upper, lower );
2130 int nx,
double lowx,
double upx,
2131 int ny,
double lowy,
double upy,
2132 double upper,
double lower,
2135 return bookProf( name, tit, nx, lowx, upx, ny, lowy, upy, upper, lower );
2142 double upper,
double lower,
2145 return bookProf( name, title, x, y, upper, lower );
2150 int nx,
double lowx,
double upx,
2151 int ny,
double lowy,
double upy,
2152 double upper,
double lower )
2154 return bookProf( nameAndTitle, nameAndTitle, nx, lowx, upx,
2155 ny, lowy, upy, upper, lower );
2160 const AIDA::IProfile2D& h )
2168 const AIDA::IProfile2D& h )
2176 const AIDA::IProfile2D& h )
2178 return createCopy( loc.first, loc.second, h );
2184 const AIDA::IProfile2D& h )
StatusCode unregisterObject(const std::string &fullPath) override
Unregister object from the data store.
Parse attribute strings allowing iteration over the various attributes.
Gaudi::Property< CLID > m_rootCLID
AIDA::IHistogram2D * createHistogram2D(const std::string &name, const std::string &tit, int nx, double lowx, double upx, int ny, double lowy, double upy)
virtual std::ostream & write(std::ostream &s) const =0
Write (binary) histogram to output stream.
Gaudi::Property< Histo1DMap > m_defs1D
std::pair< DataObject *, AIDA::IHistogram1D * > slice1DY(const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin)
Create 1D slice from 2D histogram.
Define general base for Gaudi exception.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
const long HBOOK_StorageType
std::set< std::string > m_mods1D
AIDA::IHistogram1D * add(const std::string &nameAndTitle, const AIDA::IHistogram1D &a, const AIDA::IHistogram1D &b) override
StatusCode registerObject(const std::string &parent, const std::string &rel, Base *obj) override
std::pair< DataObject *, AIDA::IHistogram1D * > createH1D(const AIDA::IHistogram1D &hist)
Copy constructor.
AIDA::IHistogram1D * book(const std::string &par, const std::string &rel, const std::string &title, int nx, double lowx, double upx) override
Book histogram and register it with the histogram data store.
DataObject * createDirectory(const std::string &parentDir, const std::string &subDir) override
Create a sub-directory in a directory.
bool isSuccess() const
Test for a status code of SUCCESS.
unsigned long release() override
release reference to object
AIDA::IHistogram2D * projectionXY(const std::string &nameAndTitle, const AIDA::IHistogram3D &h) override
Gaudi::Property< std::string > m_rootName
StatusCode retrieveObject(IRegistry *pReg, const std::string &path, AIDA::IHistogram1D *&obj) override
AIDA::IHistogram1D * sliceX(const std::string &name, const AIDA::IHistogram2D &h, int indexY) override
~HistogramSvc() override
Destructor.
StatusCode unregisterObject(Base *obj) override
Generic Transient Address.
StatusCode registerObject(const std::string &fullPath, DataObject *pObject) override
Register object with the data store.
virtual std::ostream & print(std::ostream &s) const =0
Print histogram to output stream.
StatusCode initialize() override
Initialise the service.
IRegistry * registry() const
Get pointer to Registry.
AIDA::IHistogram1D * subtract(const std::string &nameAndTitle, const AIDA::IHistogram1D &a, const AIDA::IHistogram1D &b) override
std::pair< DataObject *, AIDA::IProfile2D * > createProf2D(const AIDA::IProfile2D &hist)
Copy constructor.
StatusCode finalize() override
finalize the service
T * i_book(DataObject *pPar, const std::string &rel, const std::string &title, const std::pair< DataObject *, T * > &o)
AIDA::IProfile1D * bookProf(const std::string &par, const std::string &rel, const std::string &title, int nx, double lowx, double upx, const std::string &opt) override
Book histogram and register it with the histogram data store.
AIDA::IHistogram3D * createHistogram3D(const std::string &name, const std::string &tit, int nx, double lowx, double upx, int ny, double lowy, double upy, int nz, double lowz, double upz)
AIDA::IHistogram2D * projectionXZ(const std::string &nameAndTitle, const AIDA::IHistogram3D &h) override
std::ostream & print(Base *h, std::ostream &s=std::cout) const override
Print (ASCII) the 1D histogram into the output stream.
AIDA::IHistogram1D * sliceY(const std::string &name, const AIDA::IHistogram2D &h, int indexX) override
AIDA::IHistogram1D * projectionY(const std::string &name, const AIDA::IHistogram2D &h) override
virtual const id_type & identifier() const =0
Full identifier (or key)
StatusCode connectInput(const std::string &ident)
Connect input histogram file to the service.
bool destroy(IBaseHistogram *hist) override
This class is used for returning status codes from appropriate routines.
void clear(STATE_TYPE _i=std::ios_base::failbit)
AIDA::IHistogram1D * projectionX(const std::string &name, const AIDA::IHistogram2D &h) override
Simple helper class for description of 1D-histogram The class is targeted to act as the primary "hist...
StatusCode findObject(const std::string &fullPath, DataObject *&pObject) override
Find object identified by its full path in the data store.
AIDA::IHistogram1D * multiply(const std::string &nameAndTitle, const AIDA::IHistogram1D &a, const AIDA::IHistogram1D &b) override
AIDA::IBaseHistogram Base
std::pair< DataObject *, AIDA::IHistogram2D * > createH2D(const AIDA::IHistogram2D &hist)
Copy constructor.
std::pair< DataObject *, AIDA::IHistogram1D * > slice1DX(const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin)
Create 1D slice from 2D histogram.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
const long ROOT_StorageType
StatusCode finalize() override
Service initialization.
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
std::ostream & write(Base *h, std::ostream &s=std::cout) const override
Write (ASCII) the 1D histogram table into the output stream.
StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject) override
Retrieve object from data store.
AIDA::IProfile1D * createProfile1D(const std::string &name, const std::string &tit, int nx, double lowx, double upx, const std::string &opt) override
DataObject * createPath(const std::string &newPath) override
Create all directories in a given full path.
void update1Ddefs(Gaudi::Details::PropertyBase &)
handler to be invoked for updating property m_defs1D
AIDA::IHistogram1D * divide(const std::string &nameAndTitle, const AIDA::IHistogram1D &a, const AIDA::IHistogram1D &b) override
StatusCode findObject(IRegistry *pReg, const std::string &path, AIDA::IProfile1D *&obj) override
std::pair< std::string, std::string > i_splitPath(const std::string &full)
Split full path into its components.
Common base class for all histograms Use is solely functional to minimize dynamic_casts inside Histog...
HistogramSvc(const std::string &name, ISvcLocator *svc)
Statndard Constructor.
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
std::pair< DataObject *, AIDA::IHistogram3D * > createH3D(const AIDA::IHistogram3D &hist)
Copy constructor.
StatusCode initialize() override
Service initialization.
AIDA::IProfile2D * createProfile2D(const std::string &name, const std::string &tit, int nx, double lowx, double upx, int ny, double lowy, double upy)
AIDA::IHistogram1D * createHistogram1D(const std::string &name, const std::string &tit, int nx, double lowx, double upx)
static R * act(R *res, const S &b, void(T1::*pmf)(const T2 *, Double_t), Double_t scale)
static int toRootIndex(int index, int nbins)
std::pair< DataObject *, AIDA::IProfile1D * > createProf1D(const AIDA::IProfile1D &hist)
Copy constructor.
AIDA::IHistogram2D * projectionYZ(const std::string &nameAndTitle, const AIDA::IHistogram3D &h) override
AIDA::IHistogram1D * createCopy(const std::string &full, const AIDA::IHistogram1D &h) override
StatusCode reinitialize() override
Initialise the service.
AIDA::IHistogram2D * i_project(const std::string &nameAndTitle, const AIDA::IHistogram3D &h, const std::string &dir)
Helper for 2D projections.
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
A DataObject is the base class of any identifiable object on any data store.
void toupper(std::string &s)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.