diff --git a/MuonSpectrometer/Amdcsimrec/AmdcAth/AmdcAth/AmdcsimrecAthenaSvc.h b/MuonSpectrometer/Amdcsimrec/AmdcAth/AmdcAth/AmdcsimrecAthenaSvc.h index 3f21af2ea7185cb981b38ac71211b647076187a0..a4aff8e08a5a17c0a15d11ad046145cb0ff95b45 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcAth/AmdcAth/AmdcsimrecAthenaSvc.h +++ b/MuonSpectrometer/Amdcsimrec/AmdcAth/AmdcAth/AmdcsimrecAthenaSvc.h @@ -59,8 +59,6 @@ public: bool UsableSvc(); StatusCode UpdatedSvc(IOVSVC_CALLBACK_ARGS); - StatusCode SetAmdcABlineFromCoolCallback(IOVSVC_CALLBACK_ARGS); - /**Get Amdcsimrec interface */ Amdcsimrec* GetAmdcsimrec(); @@ -108,7 +106,6 @@ private: bool m_IsInitialized ; //!< Tell initialisation state /**Set A and B lines collections*/ - StatusCode regFcnSetAmdcABlineFromCool(); StatusCode SetAmdcABlineFromCool(); /**Initialize from an Ascii file */ diff --git a/MuonSpectrometer/Amdcsimrec/AmdcAth/src/AmdcsimrecAthenaSvc.cxx b/MuonSpectrometer/Amdcsimrec/AmdcAth/src/AmdcsimrecAthenaSvc.cxx index aeebb00599b70f71e044ed9d7fad7ff2fd788932..f378dd2add50ecd75b36292643cfe7157bdf8097 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcAth/src/AmdcsimrecAthenaSvc.cxx +++ b/MuonSpectrometer/Amdcsimrec/AmdcAth/src/AmdcsimrecAthenaSvc.cxx @@ -203,20 +203,20 @@ StatusCode AmdcsimrecAthenaSvc::initialize() { if (m_AlignmentSource == 3 ){ ATH_MSG_DEBUG( "=>Strings come from Ascii file and A/B line stores as well<=" ) ; - m_IsInitialized = true ; - m_IsUsable = true ; - }else{ + } + else{ ATH_MSG_DEBUG( "=>Strings come from Ascii file and A/B line stores from cool<=" ) ; - m_IsInitialized = false ; - m_IsUsable = false ; } + m_IsInitialized = true ; + m_IsUsable = true ; + ATH_CHECK(initializeAscii()); ATH_MSG_DEBUG( "Done: initializeAscii " ) ; if (m_AlignmentSource == 2 ){ - ATH_CHECK(regFcnSetAmdcABlineFromCool()); - ATH_MSG_DEBUG( "Done: regFcnSetAmdcABlineFromCool " ) ; + ATH_CHECK(SetAmdcABlineFromCool()); + ATH_MSG_DEBUG( "Done: SetAmdcABlineFromCool " ) ; } } @@ -235,14 +235,14 @@ StatusCode AmdcsimrecAthenaSvc::initialize() { //Strings come from Geomodel and A/B line stores from cool if ( (m_NameOfTheSource=="POOL" || m_NameOfTheSource=="GEOMODEL" ) && m_AlignmentSource == 2 ){ ATH_MSG_DEBUG( "=>Strings come from Geomodel and A/B line stores from cool<=" ) ; - m_IsInitialized = false ; - m_IsUsable = false ; + m_IsInitialized = true ; + m_IsUsable = true ; ATH_CHECK(initializeFromGeomodel()); ATH_MSG_DEBUG( "Done: initializeFromGeomodel " ) ; - ATH_CHECK(regFcnSetAmdcABlineFromCool()); - ATH_MSG_DEBUG( "Done: regFcnSetAmdcABlineFromCool " ) ; + ATH_CHECK(SetAmdcABlineFromCool()); + ATH_MSG_DEBUG( "Done: SetAmdcABlineFromCool " ) ; } @@ -252,22 +252,21 @@ StatusCode AmdcsimrecAthenaSvc::initialize() { if (m_AlignmentSource == 3 ){ ATH_MSG_DEBUG( "=>Strings come from Oracle and A/B line stores as well<=" ) ; - m_IsInitialized = true ; - m_IsUsable = true ; - }else{ + } + else{ ATH_MSG_DEBUG( "=>Strings come from Oracle and A/B line stores from cool<=" ) ; - m_IsInitialized = false ; - m_IsUsable = false ; } + m_IsInitialized = true ; + m_IsUsable = true ; + ATH_CHECK(initializeFromOracleNode()); ATH_MSG_DEBUG( "Done: initializeFromOracleNode " ) ; if (m_AlignmentSource == 2 ){ - ATH_CHECK(regFcnSetAmdcABlineFromCool()); - ATH_MSG_DEBUG( "Done: regFcnSetAmdcABlineFromCool " ) ; + ATH_CHECK(SetAmdcABlineFromCool()); + ATH_MSG_DEBUG( "Done: SetAmdcABlineFromCool " ) ; } - } //Set pointer on Muondetector Manager @@ -839,46 +838,11 @@ StatusCode AmdcsimrecAthenaSvc::SetAliStoreInternal() } -StatusCode AmdcsimrecAthenaSvc::regFcnSetAmdcABlineFromCool() -{ - - ATH_MSG_DEBUG("----> regFcnSetAmdcABlineFromCool is called" ) ; - - ATH_CHECK(p_detStore->retrieve(p_MuonDetectorManager)); - ATH_MSG_DEBUG( "Done:p_MuonDetectorManager found " ) ; - - ATH_CHECK(p_detStore->regFcn( - &IGeoModelSvc::align,p_IGeoModelSvc, - &AmdcsimrecAthenaSvc::SetAmdcABlineFromCoolCallback,this - )); - ATH_MSG_DEBUG( "Done: Register callback on AmdcsimrecAthenaSvc::SetAmdcABlineFromCoolCallback from IGeoModelSvc::align" ) ; - - ATH_CHECK(p_detStore->regFcn( - &AmdcsimrecAthenaSvc::SetAmdcABlineFromCoolCallback, this, - &AmdcsimrecAthenaSvc::UpdatedSvc, this - )); - ATH_MSG_DEBUG( "Done: Register callback on AmdcsimrecAthenaSvc::UpdatedSvc from AmdcsimrecAthenaSvc::SetAmdcABlineFromCoolCallback" ) ; - - return StatusCode::SUCCESS; - -} -StatusCode AmdcsimrecAthenaSvc::SetAmdcABlineFromCoolCallback(IOVSVC_CALLBACK_ARGS) -{ - - ATH_MSG_DEBUG( "----> SetAmdcABlineFromCoolCallback is called " ) ; - - ATH_CHECK(SetAmdcABlineFromCool()); - ATH_MSG_DEBUG( "Done: SetAmdcABlineFromCool" ) ; - - m_IsUsable = true ; - - return StatusCode::SUCCESS; - -} StatusCode AmdcsimrecAthenaSvc::SetAmdcABlineFromCool() { ATH_MSG_DEBUG( "----> SetAmdcABlineFromCool is called " ) ; + ATH_CHECK(p_detStore->retrieve(p_MuonDetectorManager)); if ( m_DontSetAmdcABlineFromCool == 1 ){ ATH_MSG_DEBUG( "DontSetAmdcABlineFromCool == 1; SetAmdcABlineFromCool will not change the containers " ) ;