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 );
193 auto directory = std::make_unique<DataObject>();
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.value(), 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;
275 auto rootObj = std::make_unique<DataObject>();
276 status = setRoot(
"/stat", rootObj.get() );
277 if ( status.isFailure() ) {
278 error() <<
"Unable to set hstogram data store root." <<
endmsg;
282 auto svc = service<IConversionSvc>(
"HistogramPersistencySvc", true );
284 error() <<
"Could not find HistogramPersistencySvc." <<
endmsg;
287 setDataLoader( svc.get() ).ignore();
289 for (
auto& j : m_input ) {
290 status = connectInput( j );
291 if ( !status.isSuccess() )
return status;
294 if ( !m_defs1D.empty() ) {
295 info() <<
" Predefined 1D-Histograms: " <<
endmsg;
296 for (
const auto& ih : m_defs1D ) {
297 info() <<
" Path='" << ih.first <<
"'" 298 <<
" Description " << ih.second <<
endmsg;
308 IHistogram1D*
HistogramSvc::sliceX(
const string& name,
const IHistogram2D& h,
int idxY1,
int idxY2 )
316 throw GaudiException(
"Cannot cast 2D histogram to H2D to create sliceX `" + name +
"'!",
"HistogramSvc",
319 if ( o.first && registerObject( name, o.second ).isSuccess() ) {
327 IHistogram1D*
HistogramSvc::sliceY(
const string& name,
const IHistogram2D& h,
int indexX1,
int indexX2 )
338 if ( o.first && registerObject( name, (IBaseHistogram*)o.second ).isSuccess() ) {
348 StatusCode sc = unregisterObject( dynamic_cast<IHistogram*>( hist ) );
358 if ( m_defs1D.empty() ) {
359 return i_book( pPar, rel, title,
Gaudi::createH1D( title, nx, lowx, upx ) );
361 string hn = histoAddr( pPar, rel );
362 auto ifound = m_defs1D.find( hn );
363 if ( m_defs1D.end() == ifound ) {
364 return i_book( pPar, rel, title,
Gaudi::createH1D( title, nx, lowx, upx ) );
367 debug() <<
" Redefine the parameters for the histogram '" + hn +
"' to be " << ifound->second <<
endmsg;
369 m_mods1D.insert( hn );
370 return i_book( pPar, rel, ifound->second.title(),
371 Gaudi::createH1D( ifound->second.title(), ifound->second.bins(), ifound->second.lowEdge(),
372 ifound->second.lowEdge() ) );
390 removeLeading(
m_defs1D.value(),
"/stat/" );
404 debug() <<
" " << im->second;
413 AIDA::IHistogram1D*
HistogramSvc::book(
const string&
par,
const string& rel,
const string& title,
int nx,
double lowx,
420 AIDA::IHistogram1D*
HistogramSvc::book(
const string& par,
int hID,
const string& title,
int nx,
double lowx,
437 return book( loc.first, loc.second, title, nx, lowx, upx );
441 AIDA::IHistogram1D*
HistogramSvc::book(
const string& full,
const string& title,
int nx,
double lowx,
double upx )
447 AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& par,
const string& rel,
const string& title,
int nx,
448 double lowx,
double upx,
const string& opt )
454 AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& par,
int hID,
const string& title,
int nx,
double lowx,
455 double upx,
const string& opt )
462 double upx,
const string& opt )
469 double lowx,
double upx,
const string& opt )
471 return bookProf( loc.first, loc.second, title, nx, lowx, upx, opt );
475 AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& full,
const string& title,
int nx,
double lowx,
double upx,
483 double upx,
const string& opt )
489 AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& par,
const string& rel,
const string& title,
int nx,
490 double lowx,
double upx,
double upper,
double lower,
const string& opt )
496 AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& par,
int hID,
const string& title,
int nx,
double lowx,
497 double upx,
double upper,
double lower,
const string& opt )
504 double upx,
double upper,
double lower,
const string& opt )
511 double lowx,
double upx,
double upper,
double lower,
const string& opt )
513 return bookProf( loc.first, loc.second, title, nx, lowx, upx, upper, lower, opt );
517 AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& full,
const string& title,
int nx,
double lowx,
double upx,
518 double upper,
double lower,
const string& opt )
525 double upx,
double upper,
double lower,
const string& opt )
553 return book( loc.first, loc.second, title, e );
597 return bookProf( loc.first, loc.second, title, e );
615 Edges e,
double upper,
double lower )
622 double upper,
double lower )
636 Edges e,
double upper,
double lower )
638 return bookProf( loc.first, loc.second, title, e, upper, lower );
643 double upper,
double lower )
650 double upx,
int ny,
double lowy,
double upy )
652 return book(
i_splitPath( full ), title, nx, lowx, upx, ny, lowy, upy );
657 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy )
659 return book(
createPath( par ), rel, title, nx, lowx, upx, ny, lowy, upy );
664 double upx,
int ny,
double lowy,
double upy )
671 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy )
673 return book( loc.first, loc.second, title, nx, lowx, upx, ny, lowy, upy );
678 double upx,
int ny,
double lowy,
double upy )
685 double lowx,
double upx,
int ny,
double lowy,
double upy )
692 double upx,
int ny,
double lowy,
double upy,
double upper,
double lower )
699 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy,
700 double upper,
double lower )
702 return bookProf(
createPath( par ), rel, title, nx, lowx, upx, ny, lowy, upy, upper, lower );
707 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy,
708 double upper,
double lower )
710 return bookProf( loc.first, loc.second, title, nx, lowx, upx, ny, lowy, upy, upper, lower );
715 double lowx,
double upx,
int ny,
double lowy,
double upy,
double upper,
718 return bookProf( par,
std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy, upper, lower );
723 double upx,
int ny,
double lowy,
double upy,
double upper,
double lower )
725 return bookProf( pPar,
std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy, upper, lower );
730 double lowx,
double upx,
int ny,
double lowy,
double upy,
double upper,
733 return i_book( pPar, rel, title,
Gaudi::createProf2D( title, nx, lowx, upx, ny, lowy, upy, upper, lower ) );
738 double upx,
int ny,
double lowy,
double upy )
745 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy )
752 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy )
754 return bookProf( loc.first, loc.second, title, nx, lowx, upx, ny, lowy, upy );
759 double lowx,
double upx,
int ny,
double lowy,
double upy )
766 double upx,
int ny,
double lowy,
double upy )
773 double lowx,
double upx,
int ny,
double lowy,
double upy )
775 return i_book( pPar, rel, title,
Gaudi::createProf2D( title, nx, lowx, upx, ny, lowy, upy, 0, 0 ) );
801 return book( loc.first, loc.second, title, x, y );
846 return bookProf( loc.first, loc.second, title, x, y );
858 double upper,
double lower )
865 Edges x,
Edges y,
double upper,
double lower )
872 double upper,
double lower )
879 double upper,
double lower )
886 Edges x,
Edges y,
double upper,
double lower )
888 return bookProf( loc.first, loc.second, title, x, y, upper, lower );
893 Edges y,
double upper,
double lower )
900 double upx,
int ny,
double lowy,
double upy,
int nz,
double lowz,
double upz )
902 return book(
i_splitPath( full ), title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
907 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy,
int nz,
908 double lowz,
double upz )
910 return book(
createPath( par ), rel, title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
915 double upx,
int ny,
double lowy,
double upy,
int nz,
double lowz,
double upz )
917 return book( par,
std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
922 double upx,
int ny,
double lowy,
double upy,
int nz,
double lowz,
double upz )
924 return book( pPar,
std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
929 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy,
int nz,
930 double lowz,
double upz )
932 return book( loc.first, loc.second, title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
937 double lowx,
double upx,
int ny,
double lowy,
double upy,
int nz,
double lowz,
940 return i_book( pPar, rel, title,
Gaudi::createH3D( title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz ) );
973 return book( loc.first, loc.second, title, x, y, z );
1031 return Helper(
this ).retrieve( pReg, path, obj );
1037 return Helper(
this ).retrieve( pReg, path, obj );
1043 return Helper(
this ).retrieve( pReg, path, obj );
1049 return Helper(
this ).retrieve( pReg, path, obj );
1055 return Helper(
this ).retrieve( pReg, path, obj );
1061 return Helper(
this ).retrieve( full, obj );
1067 return Helper(
this ).retrieve( full, obj );
1073 return Helper(
this ).retrieve( full, obj );
1079 return Helper(
this ).retrieve( full, obj );
1085 return Helper(
this ).retrieve( full, obj );
1091 AIDA::IProfile1D*& obj )
1093 return Helper(
this ).retrieve( parent, rel, obj );
1099 return Helper(
this ).retrieve( parent, rel, obj );
1105 return Helper(
this ).retrieve( parent, rel, obj );
1111 return Helper(
this ).retrieve( parent, rel, obj );
1117 return Helper(
this ).retrieve( parent, rel, obj );
1123 return Helper(
this ).retrieve( parent, item, obj );
1129 return Helper(
this ).retrieve( parent, item, obj );
1135 return Helper(
this ).retrieve( parent, item, obj );
1141 return Helper(
this ).retrieve( parent, item, obj );
1147 return Helper(
this ).retrieve( parent, 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( par, item, obj );
1194 return Helper(
this ).retrieve( par, item, obj );
1200 return Helper(
this ).retrieve( par, item, obj );
1206 return Helper(
this ).retrieve( 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 ).retrieve( detail::cast( par ), item, obj );
1254 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1260 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1266 return Helper(
this ).retrieve( detail::cast( par ), item, obj );
1272 return Helper(
this ).find( pReg, path, obj );
1277 return Helper(
this ).find( pReg, path, obj );
1282 return Helper(
this ).find( pReg, path, obj );
1287 return Helper(
this ).find( pReg, path, obj );
1292 return Helper(
this ).find( pReg, path, obj );
1297 return Helper(
this ).find( full, obj );
1302 return Helper(
this ).find( full, obj );
1308 return Helper(
this ).find( full, obj );
1314 return Helper(
this ).find( full, obj );
1320 return Helper(
this ).find( full, obj );
1326 return Helper(
this ).find( par, rel, obj );
1332 return Helper(
this ).find( par, rel, obj );
1338 return Helper(
this ).find( par, rel, obj );
1344 return Helper(
this ).find( par, rel, obj );
1350 return Helper(
this ).find( par, rel, 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( par, item, obj );
1428 return Helper(
this ).find( par, item, obj );
1434 return Helper(
this ).find( par, item, obj );
1440 return Helper(
this ).find( 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 Helper(
this ).find( detail::cast( par ), item, obj );
1488 return Helper(
this ).find( detail::cast( par ), item, obj );
1494 return Helper(
this ).find( detail::cast( par ), item, obj );
1500 return Helper(
this ).find( detail::cast( par ), item, obj );
1506 return sliceX( name, h, IAxis::UNDERFLOW_BIN, IAxis::OVERFLOW_BIN );
1512 return sliceY( name, h, IAxis::UNDERFLOW_BIN, IAxis::OVERFLOW_BIN );
1518 return sliceX( name, h, indexY, indexY );
1524 return sliceY( name, h, indexX, indexX );
1529 const AIDA::IHistogram1D& b )
1536 const AIDA::IHistogram1D& b )
1543 const AIDA::IHistogram1D& b )
1550 const AIDA::IHistogram1D& b )
1557 const AIDA::IHistogram2D& b )
1564 const AIDA::IHistogram2D& b )
1571 const AIDA::IHistogram2D& b )
1578 const AIDA::IHistogram2D& b )
1585 const AIDA::IHistogram3D& b )
1592 const AIDA::IHistogram3D& b )
1599 const AIDA::IHistogram3D& b )
1606 const AIDA::IHistogram3D& b )
1614 return i_project( nameAndTitle, h,
"xy" );
1620 return i_project( nameAndTitle, h,
"xz" );
1626 return i_project( nameAndTitle, h,
"yz" );
1631 double lowx,
double upx )
1633 return book( name, tit, nx, lowx, upx );
1640 return book( name, tit, nx, lowx, upx );
1647 return book( name, title, x );
1653 return book( nameAndTitle, nameAndTitle, nx, lowx, upx );
1664 const AIDA::IHistogram1D& h )
1671 const AIDA::IHistogram1D& h )
1673 return createCopy( loc.first, loc.second, h );
1684 double lowx,
double upx,
int ny,
double lowy,
double upy )
1686 return book( name, tit, nx, lowx, upx, ny, lowy, upy );
1691 double lowx,
double upx,
int ny,
double lowy,
double upy,
1694 return book( name, tit, nx, lowx, upx, ny, lowy, upy );
1701 return book( name, title, x, y );
1706 int ny,
double lowy,
double upy )
1708 return book( nameAndTitle, nameAndTitle, nx, lowx, upx, ny, lowy, upy );
1719 const AIDA::IHistogram2D& h )
1726 const AIDA::IHistogram2D& h )
1728 return createCopy( loc.first, loc.second, h );
1739 double lowx,
double upx,
int ny,
double lowy,
double upy,
int nz,
1740 double lowz,
double upz )
1742 return book( name, tit, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
1747 double lowx,
double upx,
int ny,
double lowy,
double upy,
int nz,
1750 return book( name, tit, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
1757 return book( name, title, x, y, z );
1762 int ny,
double lowy,
double upy,
int nz,
double lowz,
double upz )
1764 return book( nameAndTitle, nameAndTitle, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
1775 const AIDA::IHistogram3D& h )
1782 const AIDA::IHistogram3D& h )
1784 return createCopy( loc.first, loc.second, h );
1797 return bookProf( name, tit, nx, lowx, upx, opt );
1802 double upx,
double upper,
double lower,
const std::string& opt )
1804 return bookProf( name, tit, nx, lowx, upx, upper, lower, opt );
1818 return bookProf( name, title, x, upper, lower );
1824 return bookProf( nametit, nametit, nx, lowx, upx,
"s" );
1829 double upper,
double lower )
1831 return bookProf( nametit, nametit, nx, lowx, upx, upper, lower,
"s" );
1849 return createCopy( loc.first, loc.second, h );
1860 double upx,
int ny,
double lowy,
double upy )
1862 return bookProf( name, tit, nx, lowx, upx, ny, lowy, upy );
1867 double upx,
int ny,
double lowy,
double upy,
1870 return bookProf( name, tit, nx, lowx, upx, ny, lowy, upy );
1877 return bookProf( name, title, x, y );
1882 int ny,
double lowy,
double upy )
1884 return bookProf( nameAndTitle, nameAndTitle, nx, lowx, upx, ny, lowy, upy );
1889 double upx,
int ny,
double lowy,
double upy,
double upper,
1892 return bookProf( name, tit, nx, lowx, upx, ny, lowy, upy, upper, lower );
1897 double upx,
int ny,
double lowy,
double upy,
double upper,
1900 return bookProf( name, tit, nx, lowx, upx, ny, lowy, upy, upper, lower );
1905 const Edges& y,
double upper,
double lower,
1908 return bookProf( name, title, x, y, upper, lower );
1913 int ny,
double lowy,
double upy,
double upper,
double lower )
1915 return bookProf( nameAndTitle, nameAndTitle, nx, lowx, upx, ny, lowy, upy, upper, lower );
1933 return createCopy( loc.first, loc.second, h );
Parse attribute strings allowing iteration over the various attributes.
Gaudi::Property< CLID > m_rootCLID
StatusCode unregisterObject(boost::string_ref fullPath) override
Unregister object from the data store.
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.
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.
StatusCode unregisterObject(Base *obj) override
Generic Transient Address.
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...
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.
constexpr static const auto SUCCESS
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
StatusCode registerObject(boost::string_ref fullPath, DataObject *pObject) override
Register object with the data store.
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 retrieveObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject) override
Retrieve object from data store.
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.
StatusCode findObject(boost::string_ref fullPath, DataObject *&pObject) override
Find object identified by its full path in the 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.
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)