diff --git a/DetectorDescription/DetDescrCond/DetDescrCondExample/CMakeLists.txt b/DetectorDescription/DetDescrCond/DetDescrCondExample/CMakeLists.txt index 38ea725012fc895f8f3e8f6c4f03c78f51cf40bf..bd6bbfeffee41f76fb73dcb0ac6ef8e4608e882c 100644 --- a/DetectorDescription/DetDescrCond/DetDescrCondExample/CMakeLists.txt +++ b/DetectorDescription/DetDescrCond/DetDescrCondExample/CMakeLists.txt @@ -14,7 +14,7 @@ atlas_add_component( DetDescrCondExample src/CoolHistExample.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities DetDescrCondToolsLib DetDescrConditions GaudiKernel GeoModelInterfaces GeoPrimitives Identifier InDetReadoutGeometry ) + LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities DetDescrCondToolsLib DetDescrConditions GaudiKernel GeoPrimitives Identifier InDetReadoutGeometry ) # Install files from the package: atlas_install_joboptions( share/*.py ) diff --git a/DetectorDescription/DetDescrCond/DetDescrCondExample/src/CoolHistExample.cxx b/DetectorDescription/DetDescrCond/DetDescrCondExample/src/CoolHistExample.cxx index ff9f9b5467c1790e3b643e25c9c07e176c9dc786..b5208ebb30f7cfa200636e2c732dfcc4d7aec6a4 100755 --- a/DetectorDescription/DetDescrCond/DetDescrCondExample/src/CoolHistExample.cxx +++ b/DetectorDescription/DetDescrCond/DetDescrCondExample/src/CoolHistExample.cxx @@ -7,12 +7,12 @@ // Richard Hawkings, started 09/2/07 // +#include "CoolHistExample.h" #include "GaudiKernel/ISvcLocator.h" #include "AthenaPoolUtilities/CondAttrListCollection.h" #include "DetDescrCondTools/ICoolHistSvc.h" #include "TH1.h" #include "TDirectory.h" -#include "DetDescrCondExample/CoolHistExample.h" CoolHistExample::CoolHistExample(const std::string& name, ISvcLocator* pSvcLocator) :AthAlgorithm(name,pSvcLocator), diff --git a/DetectorDescription/DetDescrCond/DetDescrCondExample/DetDescrCondExample/CoolHistExample.h b/DetectorDescription/DetDescrCond/DetDescrCondExample/src/CoolHistExample.h similarity index 100% rename from DetectorDescription/DetDescrCond/DetDescrCondExample/DetDescrCondExample/CoolHistExample.h rename to DetectorDescription/DetDescrCond/DetDescrCondExample/src/CoolHistExample.h diff --git a/DetectorDescription/DetDescrCond/DetDescrCondExample/src/ReadAlignTrans.cxx b/DetectorDescription/DetDescrCond/DetDescrCondExample/src/ReadAlignTrans.cxx index 480e9da90fa8a5bb43dfdcd0afb0b170d9349384..5b014dfb80545b96aa3e96ac7071398c8e6ee147 100755 --- a/DetectorDescription/DetDescrCond/DetDescrCondExample/src/ReadAlignTrans.cxx +++ b/DetectorDescription/DetDescrCond/DetDescrCondExample/src/ReadAlignTrans.cxx @@ -1,24 +1,22 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // ReadAlignTrans - simple example of algorithm reading AlignableTransforms // Richard Hawkings, started 19/1/04 -#include <list> +#include "ReadAlignTrans.h" #include "GaudiKernel/ISvcLocator.h" #include "Identifier/Identifier.h" -#include "GeoModelInterfaces/IGeoModelSvc.h" #include "InDetReadoutGeometry/SiDetectorManager.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "InDetReadoutGeometry/SiDetectorElementCollection.h" +#include <list> -#include "DetDescrCondExample/ReadAlignTrans.h" - -ReadAlignTrans::ReadAlignTrans(const std::string& name, - ISvcLocator* pSvcLocator) :AthAlgorithm(name,pSvcLocator), - p_geomodelsvc(0), - m_sidetman() +ReadAlignTrans::ReadAlignTrans(const std::string& name + , ISvcLocator* pSvcLocator) + : AthAlgorithm(name,pSvcLocator) + , m_sidetman() {} ReadAlignTrans::~ReadAlignTrans(void) @@ -28,32 +26,10 @@ StatusCode ReadAlignTrans::initialize() { ATH_MSG_INFO("ReadAlignTrans::initialize() called"); - // get ptr to GeoModelSvc to be able to register callback - if (StatusCode::SUCCESS!=service("GeoModelSvc",p_geomodelsvc)) { - ATH_MSG_ERROR("Cannot get ptr to GeoModelSvc"); - return StatusCode::FAILURE; - } - // get SiDetectorManagers for checking module positions - if (StatusCode::SUCCESS!=detStore()->retrieve(m_sidetman[0],"Pixel")) { - ATH_MSG_ERROR("Cannot get Pixel SiDetectorManager"); - return StatusCode::FAILURE; - } - if (StatusCode::SUCCESS!=detStore()->retrieve(m_sidetman[1],"SCT")) { - ATH_MSG_ERROR("Cannot get SCT SiDetectorManager"); - return StatusCode::FAILURE; - } + ATH_CHECK(detStore()->retrieve(m_sidetman[0],"Pixel")); + ATH_CHECK(detStore()->retrieve(m_sidetman[1],"SCT")); - // register callbacks on IGeoModelSvc::align to be called back after - // alignment has been recalculated - - if (StatusCode::SUCCESS==detStore()->regFcn(&IGeoModelSvc::align, - p_geomodelsvc,&ReadAlignTrans::testCallBack,this)) { - ATH_MSG_INFO("Registered callback for IGeoModelSvc"); - } else { - ATH_MSG_ERROR("Register callback failed"); - return StatusCode::FAILURE; - } return StatusCode::SUCCESS; } @@ -98,17 +74,6 @@ StatusCode ReadAlignTrans::finalize() { return StatusCode::SUCCESS; } -StatusCode ReadAlignTrans::testCallBack( IOVSVC_CALLBACK_ARGS_P( /* I */ , - keys ) ) { - // print out the keys we were given (for info) - // could do nothing if key is not /Indet/Align to save time - std::string keylist; - for (std::list<std::string>::const_iterator itr=keys.begin(); - itr!=keys.end(); ++itr) keylist+=" "+*itr; - ATH_MSG_INFO("ReadAlignTrans callback invoked for keys:"+keylist); - return readSiPositions(m_identcache,m_poscache); -} - StatusCode ReadAlignTrans::readSiPositions(std::vector<Identifier>& idvec, std::vector<Amg::Vector3D >& posvec) { // find the identifier and position of all the pixel and SCT modules diff --git a/DetectorDescription/DetDescrCond/DetDescrCondExample/DetDescrCondExample/ReadAlignTrans.h b/DetectorDescription/DetDescrCond/DetDescrCondExample/src/ReadAlignTrans.h similarity index 84% rename from DetectorDescription/DetDescrCond/DetDescrCondExample/DetDescrCondExample/ReadAlignTrans.h rename to DetectorDescription/DetDescrCond/DetDescrCondExample/src/ReadAlignTrans.h index cd8c0b454eeb85dfc2c5a9d5d115e82edcf18612..505ad5ccb0744afb5a08535e8ac064257b938fec 100755 --- a/DetectorDescription/DetDescrCond/DetDescrCondExample/DetDescrCondExample/ReadAlignTrans.h +++ b/DetectorDescription/DetDescrCond/DetDescrCondExample/src/ReadAlignTrans.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef DETDESCRCONDEXAMPLE_READALIGNTRANS_H @@ -15,8 +15,6 @@ #include "GeoPrimitives/GeoPrimitives.h" #include "AthenaKernel/IOVSvcDefs.h" -class IGeoModelTool; -class IGeoModelSvc; namespace InDetDD { class SiDetectorManager; } @@ -30,12 +28,10 @@ class ReadAlignTrans: public AthAlgorithm StatusCode execute(void); StatusCode finalize(void); - StatusCode testCallBack( IOVSVC_CALLBACK_ARGS ); StatusCode readSiPositions(std::vector<Identifier>&, std::vector<Amg::Vector3D >&); private: - IGeoModelSvc* p_geomodelsvc; const InDetDD::SiDetectorManager* m_sidetman[2]; std::vector<Identifier> m_identcache; std::vector<Amg::Vector3D> m_poscache; diff --git a/DetectorDescription/DetDescrCond/DetDescrCondExample/src/ReadTopTrans.cxx b/DetectorDescription/DetDescrCond/DetDescrCondExample/src/ReadTopTrans.cxx index 372040c1cfa25f41d35d86ea3b8960edd94fc3d0..b9a675922c2d45a7a083db0d2f6040a98eecee5b 100755 --- a/DetectorDescription/DetDescrCond/DetDescrCondExample/src/ReadTopTrans.cxx +++ b/DetectorDescription/DetDescrCond/DetDescrCondExample/src/ReadTopTrans.cxx @@ -12,10 +12,10 @@ // - BeginRun incident +#include "ReadTopTrans.h" #include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/IIncidentSvc.h" #include "DetDescrConditions/DetCondKeyTrans.h" -#include "DetDescrCondExample/ReadTopTrans.h" ReadTopTrans::ReadTopTrans(const std::string& name, ISvcLocator* pSvcLocator) :AthAlgorithm(name,pSvcLocator) {} diff --git a/DetectorDescription/DetDescrCond/DetDescrCondExample/DetDescrCondExample/ReadTopTrans.h b/DetectorDescription/DetDescrCond/DetDescrCondExample/src/ReadTopTrans.h similarity index 100% rename from DetectorDescription/DetDescrCond/DetDescrCondExample/DetDescrCondExample/ReadTopTrans.h rename to DetectorDescription/DetDescrCond/DetDescrCondExample/src/ReadTopTrans.h diff --git a/DetectorDescription/DetDescrCond/DetDescrCondExample/src/ReadWriteCoolStrFile.cxx b/DetectorDescription/DetDescrCond/DetDescrCondExample/src/ReadWriteCoolStrFile.cxx index 615a54e5babf3012e6fc4d7e64fe8c3e97fd6c3e..8469d3c51e2c368efdc10c242535818fa458ede2 100755 --- a/DetectorDescription/DetDescrCond/DetDescrCondExample/src/ReadWriteCoolStrFile.cxx +++ b/DetectorDescription/DetDescrCond/DetDescrCondExample/src/ReadWriteCoolStrFile.cxx @@ -6,10 +6,10 @@ // read/write of CondStrFile // Richard Hawkings, started 14/11/05 +#include "ReadWriteCoolStrFile.h" #include "GaudiKernel/ISvcLocator.h" #include "DetDescrConditions/DetCondKeyTrans.h" #include "DetDescrCondTools/ICoolStrFileSvc.h" -#include "DetDescrCondExample/ReadWriteCoolStrFile.h" ReadWriteCoolStrFile::ReadWriteCoolStrFile(const std::string& name, ISvcLocator* pSvcLocator) :AthAlgorithm(name,pSvcLocator), diff --git a/DetectorDescription/DetDescrCond/DetDescrCondExample/DetDescrCondExample/ReadWriteCoolStrFile.h b/DetectorDescription/DetDescrCond/DetDescrCondExample/src/ReadWriteCoolStrFile.h similarity index 100% rename from DetectorDescription/DetDescrCond/DetDescrCondExample/DetDescrCondExample/ReadWriteCoolStrFile.h rename to DetectorDescription/DetDescrCond/DetDescrCondExample/src/ReadWriteCoolStrFile.h diff --git a/DetectorDescription/DetDescrCond/DetDescrCondExample/src/components/DetDescrCondExample_entries.cxx b/DetectorDescription/DetDescrCond/DetDescrCondExample/src/components/DetDescrCondExample_entries.cxx index b773e3cade471755635ec60cd10fd081b5809b8e..c4f8d55c93f1436ce8fabefa80d9cb81c959c50a 100644 --- a/DetectorDescription/DetDescrCond/DetDescrCondExample/src/components/DetDescrCondExample_entries.cxx +++ b/DetectorDescription/DetDescrCond/DetDescrCondExample/src/components/DetDescrCondExample_entries.cxx @@ -1,7 +1,7 @@ -#include "DetDescrCondExample/ReadAlignTrans.h" -#include "DetDescrCondExample/ReadTopTrans.h" -#include "DetDescrCondExample/ReadWriteCoolStrFile.h" -#include "DetDescrCondExample/CoolHistExample.h" +#include "../ReadAlignTrans.h" +#include "../ReadTopTrans.h" +#include "../ReadWriteCoolStrFile.h" +#include "../CoolHistExample.h" DECLARE_COMPONENT( ReadAlignTrans ) DECLARE_COMPONENT( ReadTopTrans )