Skip to content
Snippets Groups Projects

Revert some interface changes of THistSvc

Merged Martin Errenst requested to merge merrenst/Gaudi:THistSvc-180131 into master
Compare and
13 files
+ 1845
1330
Compare changes
  • Side-by-side
  • Inline
Files
13
@@ -34,45 +34,50 @@ StatusCode THistRead::initialize()
}
// stream read1, 1D in "/xxx"
StatusCode sc1 = m_ths->regHist( "/read1/xxx/1Dgauss" );
TH1* h1 = m_ths->getHistTH1( "/read1/xxx/1Dgauss" );
if ( sc1.isFailure() || h1 == nullptr ) {
StatusCode sc1a = m_ths->regHist( "/read1/xxx/1Dgauss" );
TH1* h1( nullptr );
StatusCode sc1b = m_ths->getHist( "/read1/xxx/1Dgauss", h1 );
if ( sc1a.isFailure() || sc1b.isFailure() || h1 == nullptr ) {
error() << "Couldn't read gauss1d" << endmsg;
} else {
info() << h1->GetName() << ": " << h1->GetEntries() << endmsg;
}
// stream read2, 2D tree in "/"
StatusCode sc2 = m_ths->regHist( "/read2/2Dgauss" );
TH2* h2 = m_ths->getHistTH2( "/read2/2Dgauss" );
if ( sc2.isFailure() || h2 == nullptr ) {
StatusCode sc2a = m_ths->regHist( "/read2/2Dgauss" );
TH2* h2( nullptr );
StatusCode sc2b = m_ths->getHist( "/read2/2Dgauss", h2 );
if ( sc2a.isFailure() || sc2b.isFailure() || h2 == nullptr ) {
error() << "Couldn't read 2Dgauss" << endmsg;
} else {
info() << h2->GetName() << ": " << h2->GetEntries() << endmsg;
}
// 3D tree in "/"
StatusCode sc3 = m_ths->regHist( "/read2/3Dgauss" );
TH3* h3 = m_ths->getHistTH3( "/read2/3Dgauss" );
if ( sc3.isFailure() || h3 == nullptr ) {
StatusCode sc3a = m_ths->regHist( "/read2/3Dgauss" );
TH3* h3( nullptr );
StatusCode sc3b = m_ths->getHist( "/read2/3Dgauss", h3 );
if ( sc3a.isFailure() || sc3b.isFailure() || h3 == nullptr ) {
error() << "Couldn't read 3Dgauss" << endmsg;
} else {
info() << h3->GetName() << ": " << h3->GetEntries() << endmsg;
}
// Profile in "/"
StatusCode sc4 = m_ths->regHist( "/read2/profile" );
TH1* tp = m_ths->getHistTH1( "/read2/profile" );
if ( sc4.isFailure() || tp == nullptr ) {
StatusCode sc4a = m_ths->regHist( "/read2/profile" );
TH1* tp( nullptr );
StatusCode sc4b = m_ths->getHist( "/read2/profile", tp );
if ( sc4a.isFailure() || sc4b.isFailure() || tp == nullptr ) {
error() << "Couldn't read profile" << endmsg;
} else {
info() << tp->GetName() << ": " << tp->GetEntries() << endmsg;
}
// Tree with branches in "/trees/stuff"
StatusCode sc5 = m_ths->regTree( "/read2/trees/stuff/treename" );
TTree* tr = m_ths->getTree( "/read2/trees/stuff/treename" );
if ( sc5.isFailure() || tr == nullptr ) {
StatusCode sc5a = m_ths->regTree( "/read2/trees/stuff/treename" );
TTree* tr( nullptr );
StatusCode sc5b = m_ths->getTree( "/read2/trees/stuff/treename", tr );
if ( sc5a.isFailure() || sc5b.isFailure() || tr == nullptr ) {
error() << "Couldn't read tree" << endmsg;
} else {
info() << tr->GetName() << ": " << tr->GetEntries() << endmsg;
Loading