32 string histoAddr(
const string& name ) {
33 if (
name.starts_with(
"/stat/" ) ) {
return string( name, 6 ); }
37 string histoAddr(
const DataObject* obj,
const string& rel ) {
38 if ( !obj ) {
return rel; }
40 if ( !reg ) {
return rel; }
43 if ( rel.empty() ) {
return histoAddr( name ); }
44 if (
'/' == name[
name.size() - 1] ||
'/' == rel[0] ) {
return histoAddr( name + rel ); }
45 return histoAddr( name +
"/" + rel );
49 auto it =
std::find_if(
m.begin(),
m.end(), [&lead](
const auto& i ) { return 0 == i.first.find( lead ); } );
50 if ( it ==
m.end() )
return 0;
51 string addr =
string( it->first, lead.size() );
55 return 1 + removeLeading( m, lead );
61 std::pair<string, string> split =
i_splitPath( full );
70 if ( !hObj->annotation().addItem(
"id", obj.substr( 1 ) ) ) hObj->annotation().setValue(
"id", obj.substr( 1 ) );
73 if ( !hObj->annotation().addItem(
"id", obj ) ) hObj->annotation().setValue(
"id", obj );
83 TH2D* h2d =
dynamic_cast<TH2D*
>( h3d->Project3D( dir.c_str() ) );
97 if ( b )
return b->
print( s );
98 error() <<
"Unknown histogram type: Cannot cast to Gaudi::HistogramBase." <<
endmsg;
105 if ( b )
return b->
write( s );
106 error() <<
"Unknown histogram type: Cannot cast to Gaudi::HistogramBase." <<
endmsg;
112 Gaudi::HistogramBase* b =
dynamic_cast<Gaudi::HistogramBase*
>(
h );
113 if ( b )
return b->
write( file_name );
114 error() <<
"Unknown histogram type: Cannot cast to Gaudi::HistogramBase." <<
endmsg;
126 if ( tmp.rfind(
SEPARATOR ) == tmp.length() - 1 ) { tmp.erase( tmp.length() - 1, 1 ); }
128 return { tmp.substr( 0, sep ), tmp.substr( sep + 1 ) };
133 string tmpPath = newPath;
135 tmpPath.insert( tmpPath.begin(),
SEPARATOR );
139 if ( tmpPath.rfind(
SEPARATOR ) == tmpPath.length() - 1 ) { tmpPath.erase( tmpPath.rfind(
SEPARATOR ), 1 ); }
142 if ( sc.
isSuccess() ) {
return pObject; }
144 string rest( tmpPath, sep + 1, tmpPath.length() - sep );
145 string subPath( tmpPath, 0, sep );
149 error() <<
"Unable to create the histogram path" <<
endmsg;
158 auto directory = std::make_unique<DataObject>();
163 error() <<
"Unable to create the histogram directory: " << parentDir <<
"/" << subDir <<
endmsg;
168 error() <<
"Unable to create the histogram directory: " << parentDir <<
"/" << subDir <<
endmsg;
187 string::size_type loc = ident.find(
" " );
188 string filename, auth, svc =
"", typ =
"";
189 string logname = ident.substr( 0, loc );
190 for (
auto attrib : Parser( ident.substr( loc + 1 ) ) ) {
203 if ( typ.length() > 0 ) {
207 entryname += logname;
220 info() <<
"Added stream file:" << filename <<
" as " << logname <<
endmsg;
227 error() <<
"Cannot add " << ident <<
" invalid filename!" <<
endmsg;
236 auto rootObj = std::make_unique<DataObject>();
237 status =
setRoot(
"/stat", rootObj.get() );
239 error() <<
"Unable to set hstogram data store root." <<
endmsg;
245 error() <<
"Could not find HistogramPersistencySvc." <<
endmsg;
252 if ( !status.
isSuccess() )
return status;
256 info() <<
" Predefined 1D-Histograms: " <<
endmsg;
258 info() <<
" Path='" << ih.first <<
"'"
259 <<
" Description " << ih.second <<
endmsg;
269IHistogram1D*
HistogramSvc::sliceX(
const string& name,
const IHistogram2D& h,
int idxY1,
int idxY2 ) {
276 throw GaudiException(
"Cannot cast 2D histogram to H2D to create sliceX `" +
name +
"'!",
"HistogramSvc",
285IHistogram1D*
HistogramSvc::sliceY(
const string& name,
const IHistogram2D& h,
int indexX1,
int indexX2 ) {
286 std::pair<DataObject*, IHistogram1D*> o(
nullptr,
nullptr );
312 return i_book( pPar, rel, title,
315 string hn = histoAddr( pPar, rel );
318 return i_book( pPar, rel, title,
322 debug() <<
" Redefine the parameters for the histogram '" + hn +
"' to be " << ifound->second <<
endmsg;
325 return i_book( pPar, rel, ifound->second.title(),
327 ifound->second.bins(), ifound->second.lowEdge(), ifound->second.lowEdge() ) );
341 removeLeading(
m_defs1D.value(),
"/stat/" );
346 std::string
const& root =
rootName();
347 return path.
substr( root.size() ) +
'/' + rel;
359 if (
m_defs1D.end() != im ) {
debug() <<
" " << im->second; }
367AIDA::IHistogram1D*
HistogramSvc::book(
const string& par,
const string& rel,
const string& title,
int nx,
double lowx,
373AIDA::IHistogram1D*
HistogramSvc::book(
const string& par,
int hID,
const string& title,
int nx,
double lowx,
375 return book( par, std::to_string( hID ), title, nx, lowx, upx );
381 return book( pPar, std::to_string( hID ), title, nx, lowx, upx );
391AIDA::IHistogram1D*
HistogramSvc::book(
const string& full,
const string& title,
int nx,
double lowx,
double upx ) {
396AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& par,
const string& rel,
const string& title,
int nx,
397 double lowx,
double upx,
const string& opt ) {
402AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& par,
int hID,
const string& title,
int nx,
double lowx,
403 double upx,
const string& opt ) {
404 return bookProf( par, std::to_string( hID ), title, nx, lowx, upx, opt );
409 double upx,
const string& opt ) {
410 return bookProf( pPar, std::to_string( hID ), title, nx, lowx, upx, opt );
415 double lowx,
double upx,
const string& opt ) {
420AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& full,
const string& title,
int nx,
double lowx,
double upx,
421 const string& opt ) {
427 double upx,
const string& opt ) {
434AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& par,
const string& rel,
const string& title,
int nx,
435 double lowx,
double upx,
double upper,
double lower,
const string& opt ) {
440AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& par,
int hID,
const string& title,
int nx,
double lowx,
441 double upx,
double upper,
double lower,
const string& opt ) {
442 return bookProf( par, std::to_string( hID ), title, nx, lowx, upx, upper, lower, opt );
447 double upx,
double upper,
double lower,
const string& opt ) {
448 return bookProf( pPar, std::to_string( hID ), title, nx, lowx, upx, upper, lower, opt );
453 double lowx,
double upx,
double upper,
double lower,
const string& opt ) {
458AIDA::IProfile1D*
HistogramSvc::bookProf(
const string& full,
const string& title,
int nx,
double lowx,
double upx,
459 double upper,
double lower,
const string& opt ) {
465 double upx,
double upper,
double lower,
const string& opt ) {
473 return book( par, std::to_string( hID ), title, e );
478 return book( pPar, std::to_string( hID ), title, e );
482AIDA::IHistogram1D*
HistogramSvc::book(
const std::string& par,
const std::string& rel,
const std::string& title,
516 return bookProf( par, std::to_string( hID ), title, e );
521 return bookProf( pPar, std::to_string( hID ), title, e );
533 return i_book( pPar, rel, title,
545 Edges e,
double upper,
double lower ) {
551 double upper,
double lower ) {
552 return bookProf( par, std::to_string( hID ), title, e, upper, lower );
558 return bookProf( pPar, std::to_string( hID ), title, e, upper, lower );
563 Edges e,
double upper,
double lower ) {
569 double upper,
double lower ) {
570 return i_book( pPar, rel, title,
575AIDA::IHistogram2D*
HistogramSvc::book(
const std::string& full,
const std::string& title,
int nx,
double lowx,
576 double upx,
int ny,
double lowy,
double upy ) {
577 return book(
i_splitPath( full ), title, nx, lowx, upx, ny, lowy, upy );
581AIDA::IHistogram2D*
HistogramSvc::book(
const std::string& par,
const std::string& rel,
const std::string& title,
582 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy ) {
583 return book(
createPath( par ), rel, title, nx, lowx, upx, ny, lowy, upy );
587AIDA::IHistogram2D*
HistogramSvc::book(
const std::string& par,
int hID,
const std::string& title,
int nx,
double lowx,
588 double upx,
int ny,
double lowy,
double upy ) {
589 return book( par, std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy );
594 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy ) {
595 return book( loc.
first, loc.
second, title, nx, lowx, upx, ny, lowy, upy );
600 double upx,
int ny,
double lowy,
double upy ) {
601 return book( pPar, std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy );
606 double lowx,
double upx,
int ny,
double lowy,
double upy ) {
614 double upx,
int ny,
double lowy,
double upy,
double upper,
double lower ) {
620 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy,
621 double upper,
double lower ) {
622 return bookProf(
createPath( par ), rel, title, nx, lowx, upx, ny, lowy, upy, upper, lower );
627 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy,
628 double upper,
double lower ) {
629 return bookProf( loc.
first, loc.
second, title, nx, lowx, upx, ny, lowy, upy, upper, lower );
634 double lowx,
double upx,
int ny,
double lowy,
double upy,
double upper,
636 return bookProf( par, std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy, upper, lower );
641 double upx,
int ny,
double lowy,
double upy,
double upper,
double lower ) {
642 return bookProf( pPar, std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy, upper, lower );
647 double lowx,
double upx,
int ny,
double lowy,
double upy,
double upper,
649 return i_book( pPar, rel, title,
651 upy, upper, lower ) );
656 double upx,
int ny,
double lowy,
double upy ) {
662 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy ) {
668 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy ) {
674 double lowx,
double upx,
int ny,
double lowy,
double upy ) {
675 return bookProf( par, std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy );
680 double upx,
int ny,
double lowy,
double upy ) {
681 return bookProf( pPar, std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy );
686 double lowx,
double upx,
int ny,
double lowy,
double upy ) {
689 Gaudi::createProf2D(
serviceLocator(),
buildHistoPath( pPar, rel ), title, nx, lowx, upx, ny, lowy, upy, 0, 0 ) );
698AIDA::IHistogram2D*
HistogramSvc::book(
const std::string& par,
const std::string& rel,
const std::string& title,
705 return book( par, std::to_string( hID ), title, x, y );
716 return book( pPar, std::to_string( hID ), title, x, y );
739 return bookProf( par, std::to_string( hID ), title, x, y );
744 return bookProf( pPar, std::to_string( hID ), title, x, y );
756 return i_book( pPar, rel, title,
762 double upper,
double lower ) {
768 Edges x,
Edges y,
double upper,
double lower ) {
774 double upper,
double lower ) {
775 return bookProf( par, std::to_string( hID ), title, x, y, upper, lower );
780 double upper,
double lower ) {
781 return bookProf( pPar, std::to_string( hID ), title, x, y, upper, lower );
786 Edges x,
Edges y,
double upper,
double lower ) {
792 Edges y,
double upper,
double lower ) {
793 return i_book( pPar, rel, title,
798AIDA::IHistogram3D*
HistogramSvc::book(
const std::string& full,
const std::string& title,
int nx,
double lowx,
799 double upx,
int ny,
double lowy,
double upy,
int nz,
double lowz,
double upz ) {
800 return book(
i_splitPath( full ), title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
804AIDA::IHistogram3D*
HistogramSvc::book(
const std::string& par,
const std::string& rel,
const std::string& title,
805 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy,
int nz,
806 double lowz,
double upz ) {
807 return book(
createPath( par ), rel, title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
811AIDA::IHistogram3D*
HistogramSvc::book(
const std::string& par,
int hID,
const std::string& title,
int nx,
double lowx,
812 double upx,
int ny,
double lowy,
double upy,
int nz,
double lowz,
double upz ) {
813 return book( par, std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
818 double upx,
int ny,
double lowy,
double upy,
int nz,
double lowz,
double upz ) {
819 return book( pPar, std::to_string( hID ), title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
824 int nx,
double lowx,
double upx,
int ny,
double lowy,
double upy,
int nz,
825 double lowz,
double upz ) {
826 return book( loc.
first, loc.
second, title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
831 double lowx,
double upx,
int ny,
double lowy,
double upy,
int nz,
double lowz,
833 return i_book( pPar, rel, title,
834 Gaudi::createH3D(
serviceLocator(),
buildHistoPath( pPar, rel ), title, nx, lowx, upx, ny, lowy, upy,
844AIDA::IHistogram3D*
HistogramSvc::book(
const std::string& par,
const std::string& rel,
const std::string& title,
852 return book( par, std::to_string( hID ), title, x, y, z );
858 return book( pPar, std::to_string( hID ), title, x, y, z );
898 return Helper(
this ).retrieve( pReg, path, obj );
903 return Helper(
this ).retrieve( pReg, path, obj );
908 return Helper(
this ).retrieve( pReg, path, obj );
913 return Helper(
this ).retrieve( pReg, path, obj );
918 return Helper(
this ).retrieve( pReg, path, obj );
923 return Helper(
this ).retrieve( full, obj );
928 return Helper(
this ).retrieve( full, obj );
933 return Helper(
this ).retrieve( full, obj );
938 return Helper(
this ).retrieve( full, obj );
943 return Helper(
this ).retrieve( full, obj );
949 AIDA::IProfile1D*& obj ) {
950 return Helper(
this ).retrieve( parent, rel, obj );
955 return Helper(
this ).retrieve( parent, rel, obj );
960 return Helper(
this ).retrieve( parent, rel, obj );
965 return Helper(
this ).retrieve( parent, rel, obj );
970 return Helper(
this ).retrieve( parent, rel, obj );
975 return Helper(
this ).retrieve( parent, item, obj );
980 return Helper(
this ).retrieve( parent, item, obj );
985 return Helper(
this ).retrieve( parent, item, obj );
990 return Helper(
this ).retrieve( parent, item, obj );
995 return Helper(
this ).retrieve( parent, item, obj );
999 return Helper(
this ).retrieve( par, item, obj );
1004 return Helper(
this ).retrieve( par, item, obj );
1009 return Helper(
this ).retrieve( par, item, obj );
1014 return Helper(
this ).retrieve( par, item, obj );
1019 return Helper(
this ).retrieve( par, item, obj );
1024 return Helper(
this ).retrieve( par, item, obj );
1029 return Helper(
this ).retrieve( par, item, obj );
1034 return Helper(
this ).retrieve( par, item, obj );
1039 return Helper(
this ).retrieve( par, item, obj );
1044 return Helper(
this ).retrieve( par, item, obj );
1049 return Helper(
this ).retrieve( ::detail::cast( par ), item, obj );
1054 return Helper(
this ).retrieve( ::detail::cast( par ), item, obj );
1059 return Helper(
this ).retrieve( ::detail::cast( par ), item, obj );
1064 return Helper(
this ).retrieve( ::detail::cast( par ), item, obj );
1069 return Helper(
this ).retrieve( ::detail::cast( par ), item, obj );
1074 return Helper(
this ).retrieve( ::detail::cast( par ), item, obj );
1079 return Helper(
this ).retrieve( ::detail::cast( par ), item, obj );
1084 return Helper(
this ).retrieve( ::detail::cast( par ), item, obj );
1089 return Helper(
this ).retrieve( ::detail::cast( par ), item, obj );
1094 return Helper(
this ).retrieve( ::detail::cast( par ), item, obj );
1099 return Helper(
this ).find( pReg, path, obj );
1103 return Helper(
this ).find( pReg, path, obj );
1107 return Helper(
this ).find( pReg, path, obj );
1111 return Helper(
this ).find( pReg, path, obj );
1115 return Helper(
this ).find( pReg, path, obj );
1119 return Helper(
this ).find( full, obj );
1123 return Helper(
this ).find( full, obj );
1128 return Helper(
this ).find( full, obj );
1133 return Helper(
this ).find( full, obj );
1138 return Helper(
this ).find( full, obj );
1143 return Helper(
this ).find( par, rel, obj );
1148 return Helper(
this ).find( par, rel, obj );
1153 return Helper(
this ).find( par, rel, obj );
1158 return Helper(
this ).find( par, rel, obj );
1163 return Helper(
this ).find( par, rel, obj );
1168 return Helper(
this ).find( par, item, obj );
1173 return Helper(
this ).find( par, item, obj );
1178 return Helper(
this ).find( par, item, obj );
1183 return Helper(
this ).find( par, item, obj );
1188 return Helper(
this ).find( par, item, obj );
1193 return Helper(
this ).find( par, item, obj );
1198 return Helper(
this ).find( par, item, obj );
1203 return Helper(
this ).find( par, item, obj );
1208 return Helper(
this ).find( par, item, obj );
1213 return Helper(
this ).find( par, item, obj );
1218 return Helper(
this ).find( par, item, obj );
1223 return Helper(
this ).find( par, item, obj );
1228 return Helper(
this ).find( par, item, obj );
1233 return Helper(
this ).find( par, item, obj );
1238 return Helper(
this ).find( par, item, obj );
1243 return Helper(
this ).find( ::detail::cast( par ), item, obj );
1248 return Helper(
this ).find( ::detail::cast( par ), item, obj );
1253 return Helper(
this ).find( ::detail::cast( par ), item, obj );
1258 return Helper(
this ).find( ::detail::cast( par ), item, obj );
1263 return Helper(
this ).find( ::detail::cast( par ), item, obj );
1268 return Helper(
this ).find( ::detail::cast( par ), item, obj );
1273 return Helper(
this ).find( ::detail::cast( par ), item, obj );
1278 return Helper(
this ).find( ::detail::cast( par ), item, obj );
1283 return Helper(
this ).find( ::detail::cast( par ), item, obj );
1288 return Helper(
this ).find( ::detail::cast( par ), item, obj );
1293 return sliceX(
name, h, IAxis::UNDERFLOW_BIN, IAxis::OVERFLOW_BIN );
1298 return sliceY(
name, h, IAxis::UNDERFLOW_BIN, IAxis::OVERFLOW_BIN );
1313 const AIDA::IHistogram1D& b ) {
1319 const AIDA::IHistogram1D& b ) {
1325 const AIDA::IHistogram1D& b ) {
1331 const AIDA::IHistogram1D& b ) {
1337 const AIDA::IHistogram2D& b ) {
1343 const AIDA::IHistogram2D& b ) {
1349 const AIDA::IHistogram2D& b ) {
1355 const AIDA::IHistogram2D& b ) {
1361 const AIDA::IHistogram3D& b ) {
1367 const AIDA::IHistogram3D& b ) {
1373 const AIDA::IHistogram3D& b ) {
1379 const AIDA::IHistogram3D& b ) {
1385 return i_project( nameAndTitle, h,
"xy" );
1390 return i_project( nameAndTitle, h,
"xz" );
1395 return i_project( nameAndTitle, h,
"yz" );
1400 double lowx,
double upx ) {
1401 return book(
name, title, nx, lowx, upx );
1406 double lowx,
double upx,
const std::string& ) {
1407 return book(
name, title, nx, lowx, upx );
1412 const std::string& ) {
1419 return book( nameAndTitle, nameAndTitle, nx, lowx, upx );
1429 const AIDA::IHistogram1D& h ) {
1435 const AIDA::IHistogram1D& h ) {
1446 double lowx,
double upx,
int ny,
double lowy,
double upy ) {
1447 return book(
name, title, nx, lowx, upx, ny, lowy, upy );
1452 double lowx,
double upx,
int ny,
double lowy,
double upy,
1453 const std::string& ) {
1454 return book(
name, title, nx, lowx, upx, ny, lowy, upy );
1459 const Edges& y,
const std::string& ) {
1465 int ny,
double lowy,
double upy ) {
1466 return book( nameAndTitle, nameAndTitle, nx, lowx, upx, ny, lowy, upy );
1476 const AIDA::IHistogram2D& h ) {
1482 const AIDA::IHistogram2D& h ) {
1493 double lowx,
double upx,
int ny,
double lowy,
double upy,
int nz,
1494 double lowz,
double upz ) {
1495 return book(
name, title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
1500 double lowx,
double upx,
int ny,
double lowy,
double upy,
int nz,
1501 double lowz,
double upz,
const std::string& ) {
1502 return book(
name, title, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
1507 const Edges& y,
const Edges& z,
const std::string& ) {
1508 return book(
name, title, x, y, z );
1513 int ny,
double lowy,
double upy,
int nz,
double lowz,
1515 return book( nameAndTitle, nameAndTitle, nx, lowx, upx, ny, lowy, upy, nz, lowz, upz );
1525 const AIDA::IHistogram3D& h ) {
1531 const AIDA::IHistogram3D& h ) {
1542 double upx,
const std::string& opt ) {
1548 double upx,
double upper,
double lower,
const std::string& opt ) {
1549 return bookProf(
name, title, nx, lowx, upx, upper, lower, opt );
1554 const std::string& ) {
1560 double upper,
double lower,
const std::string& ) {
1566 return bookProf( nametit, nametit, nx, lowx, upx,
"s" );
1571 double upper,
double lower ) {
1572 return bookProf( nametit, nametit, nx, lowx, upx, upper, lower,
"s" );
1582 const AIDA::IProfile1D& h ) {
1588 const AIDA::IProfile1D& h ) {
1599 double upx,
int ny,
double lowy,
double upy ) {
1600 return bookProf(
name, title, nx, lowx, upx, ny, lowy, upy );
1605 double upx,
int ny,
double lowy,
double upy,
1606 const std::string& ) {
1607 return bookProf(
name, title, nx, lowx, upx, ny, lowy, upy );
1612 const Edges& y,
const std::string& ) {
1618 int ny,
double lowy,
double upy ) {
1619 return bookProf( nameAndTitle, nameAndTitle, nx, lowx, upx, ny, lowy, upy );
1624 double upx,
int ny,
double lowy,
double upy,
double upper,
1626 return bookProf(
name, title, nx, lowx, upx, ny, lowy, upy, upper, lower );
1631 double upx,
int ny,
double lowy,
double upy,
double upper,
1632 double lower,
const std::string& ) {
1633 return bookProf(
name, title, nx, lowx, upx, ny, lowy, upy, upper, lower );
1638 const Edges& y,
double upper,
double lower,
1639 const std::string& ) {
1645 int ny,
double lowy,
double upy,
double upper,
double lower ) {
1646 return bookProf( nameAndTitle, nameAndTitle, nx, lowx, upx, ny, lowy, upy, upper, lower );
1656 const AIDA::IProfile2D& h ) {
1662 const AIDA::IProfile2D& h ) {
const long HBOOK_StorageType
const long ROOT_StorageType
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
constexpr _OI move(_II __first, _II __last, _OI __result)
constexpr _InputIterator find_if(_InputIterator __first, _InputIterator __last, _Predicate __pred)
basic_string< char > string
_CharT toupper(_CharT __c, const locale &__loc)
basic_string substr(size_type __pos=0, size_type __n=npos) const
void insert(_InputIterator __first, _InputIterator __last)
size_type size() const noexcept
bool empty() const noexcept
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
A DataObject is the base class of any identifiable object on any data store.
IRegistry * registry() const
Get pointer to Registry.
StatusCode setRoot(std::string root_name, DataObject *pRootObj) override
Initialize data store for new event by giving new event path and root object.
StatusCode finalize() override
Service initialization.
Gaudi::Property< std::string > m_rootName
StatusCode setDataLoader(IConversionSvc *svc, IDataProviderSvc *dpsvc=nullptr) override
IDataManagerSvc: IDataManagerSvc: Pass a default data loader to the service and optionally a data pro...
StatusCode initialize() override
Service initialization.
StatusCode registerObject(std::string_view parentPath, std::string_view objPath, DataObject *pObject) override
Register object with the data store.
Gaudi::Property< CLID > m_rootCLID
const std::string & rootName() const override
IDataManagerSvc: Accessor for root event name.
StatusCode registerAddress(std::string_view fullPath, IOpaqueAddress *pAddress) override
IDataManagerSvc: Register object address with the data store.
StatusCode clearStore() override
IDataManagerSvc: Remove all data objects in the data store.
static int toRootIndex(int index, int nbins)
Simple helper class for description of 1D-histogram The class is targeted to act as the primary "hist...
Common base class for all histograms Use is solely functional to minimize dynamic_casts inside Histog...
virtual std::ostream & write(std::ostream &s) const =0
Write (binary) histogram to output stream.
virtual std::ostream & print(std::ostream &s) const =0
Print histogram to output stream.
const ValueType & value() const
Parse attribute strings allowing iteration over the various attributes.
GaudiException(std::string Message, std::string Tag, StatusCode Code)
Constructor (1).
Generic Transient Address.
GenericAddress()=default
Dummy constructor.
unsigned long release() override
release reference to object
AIDA::IHistogram1D * sliceY(const std::string &name, const AIDA::IHistogram2D &h, int indexX) override
std::ostream & write(Base *h, std::ostream &s=std::cout) const override
Write (ASCII) the 1D histogram table into the output stream.
~HistogramSvc() override
Destructor.
AIDA::IHistogram2D * projectionXY(const std::string &nameAndTitle, const AIDA::IHistogram3D &h) override
AIDA::IHistogram1D * divide(const std::string &nameAndTitle, const AIDA::IHistogram1D &a, const AIDA::IHistogram1D &b) override
std::set< std::string > m_mods1D
AIDA::IHistogram1D * projectionY(const std::string &name, const AIDA::IHistogram2D &h) override
StatusCode findObject(IRegistry *pReg, const std::string &path, AIDA::IProfile1D *&obj) override
StatusCode connectInput(const std::string &ident)
Connect input histogram file to the service.
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)
StatusCode retrieveObject(IRegistry *pReg, const std::string &path, AIDA::IHistogram1D *&obj) override
std::map< std::string, Gaudi::Histo1DDef > Histo1DMap
void update1Ddefs()
handler to be invoked for updating property m_defs1D
AIDA::IHistogram1D * createCopy(const std::string &full, const AIDA::IHistogram1D &h) override
StatusCode registerObject(const std::string &parent, const std::string &rel, Base *obj) override
Gaudi::Property< DBaseEntries > m_input
AIDA::IHistogram2D * projectionYZ(const std::string &nameAndTitle, const AIDA::IHistogram3D &h) override
std::pair< std::string, std::string > i_splitPath(const std::string &full)
Split full path into its components.
AIDA::IHistogram1D * projectionX(const std::string &name, const AIDA::IHistogram2D &h) override
StatusCode reinitialize() override
Initialise the service.
AIDA::IHistogram2D * projectionXZ(const std::string &nameAndTitle, const AIDA::IHistogram3D &h) override
AIDA::IHistogram1D * createHistogram1D(const std::string &name, const std::string &title, int nx, double lowx, double upx)
AIDA::IProfile1D * createProfile1D(const std::string &name, const std::string &title, int nx, double lowx, double upx, const std::string &opt) override
HistogramSvc(const std::string &name, ISvcLocator *svc)
Statndard Constructor.
AIDA::IHistogram1D * multiply(const std::string &nameAndTitle, const AIDA::IHistogram1D &a, const AIDA::IHistogram1D &b) override
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.
std::string buildHistoPath(DataObject const *pPar, std::string const &rel)
extracts the path of an histogram from the related DataObject
Gaudi::Property< Histo1DMap > m_defs1D
AIDA::IHistogram2D * i_project(const std::string &nameAndTitle, const AIDA::IHistogram3D &h, const std::string &dir)
Helper for 2D projections.
AIDA::IHistogram1D * sliceX(const std::string &name, const AIDA::IHistogram2D &h, int indexY) override
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::IHistogram1D * add(const std::string &nameAndTitle, const AIDA::IHistogram1D &a, const AIDA::IHistogram1D &b) override
std::ostream & print(Base *h, std::ostream &s=std::cout) const override
Print (ASCII) the 1D histogram into the output stream.
std::vector< double > Edges
StatusCode finalize() override
finalize the service
AIDA::IHistogram1D * subtract(const std::string &nameAndTitle, const AIDA::IHistogram1D &a, const AIDA::IHistogram1D &b) override
AIDA::IHistogram2D * createHistogram2D(const std::string &name, const std::string &title, int nx, double lowx, double upx, int ny, double lowy, double upy)
AIDA::IProfile2D * createProfile2D(const std::string &name, const std::string &title, int nx, double lowx, double upx, int ny, double lowy, double upy)
DataObject * createPath(const std::string &newPath) override
Create all directories in a given full path.
DataObject * createDirectory(const std::string &parentDir, const std::string &subDir) override
Create a sub-directory in a directory.
StatusCode unregisterObject(Base *obj) override
StatusCode initialize() override
Initialise the service.
bool destroy(IBaseHistogram *hist) override
T * i_book(DataObject *pPar, const std::string &rel, const std::string &title, const std::pair< DataObject *, T * > &o)
AIDA::IBaseHistogram Base
The IRegistry represents the entry door to the environment any data object residing in a transient da...
virtual const id_type & identifier() const =0
Full identifier (or key).
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
void clear(STATE_TYPE _i=std::ios_base::failbit)
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
const std::string & name() const override
Retrieve name of the service.
SmartIF< IFace > service(const std::string &name, bool createIf=true) const
This class is used for returning status codes from appropriate routines.
void ignore() const
Allow discarding a StatusCode without warning.
constexpr static const auto SUCCESS
constexpr static const auto FAILURE
std::pair< DataObject *, AIDA::IHistogram2D * > createH2D(ISvcLocator *svcLocator, const std::string &path, 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.
std::pair< DataObject *, AIDA::IHistogram1D * > slice1DY(const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin)
Create 1D slice from 2D histogram.
std::pair< DataObject *, AIDA::IProfile2D * > createProf2D(ISvcLocator *svcLocator, const std::string &path, const AIDA::IProfile2D &hist)
Copy constructor.
std::pair< DataObject *, AIDA::IProfile1D * > createProf1D(ISvcLocator *svcLocator, const std::string &path, const AIDA::IProfile1D &hist)
Copy constructor.
T * getRepresentation(const Q &hist)
std::pair< DataObject *, AIDA::IHistogram3D * > createH3D(ISvcLocator *svcLocator, const std::string &path, const AIDA::IHistogram3D &hist)
Copy constructor.
std::pair< DataObject *, AIDA::IHistogram1D * > createH1D(ISvcLocator *svcLocator, const std::string &path, const AIDA::IHistogram1D &hist)
Copy constructor.
static R * act(R *res, const S &b, void(T1::*pmf)(const T2 *, Double_t), Double_t scale)