4 #pragma warning( disable : 2259 ) 10 #pragma warning( disable : 4996 ) 34 string histoAddr(
const string&
name )
36 if ( 0 == name.find(
"/stat/" ) ) {
37 return string( name, 6 );
42 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 auto it =
std::find_if( m.
begin(), m.
end(), [&lead](
const auto& i ) {
return 0 == i.first.find( lead ); } );
65 if ( it == m.
end() )
return 0;
66 string addr = string( it->first, lead.size() );
70 return 1 + removeLeading( m, lead );
78 return registerObject( split.first, split.second, obj );
87 if ( !hObj->annotation().addItem(
"id", obj.substr( 1 ) ) ) hObj->annotation().setValue(
"id", obj.substr( 1 ) );
90 if ( !hObj->annotation().addItem(
"id", obj ) ) hObj->annotation().setValue(
"id", obj );
99 TH3D* h3d = Gaudi::getRepresentation<IHistogram3D, TH3D>( h );
101 TH2D* h2d =
dynamic_cast<TH2D*
>( h3d->Project3D( dir.c_str() ) );
104 if ( r.second && registerObject( nameAndTitle, r.second ).isSuccess() ) {
118 if ( b )
return b->
print( s );
119 error() <<
"Unknown histogram type: Cannot cast to Gaudi::HistogramBase." <<
endmsg;
127 if ( b )
return b->
write( s );
128 error() <<
"Unknown histogram type: Cannot cast to Gaudi::HistogramBase." <<
endmsg;
136 if ( b )
return b->
write( file_name );
137 error() <<
"Unknown histogram type: Cannot cast to Gaudi::HistogramBase." <<
endmsg;
147 tmp.insert( tmp.begin(), m_rootName.begin(), m_rootName.end() );
150 if ( tmp.rfind(
SEPARATOR ) == tmp.length() - 1 ) {
151 tmp.erase( tmp.length() - 1, 1 );
154 return {tmp.substr( 0, sep ), tmp.substr( sep )};
160 string tmpPath = newPath;
162 tmpPath.insert( tmpPath.begin(),
SEPARATOR );
163 tmpPath.insert( tmpPath.begin(), m_rootName.begin(), m_rootName.end() );
166 if ( tmpPath.rfind(
SEPARATOR ) == tmpPath.length() - 1 ) {
167 tmpPath.erase( tmpPath.rfind(
SEPARATOR ), 1 );
170 StatusCode sc = findObject( tmpPath, pObject );
175 string rest( tmpPath, sep + 1, tmpPath.length() - sep );
176 string subPath( tmpPath, 0, sep );
178 createPath( subPath );
180 error() <<
"Unable to create the histogram path" <<
endmsg;
183 pObject = createDirectory( subPath, rest );
190 auto directory = std::make_unique<DataObject>();
193 StatusCode status = retrieveObject( parentDir, pnode );
195 error() <<
"Unable to create the histogram directory: " << parentDir <<
"/" << subDir <<
endmsg;
200 error() <<
"Unable to create the histogram directory: " << parentDir <<
"/" << subDir <<
endmsg;
204 return directory.release();
210 setDataLoader(
nullptr ).ignore();
211 clearStore().ignore();
219 StatusCode status = this->findObject( m_rootName.value(), pO );
221 string::size_type loc = ident.find(
" " );
222 string filename, auth, svc =
"", typ =
"";
223 string logname = ident.substr( 0, loc );
224 for (
auto attrib : Parser( ident.substr( loc + 1 ) ) ) {
225 switch (::
toupper( attrib.tag[0] ) ) {
237 if ( typ.length() > 0 ) {
239 string entryname = m_rootName;
241 entryname += logname;
243 switch (::
toupper( typ[0] ) ) {
252 status = registerAddress( pO, logname, pA );
254 info() <<
"Added stream file:" << filename <<
" as " << logname <<
endmsg;
261 error() <<
"Cannot add " << ident <<
" invalid filename!" <<
endmsg;
271 auto rootObj = std::make_unique<DataObject>();
272 status = setRoot(
"/stat", rootObj.get() );
273 if ( status.isFailure() ) {
274 error() <<
"Unable to set hstogram data store root." <<
endmsg;
278 auto svc = service<IConversionSvc>(
"HistogramPersistencySvc", true );
280 error() <<
"Could not find HistogramPersistencySvc." <<
endmsg;
283 setDataLoader( svc.get() ).ignore();
285 for (
auto& j : m_input ) {
286 status = connectInput( j );
287 if ( !status.isSuccess() )
return status;
290 if ( !m_defs1D.empty() ) {
291 info() <<
" Predefined 1D-Histograms: " <<
endmsg;
292 for (
const auto& ih : m_defs1D ) {
293 info() <<
" Path='" << ih.first <<
"'" 294 <<
" Description " << ih.second <<
endmsg;
304 IHistogram1D*
HistogramSvc::sliceX(
const string& name,
const IHistogram2D& h,
int idxY1,
int idxY2 )
312 throw GaudiException(
"Cannot cast 2D histogram to H2D to create sliceX `" + name +
"'!",
"HistogramSvc",
315 if ( o.first && registerObject( name, o.second ).isSuccess() ) {
323 IHistogram1D*
HistogramSvc::sliceY(
const string& name,
const IHistogram2D& h,
int indexX1,
int indexX2 )
334 if ( o.first && registerObject( name, (IBaseHistogram*)o.second ).isSuccess() ) {
344 StatusCode sc = unregisterObject( dynamic_cast<IHistogram*>( hist ) );
354 if ( m_defs1D.empty() ) {
355 return i_book( pPar, rel, title,
Gaudi::createH1D( title, nx, lowx, upx ) );
357 string hn = histoAddr( pPar, rel );
358 auto ifound = m_defs1D.find( hn );
359 if ( m_defs1D.end() == ifound ) {
360 return i_book( pPar, rel, title,
Gaudi::createH1D( title, nx, lowx, upx ) );
363 debug() <<
" Redefine the parameters for the histogram '" + hn +
"' to be " << ifound->second <<
endmsg;
365 m_mods1D.insert( hn );
366 return i_book( pPar, rel, ifound->second.title(),
367 Gaudi::createH1D( ifound->second.title(), ifound->second.bins(), ifound->second.lowEdge(),
368 ifound->second.lowEdge() ) );
384 removeLeading(
m_defs1D.value(),
"/stat/" );
398 debug() <<
" " << im->second;
407 AIDA::IHistogram1D*
HistogramSvc::book(
const string&
par,
const string& rel,
const string& title,
int nx,
double lowx,
414 AIDA::IHistogram1D*
HistogramSvc::book(
const string& par,
int hID,
const string& title,
int nx,
double lowx,
431 return book( loc.first, loc.second, title, nx, lowx, upx );
435 AIDA::IHistogram1D*
HistogramSvc::book(
const string& full,
const string& title,
int nx,
double lowx,
double upx )
441 AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& par,
const string& rel,
const string& title,
int nx,
442 double lowx,
double upx,
const string& opt )
448 AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& par,
int hID,
const string& title,
int nx,
double lowx,
449 double upx,
const string& opt )
456 double upx,
const string& opt )
463 double lowx,
double upx,
const string& opt )
465 return bookProf( loc.first, loc.second, title, nx, lowx, upx, opt );
469 AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& full,
const string& title,
int nx,
double lowx,
double upx,
477 double upx,
const string& opt )
483 AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& par,
const string& rel,
const string& title,
int nx,
484 double lowx,
double upx,
double upper,
double lower,
const string& opt )
490 AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& par,
int hID,
const string& title,
int nx,
double lowx,
491 double upx,
double upper,
double lower,
const string& opt )
498 double upx,
double upper,
double lower,
const string& opt )
505 double lowx,
double upx,
double upper,
double lower,
const string& opt )
507 return bookProf( loc.first, loc.second, title, nx, lowx, upx, upper, lower, opt );
511 AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& full,
const string& title,
int nx,
double lowx,
double upx,
512 double upper,
double lower,
const string& opt )
519 double upx,
double upper,
double lower,
const string& opt )
547 return book( loc.first, loc.second, title, e );
591 return bookProf( loc.first, loc.second, title, e );
609 Edges e,
double upper,
double lower )
616 double upper,
double lower )
630 Edges e,
double upper,
double lower )
632 return bookProf( loc.first, loc.second, title, e, upper, lower );
637 double upper,
double lower )
644 double upx,
int ny,
double lowy,
double upy )
646 return book(
i_splitPath( full ), title, nx, lowx, upx, ny, lowy, upy );
651 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy )
653 return book(
createPath( par ), rel, title, nx, lowx, upx, ny, lowy, upy );
658 double upx,
int ny,
double lowy,
double upy )
665 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy )
667 return book( loc.first, loc.second, title, nx, lowx, upx, ny, lowy, upy );
672 double upx,
int ny,
double lowy,
double upy )
679 double lowx,
double upx,
int ny,
double lowy,
double upy )
686 double upx,
int ny,
double lowy,
double upy,
double upper,
double lower )
693 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy,
694 double upper,
double lower )
696 return bookProf(
createPath( par ), rel, title, nx, lowx, upx, ny, lowy, upy, upper, lower );
701 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy,
702 double upper,
double lower )
704 return bookProf( loc.first, loc.second, title, nx, lowx, upx, ny, lowy, upy, upper, lower );
709 double lowx,
double upx,
int ny,
double lowy,
double upy,
double upper,
712 return bookProf( par,
std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy, upper, lower );
717 double upx,
int ny,
double lowy,
double upy,
double upper,
double lower )
719 return bookProf( pPar,
std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy, upper, lower );
724 double lowx,
double upx,
int ny,
double lowy,
double upy,
double upper,
727 return i_book( pPar, rel, title,
Gaudi::createProf2D( title, nx, lowx, upx, ny, lowy, upy, upper, lower ) );
732 double upx,
int ny,
double lowy,
double upy )
739 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy )
746 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy )
748 return bookProf( loc.first, loc.second, title, nx, lowx, upx, ny, lowy, upy );
753 double lowx,
double upx,
int ny,
double lowy,
double upy )
760 double upx,
int ny,
double lowy,
double upy )
767 double lowx,
double upx,
int ny,
double lowy,
double upy )
769 return i_book( pPar, rel, title,
Gaudi::createProf2D( title, nx, lowx, upx, ny, lowy, upy, 0, 0 ) );
795 return book( loc.first, loc.second, title, x, y );
840 return bookProf( loc.first, loc.second, title, x, y );
852 double upper,
double lower )
859 Edges x,
Edges y,
double upper,
double lower )
866 double upper,
double lower )
873 double upper,
double lower )
880 Edges x,
Edges y,
double upper,
double lower )
882 return bookProf( loc.first, loc.second, title, x, y, upper, lower );
887 Edges y,
double upper,
double lower )
894 double upx,
int ny,
double lowy,
double upy,
int nz,
double lowz,
double upz )
896 return book(
i_splitPath( full ), title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
901 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy,
int nz,
902 double lowz,
double upz )
904 return book(
createPath( par ), rel, title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
909 double upx,
int ny,
double lowy,
double upy,
int nz,
double lowz,
double upz )
911 return book( par,
std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
916 double upx,
int ny,
double lowy,
double upy,
int nz,
double lowz,
double upz )
918 return book( pPar,
std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
923 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy,
int nz,
924 double lowz,
double upz )
926 return book( loc.first, loc.second, title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
931 double lowx,
double upx,
int ny,
double lowy,
double upy,
int nz,
double lowz,
934 return i_book( pPar, rel, title,
Gaudi::createH3D( title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz ) );
967 return book( loc.first, loc.second, title, x, y, z );
1007 return Helper(
this ).retrieve( pReg, path, obj );
1013 return Helper(
this ).retrieve( pReg, path, obj );
1019 return Helper(
this ).retrieve( pReg, path, obj );
1025 return Helper(
this ).retrieve( pReg, path, obj );
1031 return Helper(
this ).retrieve( pReg, path, obj );
1037 return Helper(
this ).retrieve( full, obj );
1043 return Helper(
this ).retrieve( full, obj );
1049 return Helper(
this ).retrieve( full, obj );
1055 return Helper(
this ).retrieve( full, obj );
1061 return Helper(
this ).retrieve( full, obj );
1067 AIDA::IProfile1D*& obj )
1069 return Helper(
this ).retrieve( parent, rel, obj );
1075 return Helper(
this ).retrieve( parent, rel, obj );
1081 return Helper(
this ).retrieve( parent, rel, obj );
1087 return Helper(
this ).retrieve( parent, rel, obj );
1093 return Helper(
this ).retrieve( parent, rel, obj );
1099 return Helper(
this ).retrieve( parent, item, obj );
1105 return Helper(
this ).retrieve( parent, item, obj );
1111 return Helper(
this ).retrieve( parent, item, obj );
1117 return Helper(
this ).retrieve( parent, item, obj );
1123 return Helper(
this ).retrieve( parent, item, obj );
1128 return Helper(
this ).retrieve( par, item, obj );
1134 return Helper(
this ).retrieve( par, item, obj );
1140 return Helper(
this ).retrieve( par, item, obj );
1146 return Helper(
this ).retrieve( par, item, obj );
1152 return Helper(
this ).retrieve( par, item, obj );
1158 return Helper(
this ).retrieve( par, item, obj );
1164 return Helper(
this ).retrieve( par, item, obj );
1170 return Helper(
this ).retrieve( par, item, obj );
1176 return Helper(
this ).retrieve( par, item, obj );
1182 return Helper(
this ).retrieve( par, item, obj );
1188 return Helper(
this ).retrieve(::detail::cast( par ), item, obj );
1194 return Helper(
this ).retrieve(::detail::cast( par ), item, obj );
1200 return Helper(
this ).retrieve(::detail::cast( par ), item, obj );
1206 return Helper(
this ).retrieve(::detail::cast( par ), item, obj );
1212 return Helper(
this ).retrieve(::detail::cast( par ), item, obj );
1218 return Helper(
this ).retrieve(::detail::cast( par ), item, obj );
1224 return Helper(
this ).retrieve(::detail::cast( par ), item, obj );
1230 return Helper(
this ).retrieve(::detail::cast( par ), item, obj );
1236 return Helper(
this ).retrieve(::detail::cast( par ), item, obj );
1242 return Helper(
this ).retrieve(::detail::cast( par ), item, obj );
1248 return Helper(
this ).find( pReg, path, obj );
1253 return Helper(
this ).find( pReg, path, obj );
1258 return Helper(
this ).find( pReg, path, obj );
1263 return Helper(
this ).find( pReg, path, obj );
1268 return Helper(
this ).find( pReg, path, obj );
1273 return Helper(
this ).find( full, obj );
1278 return Helper(
this ).find( full, obj );
1284 return Helper(
this ).find( full, obj );
1290 return Helper(
this ).find( full, obj );
1296 return Helper(
this ).find( full, obj );
1302 return Helper(
this ).find( par, rel, obj );
1308 return Helper(
this ).find( par, rel, obj );
1314 return Helper(
this ).find( par, rel, obj );
1320 return Helper(
this ).find( par, rel, obj );
1326 return Helper(
this ).find( par, rel, obj );
1332 return Helper(
this ).find( par, item, obj );
1338 return Helper(
this ).find( par, item, obj );
1344 return Helper(
this ).find( par, item, obj );
1350 return Helper(
this ).find( par, item, obj );
1356 return Helper(
this ).find( par, item, obj );
1362 return Helper(
this ).find( par, item, obj );
1368 return Helper(
this ).find( par, item, obj );
1374 return Helper(
this ).find( par, item, obj );
1380 return Helper(
this ).find( par, item, obj );
1386 return Helper(
this ).find( par, item, obj );
1392 return Helper(
this ).find( par, item, obj );
1398 return Helper(
this ).find( par, item, obj );
1404 return Helper(
this ).find( par, item, obj );
1410 return Helper(
this ).find( par, item, obj );
1416 return Helper(
this ).find( par, item, obj );
1422 return Helper(
this ).find(::detail::cast( par ), item, obj );
1428 return Helper(
this ).find(::detail::cast( par ), item, obj );
1434 return Helper(
this ).find(::detail::cast( par ), item, obj );
1440 return Helper(
this ).find(::detail::cast( par ), item, obj );
1446 return Helper(
this ).find(::detail::cast( par ), item, obj );
1452 return Helper(
this ).find(::detail::cast( par ), item, obj );
1458 return Helper(
this ).find(::detail::cast( par ), item, obj );
1464 return Helper(
this ).find(::detail::cast( par ), item, obj );
1470 return Helper(
this ).find(::detail::cast( par ), item, obj );
1476 return Helper(
this ).find(::detail::cast( par ), item, obj );
1482 return sliceX( name, h, IAxis::UNDERFLOW_BIN, IAxis::OVERFLOW_BIN );
1488 return sliceY( name, h, IAxis::UNDERFLOW_BIN, IAxis::OVERFLOW_BIN );
1494 return sliceX( name, h, indexY, indexY );
1500 return sliceY( name, h, indexX, indexX );
1505 const AIDA::IHistogram1D& b )
1512 const AIDA::IHistogram1D& b )
1519 const AIDA::IHistogram1D& b )
1526 const AIDA::IHistogram1D& b )
1533 const AIDA::IHistogram2D& b )
1540 const AIDA::IHistogram2D& b )
1547 const AIDA::IHistogram2D& b )
1554 const AIDA::IHistogram2D& b )
1561 const AIDA::IHistogram3D& b )
1568 const AIDA::IHistogram3D& b )
1575 const AIDA::IHistogram3D& b )
1582 const AIDA::IHistogram3D& b )
1590 return i_project( nameAndTitle, h,
"xy" );
1596 return i_project( nameAndTitle, h,
"xz" );
1602 return i_project( nameAndTitle, h,
"yz" );
1607 double lowx,
double upx )
1609 return book( name, title, nx, lowx, upx );
1616 return book( name, title, nx, lowx, upx );
1623 return book( name, title, x );
1629 return book( nameAndTitle, nameAndTitle, nx, lowx, upx );
1640 const AIDA::IHistogram1D& h )
1647 const AIDA::IHistogram1D& h )
1649 return createCopy( loc.first, loc.second, h );
1660 double lowx,
double upx,
int ny,
double lowy,
double upy )
1662 return book( name, title, nx, lowx, upx, ny, lowy, upy );
1667 double lowx,
double upx,
int ny,
double lowy,
double upy,
1670 return book( name, title, nx, lowx, upx, ny, lowy, upy );
1677 return book( name, title, x, y );
1682 int ny,
double lowy,
double upy )
1684 return book( nameAndTitle, nameAndTitle, nx, lowx, upx, ny, lowy, upy );
1695 const AIDA::IHistogram2D& h )
1702 const AIDA::IHistogram2D& h )
1704 return createCopy( loc.first, loc.second, h );
1715 double lowx,
double upx,
int ny,
double lowy,
double upy,
int nz,
1716 double lowz,
double upz )
1718 return book( name, title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
1723 double lowx,
double upx,
int ny,
double lowy,
double upy,
int nz,
1726 return book( name, title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
1733 return book( name, title, x, y, z );
1738 int ny,
double lowy,
double upy,
int nz,
double lowz,
double upz )
1740 return book( nameAndTitle, nameAndTitle, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
1751 const AIDA::IHistogram3D& h )
1758 const AIDA::IHistogram3D& h )
1760 return createCopy( loc.first, loc.second, h );
1773 return bookProf( name, title, nx, lowx, upx, opt );
1778 double upx,
double upper,
double lower,
const std::string& opt )
1780 return bookProf( name, title, nx, lowx, upx, upper, lower, opt );
1794 return bookProf( name, title, x, upper, lower );
1800 return bookProf( nametit, nametit, nx, lowx, upx,
"s" );
1805 double upper,
double lower )
1807 return bookProf( nametit, nametit, nx, lowx, upx, upper, lower,
"s" );
1825 return createCopy( loc.first, loc.second, h );
1836 double upx,
int ny,
double lowy,
double upy )
1838 return bookProf( name, title, nx, lowx, upx, ny, lowy, upy );
1843 double upx,
int ny,
double lowy,
double upy,
1846 return bookProf( name, title, nx, lowx, upx, ny, lowy, upy );
1853 return bookProf( name, title, x, y );
1858 int ny,
double lowy,
double upy )
1860 return bookProf( nameAndTitle, nameAndTitle, nx, lowx, upx, ny, lowy, upy );
1865 double upx,
int ny,
double lowy,
double upy,
double upper,
1868 return bookProf( name, title, nx, lowx, upx, ny, lowy, upy, upper, lower );
1873 double upx,
int ny,
double lowy,
double upy,
double upper,
1876 return bookProf( name, title, nx, lowx, upx, ny, lowy, upy, upper, lower );
1881 const Edges& y,
double upper,
double lower,
1884 return bookProf( name, title, x, y, upper, lower );
1889 int ny,
double lowy,
double upy,
double upper,
double lower )
1891 return bookProf( nameAndTitle, nameAndTitle, nx, lowx, upx, ny, lowy, upy, upper, lower );
1909 return createCopy( loc.first, loc.second, h );
Parse attribute strings allowing iteration over the various attributes.
AIDA::IProfile2D * createProfile2D(const std::string &name, const std::string &title, int nx, double lowx, double upx, int ny, double lowy, double upy)
Gaudi::Property< CLID > m_rootCLID
virtual std::ostream & write(std::ostream &s) const =0
Write (binary) histogram to output stream.
constexpr static const auto FAILURE
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.
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.
AIDA::IHistogram1D * createHistogram1D(const std::string &name, const std::string &title, int nx, double lowx, double upx)
StatusCode unregisterObject(Base *obj) override
Generic Transient Address.
virtual std::ostream & print(std::ostream &s) const =0
Print histogram to output stream.
StatusCode registerObject(boost::string_ref parentPath, boost::string_ref objPath, DataObject *pObject) override
Register object with the data store.
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::IHistogram2D * projectionXZ(const std::string &nameAndTitle, const AIDA::IHistogram3D &h) override
AIDA::IHistogram3D * createHistogram3D(const std::string &name, const std::string &title, int nx, double lowx, double upx, int ny, double lowy, double upy, int nz, double lowz, double upz)
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...
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.
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.
constexpr static const auto SUCCESS
DataObject * createPath(const std::string &newPath) override
Create all directories in a given full path.
AIDA::IHistogram1D * divide(const std::string &nameAndTitle, const AIDA::IHistogram1D &a, const AIDA::IHistogram1D &b) override
AIDA::IProfile1D * createProfile1D(const std::string &name, const std::string &title, int nx, double lowx, double upx, const std::string &opt) 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::IHistogram2D * createHistogram2D(const std::string &name, const std::string &title, int nx, double lowx, double upx, int ny, double lowy, double upy)
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.
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.
void update1Ddefs()
handler to be invoked for updating property m_defs1D
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)