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;
310 IHistogram1D*
HistogramSvc::sliceX(
const string& name,
const IHistogram2D& h,
int idxY1,
int idxY2 )
318 throw GaudiException(
"Cannot cast 2D histogram to H2D to create sliceX `" + name +
"'!",
"HistogramSvc",
321 if ( o.first && registerObject( name, (IBaseHistogram*)o.second ).isSuccess() ) {
329 IHistogram1D*
HistogramSvc::sliceY(
const string& name,
const IHistogram2D& h,
int indexX1,
int indexX2 )
340 if ( o.first && registerObject( name, (IBaseHistogram*)o.second ).isSuccess() ) {
350 StatusCode sc = unregisterObject( dynamic_cast<IHistogram*>( hist ) );
360 if ( m_defs1D.empty() ) {
361 return i_book( pPar, rel, title,
Gaudi::createH1D( title, nx, lowx, upx ) );
363 string hn = histoAddr( pPar, rel );
364 auto ifound = m_defs1D.find( hn );
365 if ( m_defs1D.end() == ifound ) {
366 return i_book( pPar, rel, title,
Gaudi::createH1D( title, nx, lowx, upx ) );
369 debug() <<
" Redefine the parameters for the histogram '" + hn +
"' to be " << ifound->second <<
endmsg;
371 m_mods1D.insert( hn );
372 return i_book( pPar, rel, ifound->second.title(),
373 Gaudi::createH1D( ifound->second.title(), ifound->second.bins(), ifound->second.lowEdge(),
374 ifound->second.lowEdge() ) );
392 removeLeading(
m_defs1D.value(),
"/stat/" );
406 debug() <<
" " << im->second;
415 AIDA::IHistogram1D*
HistogramSvc::book(
const string&
par,
const string& rel,
const string& title,
int nx,
double lowx,
422 AIDA::IHistogram1D*
HistogramSvc::book(
const string& par,
int hID,
const string& title,
int nx,
double lowx,
439 return book( loc.first, loc.second, title, nx, lowx, upx );
443 AIDA::IHistogram1D*
HistogramSvc::book(
const string& full,
const string& title,
int nx,
double lowx,
double upx )
449 AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& par,
const string& rel,
const string& title,
int nx,
450 double lowx,
double upx,
const string& opt )
456 AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& par,
int hID,
const string& title,
int nx,
double lowx,
457 double upx,
const string& opt )
464 double upx,
const string& opt )
471 double lowx,
double upx,
const string& opt )
473 return bookProf( loc.first, loc.second, title, nx, lowx, upx, opt );
477 AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& full,
const string& title,
int nx,
double lowx,
double upx,
485 double upx,
const string& opt )
491 AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& par,
const string& rel,
const string& title,
int nx,
492 double lowx,
double upx,
double upper,
double lower,
const string& opt )
498 AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& par,
int hID,
const string& title,
int nx,
double lowx,
499 double upx,
double upper,
double lower,
const string& opt )
506 double upx,
double upper,
double lower,
const string& opt )
513 double lowx,
double upx,
double upper,
double lower,
const string& opt )
515 return bookProf( loc.first, loc.second, title, nx, lowx, upx, upper, lower, opt );
519 AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& full,
const string& title,
int nx,
double lowx,
double upx,
520 double upper,
double lower,
const string& opt )
527 double upx,
double upper,
double lower,
const string& opt )
555 return book( loc.first, loc.second, title, e );
599 return bookProf( loc.first, loc.second, title, e );
617 Edges e,
double upper,
double lower )
624 double upper,
double lower )
638 Edges e,
double upper,
double lower )
640 return bookProf( loc.first, loc.second, title, e, upper, lower );
645 double upper,
double lower )
652 double upx,
int ny,
double lowy,
double upy )
654 return book(
i_splitPath( full ), title, nx, lowx, upx, ny, lowy, upy );
659 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy )
661 return book(
createPath( par ), rel, title, nx, lowx, upx, ny, lowy, upy );
666 double upx,
int ny,
double lowy,
double upy )
673 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy )
675 return book( loc.first, loc.second, title, nx, lowx, upx, ny, lowy, upy );
680 double upx,
int ny,
double lowy,
double upy )
687 double lowx,
double upx,
int ny,
double lowy,
double upy )
694 double upx,
int ny,
double lowy,
double upy,
double upper,
double lower )
701 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy,
702 double upper,
double lower )
704 return bookProf(
createPath( par ), rel, title, nx, lowx, upx, ny, lowy, upy, upper, lower );
709 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy,
710 double upper,
double lower )
712 return bookProf( loc.first, loc.second, title, nx, lowx, upx, ny, lowy, upy, upper, lower );
717 double lowx,
double upx,
int ny,
double lowy,
double upy,
double upper,
720 return bookProf( par,
std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy, upper, lower );
725 double upx,
int ny,
double lowy,
double upy,
double upper,
double lower )
727 return bookProf( pPar,
std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy, upper, lower );
732 double lowx,
double upx,
int ny,
double lowy,
double upy,
double upper,
735 return i_book( pPar, rel, title,
Gaudi::createProf2D( title, nx, lowx, upx, ny, lowy, upy, upper, lower ) );
740 double upx,
int ny,
double lowy,
double upy )
747 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy )
754 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy )
756 return bookProf( loc.first, loc.second, title, nx, lowx, upx, ny, lowy, upy );
761 double lowx,
double upx,
int ny,
double lowy,
double upy )
768 double upx,
int ny,
double lowy,
double upy )
775 double lowx,
double upx,
int ny,
double lowy,
double upy )
777 return i_book( pPar, rel, title,
Gaudi::createProf2D( title, nx, lowx, upx, ny, lowy, upy, 0, 0 ) );
803 return book( loc.first, loc.second, title, x, y );
848 return bookProf( loc.first, loc.second, title, x, y );
860 double upper,
double lower )
867 Edges x,
Edges y,
double upper,
double lower )
874 double upper,
double lower )
881 double upper,
double lower )
888 Edges x,
Edges y,
double upper,
double lower )
890 return bookProf( loc.first, loc.second, title, x, y, upper, lower );
895 Edges y,
double upper,
double lower )
902 double upx,
int ny,
double lowy,
double upy,
int nz,
double lowz,
double upz )
904 return book(
i_splitPath( full ), title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
909 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy,
int nz,
910 double lowz,
double upz )
912 return book(
createPath( par ), rel, title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
917 double upx,
int ny,
double lowy,
double upy,
int nz,
double lowz,
double upz )
919 return book( par,
std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
924 double upx,
int ny,
double lowy,
double upy,
int nz,
double lowz,
double upz )
926 return book( pPar,
std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
931 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy,
int nz,
932 double lowz,
double upz )
934 return book( loc.first, loc.second, title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
939 double lowx,
double upx,
int ny,
double lowy,
double upy,
int nz,
double lowz,
942 return i_book( pPar, rel, title,
Gaudi::createH3D( title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz ) );
975 return book( loc.first, loc.second, title, x, y, z );
1033 return Helper(
this ).retrieve( pReg, path, obj );
1039 return Helper(
this ).retrieve( pReg, path, obj );
1045 return Helper(
this ).retrieve( pReg, path, obj );
1051 return Helper(
this ).retrieve( pReg, path, obj );
1057 return Helper(
this ).retrieve( pReg, path, obj );
1063 return Helper(
this ).retrieve( full, obj );
1069 return Helper(
this ).retrieve( full, obj );
1075 return Helper(
this ).retrieve( full, obj );
1081 return Helper(
this ).retrieve( full, obj );
1087 return Helper(
this ).retrieve( full, obj );
1093 AIDA::IProfile1D*& obj )
1095 return Helper(
this ).retrieve( parent, rel, obj );
1101 return Helper(
this ).retrieve( parent, rel, obj );
1107 return Helper(
this ).retrieve( parent, rel, obj );
1113 return Helper(
this ).retrieve( parent, rel, obj );
1119 return Helper(
this ).retrieve( parent, rel, obj );
1125 return Helper(
this ).retrieve( parent, item, obj );
1131 return Helper(
this ).retrieve( parent, item, obj );
1137 return Helper(
this ).retrieve( parent, item, obj );
1143 return Helper(
this ).retrieve( parent, item, obj );
1149 return Helper(
this ).retrieve( parent, item, obj );
1154 return Helper(
this ).retrieve( par, item, obj );
1160 return Helper(
this ).retrieve( par, item, obj );
1166 return Helper(
this ).retrieve( par, item, obj );
1172 return Helper(
this ).retrieve( par, item, obj );
1178 return Helper(
this ).retrieve( par, item, obj );
1184 return Helper(
this ).retrieve( par, item, obj );
1190 return Helper(
this ).retrieve( par, item, obj );
1196 return Helper(
this ).retrieve( par, item, obj );
1202 return Helper(
this ).retrieve( par, item, obj );
1208 return Helper(
this ).retrieve( par, item, obj );
1214 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1220 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1226 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1232 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1238 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1244 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1250 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1256 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1262 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1268 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1274 return Helper(
this ).find( pReg, path, obj );
1279 return Helper(
this ).find( pReg, path, obj );
1284 return Helper(
this ).find( pReg, path, obj );
1289 return Helper(
this ).find( pReg, path, obj );
1294 return Helper(
this ).find( pReg, path, obj );
1299 return Helper(
this ).find( full, obj );
1304 return Helper(
this ).find( full, obj );
1310 return Helper(
this ).find( full, obj );
1316 return Helper(
this ).find( full, obj );
1322 return Helper(
this ).find( full, obj );
1328 return Helper(
this ).find( par, rel, obj );
1334 return Helper(
this ).find( par, rel, obj );
1340 return Helper(
this ).find( par, rel, obj );
1346 return Helper(
this ).find( par, rel, obj );
1352 return Helper(
this ).find( par, rel, obj );
1358 return Helper(
this ).find( par, item, obj );
1364 return Helper(
this ).find( par, item, obj );
1370 return Helper(
this ).find( par, item, obj );
1376 return Helper(
this ).find( par, item, obj );
1382 return Helper(
this ).find( par, item, obj );
1388 return Helper(
this ).find( par, item, obj );
1394 return Helper(
this ).find( par, item, obj );
1400 return Helper(
this ).find( par, item, obj );
1406 return Helper(
this ).find( par, item, obj );
1412 return Helper(
this ).find( par, item, obj );
1418 return Helper(
this ).find( par, item, obj );
1424 return Helper(
this ).find( par, item, obj );
1430 return Helper(
this ).find( par, item, obj );
1436 return Helper(
this ).find( par, item, obj );
1442 return Helper(
this ).find( par, item, obj );
1448 return Helper(
this ).find( detail::cast( par ), item, obj );
1454 return Helper(
this ).find( detail::cast( par ), item, obj );
1460 return Helper(
this ).find( detail::cast( par ), item, obj );
1466 return Helper(
this ).find( detail::cast( par ), item, obj );
1472 return Helper(
this ).find( detail::cast( par ), item, obj );
1478 return Helper(
this ).find( detail::cast( par ), item, obj );
1484 return Helper(
this ).find( detail::cast( par ), item, obj );
1490 return Helper(
this ).find( detail::cast( par ), item, obj );
1496 return Helper(
this ).find( detail::cast( par ), item, obj );
1502 return Helper(
this ).find( detail::cast( par ), item, obj );
1508 return sliceX( name, h, IAxis::UNDERFLOW_BIN, IAxis::OVERFLOW_BIN );
1514 return sliceY( name, h, IAxis::UNDERFLOW_BIN, IAxis::OVERFLOW_BIN );
1520 return sliceX( name, h, indexY, indexY );
1526 return sliceY( name, h, indexX, indexX );
1531 const AIDA::IHistogram1D& b )
1538 const AIDA::IHistogram1D& b )
1545 const AIDA::IHistogram1D& b )
1552 const AIDA::IHistogram1D& b )
1559 const AIDA::IHistogram2D& b )
1566 const AIDA::IHistogram2D& b )
1573 const AIDA::IHistogram2D& b )
1580 const AIDA::IHistogram2D& b )
1587 const AIDA::IHistogram3D& b )
1594 const AIDA::IHistogram3D& b )
1601 const AIDA::IHistogram3D& b )
1608 const AIDA::IHistogram3D& b )
1616 return i_project( nameAndTitle, h,
"xy" );
1622 return i_project( nameAndTitle, h,
"xz" );
1628 return i_project( nameAndTitle, h,
"yz" );
1633 double lowx,
double upx )
1635 return book( name, tit, nx, lowx, upx );
1642 return book( name, tit, nx, lowx, upx );
1649 return book( name, title, x );
1655 return book( nameAndTitle, nameAndTitle, nx, lowx, upx );
1666 const AIDA::IHistogram1D& h )
1673 const AIDA::IHistogram1D& h )
1675 return createCopy( loc.first, loc.second, h );
1686 double lowx,
double upx,
int ny,
double lowy,
double upy )
1688 return book( name, tit, nx, lowx, upx, ny, lowy, upy );
1693 double lowx,
double upx,
int ny,
double lowy,
double upy,
1696 return book( name, tit, nx, lowx, upx, ny, lowy, upy );
1703 return book( name, title, x, y );
1708 int ny,
double lowy,
double upy )
1710 return book( nameAndTitle, nameAndTitle, nx, lowx, upx, ny, lowy, upy );
1721 const AIDA::IHistogram2D& h )
1728 const AIDA::IHistogram2D& h )
1730 return createCopy( loc.first, loc.second, h );
1741 double lowx,
double upx,
int ny,
double lowy,
double upy,
int nz,
1742 double lowz,
double upz )
1744 return book( name, tit, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
1749 double lowx,
double upx,
int ny,
double lowy,
double upy,
int nz,
1752 return book( name, tit, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
1759 return book( name, title, x, y, z );
1764 int ny,
double lowy,
double upy,
int nz,
double lowz,
double upz )
1766 return book( nameAndTitle, nameAndTitle, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
1777 const AIDA::IHistogram3D& h )
1784 const AIDA::IHistogram3D& h )
1786 return createCopy( loc.first, loc.second, h );
1799 return bookProf( name, tit, nx, lowx, upx, opt );
1804 double upx,
double upper,
double lower,
const std::string& opt )
1806 return bookProf( name, tit, nx, lowx, upx, upper, lower, opt );
1820 return bookProf( name, title, x, upper, lower );
1826 return bookProf( nametit, nametit, nx, lowx, upx,
"s" );
1831 double upper,
double lower )
1833 return bookProf( nametit, nametit, nx, lowx, upx, upper, lower,
"s" );
1851 return createCopy( loc.first, loc.second, h );
1862 double upx,
int ny,
double lowy,
double upy )
1864 return bookProf( name, tit, nx, lowx, upx, ny, lowy, upy );
1869 double upx,
int ny,
double lowy,
double upy,
1872 return bookProf( name, tit, nx, lowx, upx, ny, lowy, upy );
1879 return bookProf( name, title, x, y );
1884 int ny,
double lowy,
double upy )
1886 return bookProf( nameAndTitle, nameAndTitle, nx, lowx, upx, ny, lowy, upy );
1891 double upx,
int ny,
double lowy,
double upy,
double upper,
1894 return bookProf( name, tit, nx, lowx, upx, ny, lowy, upy, upper, lower );
1899 double upx,
int ny,
double lowy,
double upy,
double upper,
1902 return bookProf( name, tit, nx, lowx, upx, ny, lowy, upy, upper, lower );
1907 const Edges& y,
double upper,
double lower,
1910 return bookProf( name, title, x, y, upper, lower );
1915 int ny,
double lowy,
double upy,
double upper,
double lower )
1917 return bookProf( nameAndTitle, nameAndTitle, nx, lowx, upx, ny, lowy, upy, upper, lower );
1935 return createCopy( loc.first, loc.second, 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
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::IHistogram2D * > createH2D(const AIDA::IHistogram2D &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
std::pair< DataObject *, AIDA::IHistogram1D * > slice1DY(const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin)
Create 1D slice from 2D histogram.
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
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.
std::pair< DataObject *, AIDA::IHistogram3D * > createH3D(const AIDA::IHistogram3D &hist)
Copy constructor.
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
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.
std::pair< DataObject *, AIDA::IHistogram1D * > slice1DX(const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin)
Create 1D slice from 2D histogram.
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...
std::pair< DataObject *, AIDA::IProfile2D * > createProf2D(const AIDA::IProfile2D &hist)
Copy constructor.
HistogramSvc(const std::string &name, ISvcLocator *svc)
Statndard Constructor.
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
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)
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)
std::pair< DataObject *, AIDA::IHistogram1D * > createH1D(const AIDA::IHistogram1D &hist)
Copy constructor.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
std::pair< DataObject *, AIDA::IProfile1D * > createProf1D(const AIDA::IProfile1D &hist)
Copy constructor.