diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 654fe4daa071f11abd0614ac174d34828064c2df..2d01214385615e6707d2ca5cfe1a9065e9efc31b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,6 +42,7 @@ test_unittest: - cd build - set +e && source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh; set -e - set +e && asetup master,latest,Athena; set -e - - ctest -j12 + - set +e && source `find . -name 'setup.sh'`; set -e + - ctest -j12 dependencies: - build_image \ No newline at end of file diff --git a/Database/ConnectionManagement/FaserAuthentication/data/dblookup.xml b/Database/ConnectionManagement/FaserAuthentication/data/dblookup.xml index 5c2e59b4f8d391f19d5dbfcab68be61bdacb055e..6254c5493c2078e11b7e906a0eb7b830d8765bde 100644 --- a/Database/ConnectionManagement/FaserAuthentication/data/dblookup.xml +++ b/Database/ConnectionManagement/FaserAuthentication/data/dblookup.xml @@ -3,6 +3,7 @@ <logicalservice name="FASERDD"> <service name="sqlite_file:data/geomDB_sqlite" accessMode="read" /> + <service name="sqlite_file:DetectorDescription/GeoModel/FaserGeoModel/geomDB_sqlite" accessMode="read" /> </logicalservice> </servicelist> diff --git a/DetectorDescription/GeoModel/FaserGeoModel/CMakeLists.txt b/DetectorDescription/GeoModel/FaserGeoModel/CMakeLists.txt index c3facd1d2a3f24b9d88e6fa81d09951af9dcccb3..2e739f4fe1091a06b220841dbfddffcd55a3599a 100644 --- a/DetectorDescription/GeoModel/FaserGeoModel/CMakeLists.txt +++ b/DetectorDescription/GeoModel/FaserGeoModel/CMakeLists.txt @@ -27,4 +27,5 @@ atlas_install_scripts( test/*.py ) atlas_add_test( EVNT_InputGeo_test SCRIPT test/FaserGeometryConfig_EVNT_test.py - PROPERTIES TIMEOUT 300 ) + PROPERTIES TIMEOUT 300 + PROPERTIES WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) diff --git a/DetectorDescription/GeoModel/FaserGeoModel/data/geomDB.sql b/DetectorDescription/GeoModel/FaserGeoModel/data/geomDB.sql index 7aeeeedc983b041a5019d96bf4806a2e4e2ccbd0..738ea5cb7e829f57cb57e1bd47123528a63bdd89 100644 --- a/DetectorDescription/GeoModel/FaserGeoModel/data/geomDB.sql +++ b/DetectorDescription/GeoModel/FaserGeoModel/data/geomDB.sql @@ -989,7 +989,7 @@ INSERT INTO "VETOTOPLEVEL_DATA2TAG" VALUES (100009, 2); INSERT INTO "VETOSTATIONGENERAL_DATA" VALUES (0, 2, 100.0); INSERT INTO "VETOSTATIONGENERAL_DATA2TAG" VALUES (100010, 0); -- -INSERT INTO "VETOPLATEGENERAL_DATA" VALUES (0, 2, 300.0, 300.0, 20.0, "scint::Scintillator"); +INSERT INTO "VETOPLATEGENERAL_DATA" VALUES (0, 1, 300.0, 300.0, 20.0, "scint::Scintillator"); INSERT INTO "VETOPLATEGENERAL_DATA2TAG" VALUES (100025, 0); -- INSERT INTO "SCINTMATERIALS_DATA" VALUES (0, "Scintillator", 1.032); diff --git a/DetectorDescription/GeoModel/FaserGeoModel/test/FaserGeometryConfig_EVNT_test.py b/DetectorDescription/GeoModel/FaserGeoModel/test/FaserGeometryConfig_EVNT_test.py index 15e91a51f9823eac19d92d52d62a4435fddc10b4..cc1d174dbbc46af0751ba31367edbf196e14622f 100644 --- a/DetectorDescription/GeoModel/FaserGeoModel/test/FaserGeometryConfig_EVNT_test.py +++ b/DetectorDescription/GeoModel/FaserGeoModel/test/FaserGeometryConfig_EVNT_test.py @@ -5,13 +5,13 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration """ if __name__ == "__main__": import os + import sys from AthenaCommon.Logging import log from AthenaCommon.Constants import VERBOSE, INFO from AthenaCommon.Configurable import Configurable from CalypsoConfiguration.AllConfigFlags import ConfigFlags from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg - # from AtlasGeoModel.AtlasGeoModelConfig import AtlasGeometryCfg # Set up logging and new style config from FaserGeoModel.FaserGeoModelConfig import FaserGeometryCfg log.setLevel(VERBOSE) @@ -50,4 +50,4 @@ if __name__ == "__main__": f.close() ConfigFlags.dump() # Execute and finish - acc.run(maxEvents=3) + sys.exit(int(acc.run(maxEvents=3).isFailure())) diff --git a/DetectorDescription/GeoModel/GeoModelTest/CMakeLists.txt b/DetectorDescription/GeoModel/GeoModelTest/CMakeLists.txt index 6072a5a2fc0b0ee9409d4ed76426ff4217f5b120..59715098c31f3df1087004edb8fb89774f652097 100644 --- a/DetectorDescription/GeoModel/GeoModelTest/CMakeLists.txt +++ b/DetectorDescription/GeoModel/GeoModelTest/CMakeLists.txt @@ -23,8 +23,12 @@ atlas_add_component( GeoModelTest INCLUDE_DIRS ${GEOMODEL_INCLUDE_DIRS} LINK_LIBRARIES ${GEOMODEL_LIBRARIES} AthenaBaseComps GeoModelUtilities ScintReadoutGeometry ) +atlas_add_test( GeoModelCheck + SCRIPT python/GeoModelTestConfig.py + PROPERTIES WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + PROPERTIES TIMEOUT 300 ) + # Install files from the package: #atlas_install_headers( GeoModelTest ) atlas_install_joboptions( share/*.py ) atlas_install_python_modules( python/*.py ) - diff --git a/DetectorDescription/GeoModel/GeoModelTest/python/GeoModelTestConfig.py b/DetectorDescription/GeoModel/GeoModelTest/python/GeoModelTestConfig.py index 0e516aafe6fde4a12f915a7948937a6bcbe894e6..8b0d37d45dede35297a830b245d9ceda8481a869 100644 --- a/DetectorDescription/GeoModel/GeoModelTest/python/GeoModelTestConfig.py +++ b/DetectorDescription/GeoModel/GeoModelTest/python/GeoModelTestConfig.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python +import sys from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator def GeoModelTestCfg(flags): @@ -12,23 +14,20 @@ def GeoModelTestCfg(flags): if __name__ == "__main__": - from AthenaCommon.Logging import log, logging + # from AthenaCommon.Logging import log, logging from AthenaCommon.Constants import VERBOSE, INFO - log.setLevel(VERBOSE) + # log.setLevel(VERBOSE) from AthenaCommon.Configurable import Configurable Configurable.configurableRun3Behavior = True # Flag definition - from AthenaConfiguration.AllConfigFlags import ConfigFlags - ConfigFlags.addFlag("GeoModel.FaserVersion", "Faser-00") - ConfigFlags.addFlag("GeoModel.GeoExportFile", "") - ConfigFlags.addFlag("Detector.SimulateVeto", True) + from CalypsoConfiguration.AllConfigFlags import ConfigFlags # Flag specification ConfigFlags.GeoModel.FaserVersion = "FASER-00" ConfigFlags.GeoModel.GeoExportFile = "faserGeo.db" ConfigFlags.GeoModel.Align.Dynamic = False ConfigFlags.lock() - ConfigFlags.dump() + # ConfigFlags.dump() # Configuration from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg @@ -37,11 +36,9 @@ if __name__ == "__main__": acc = MainServicesSerialCfg() # acc.merge(PoolReadCfg(ConfigFlags)) acc.merge(GeoModelTestCfg(ConfigFlags)) - - logging.getLogger('forcomps').setLevel(VERBOSE) - acc.foreach_component("*").OutputLevel = VERBOSE - acc.foreach_component("*ClassID*").OutputLevel = INFO + # logging.getLogger('forcomps').setLevel(VERBOSE) + # acc.foreach_component("*").OutputLevel = VERBOSE + # acc.foreach_component("*ClassID*").OutputLevel = INFO - acc.printConfig(withDetails=True) - # Execute and finish - acc.run(maxEvents=1) +# Execute and finish + sys.exit(int(acc.run(maxEvents=1).isFailure())) diff --git a/DetectorDescription/GeoModel/GeoModelTest/src/GeoModelTestAlg.cxx b/DetectorDescription/GeoModel/GeoModelTest/src/GeoModelTestAlg.cxx index 1c2beaf6807a4b36ec7ecf54446a4f39efb2997b..219082c599f8ff2214ab500f17809dfe3698673e 100644 --- a/DetectorDescription/GeoModel/GeoModelTest/src/GeoModelTestAlg.cxx +++ b/DetectorDescription/GeoModel/GeoModelTest/src/GeoModelTestAlg.cxx @@ -4,6 +4,7 @@ #include "GeoModelUtilities/GeoModelExperiment.h" #include "ScintReadoutGeometry/VetoDetectorManager.h" +#include "ScintReadoutGeometry/ScintDetectorElement.h" #include "ScintIdentifier/VetoID.h" @@ -37,35 +38,30 @@ StatusCode GeoModelTestAlg::execute() } else { - ATH_MSG_ALWAYS("Failed to retrieve manager " << mgr); + ATH_MSG_FATAL("Failed to retrieve manager " << mgr); return StatusCode::FAILURE; } } } else { - ATH_MSG_ALWAYS("Failed to retrieve top-level FASER experiment geometry from DetStore."); + ATH_MSG_FATAL("Failed to retrieve top-level FASER experiment geometry from DetStore."); return StatusCode::FAILURE; } - // Test direct retrieval of typed managers from DetStore - const ScintDD::VetoDetectorManager* vetoMgr = nullptr; - ATH_CHECK(detStore()->retrieve(vetoMgr, "Veto")); - if (vetoMgr != nullptr) - { - ATH_MSG_ALWAYS("Retrieved (typed) Veto detector manager with " << vetoMgr->getNumTreeTops() << " treetops directly from DetStore."); - } - else - { - ATH_MSG_ALWAYS("Failed to retrieve (typed) Veto detector manager directly from DetStore."); - return StatusCode::FAILURE; - } + ATH_CHECK(testVeto()); + + return StatusCode::SUCCESS; +} - // Test neighbors +StatusCode GeoModelTestAlg::testVeto() +{ + // Test retrieval of helper object directly from store const VetoID* helper = nullptr; ATH_CHECK(detStore()->retrieve(helper, "VetoID")); if (helper != nullptr) { + // Test neighbors with helper function const IdContext& context = helper->plate_context(); ATH_MSG_ALWAYS("Retrieved VetoID helper from DetStore."); for (int iStation = 0; iStation < 2; iStation++) @@ -85,6 +81,13 @@ StatusCode GeoModelTestAlg::execute() int prevStat = helper->get_prev_in_z(thisHash, prevHash); if (prevStat == 0) { + IdentifierHash testHash; + int nextStat = helper->get_next_in_z(prevHash, testHash); + if (nextStat != 0 || testHash != thisHash) + { + ATH_MSG_FATAL("Next (" << testHash << ") of previous (" << prevHash << ") is not the original (" << thisHash <<")" ); + return StatusCode::FAILURE; + } prevStat = helper->get_id(prevHash, prevId, &context); if (prevStat == 0) { @@ -95,6 +98,13 @@ StatusCode GeoModelTestAlg::execute() int nextStat = helper->get_next_in_z(thisHash, nextHash); if (nextStat == 0) { + IdentifierHash testHash; + prevStat = helper->get_prev_in_z(nextHash, testHash); + if (prevStat != 0 || testHash != thisHash) + { + ATH_MSG_FATAL("Previous (" << testHash << ") of next (" << nextHash << ") is not the original (" << thisHash <<")" ); + return StatusCode::FAILURE; + } nextStat = helper->get_id(nextHash, nextId, &context); if (nextStat == 0) { @@ -111,14 +121,94 @@ StatusCode GeoModelTestAlg::execute() } else { - ATH_MSG_ALWAYS("Failed to retrieve VetoID helper from DetStore."); + ATH_MSG_FATAL("Failed to retrieve VetoID helper from DetStore."); return StatusCode::FAILURE; } - + // Test direct retrieval of typed managers from DetStore + const ScintDD::VetoDetectorManager* vetoMgr = nullptr; + ATH_CHECK(detStore()->retrieve(vetoMgr, "Veto")); + if (vetoMgr != nullptr) + { + ATH_MSG_ALWAYS("Retrieved (typed) Veto detector manager with " << vetoMgr->getNumTreeTops() << " treetops directly from DetStore."); + // Compare numerology with the "right" answers from our properties + if (vetoMgr->numerology().numStations() != m_numVetoStations || vetoMgr->getNumTreeTops() != m_numVetoStations) + { + ATH_MSG_FATAL("Disagreement in number of veto stations."); + return StatusCode::FAILURE; + } + if (vetoMgr->numerology().numPlatesPerStation() != m_numVetoPlatesPerStation) + { + ATH_MSG_FATAL("Disagreement in number of plates per veto station."); + return StatusCode::FAILURE; + } + if (vetoMgr->numerology().numPmtsPerPlate() != m_numVetoPmtsPerPlate) + { + ATH_MSG_FATAL("Disagreement in number of pmts per veto plate."); + return StatusCode::FAILURE; + } + // Test detector elements + const ScintDD::ScintDetectorElementCollection* elements = vetoMgr->getDetectorElementCollection(); + for (int station = 0; station < m_numVetoStations; station++) + { + for (int plate = 0; plate < m_numVetoPlatesPerStation; plate++) + { + Identifier id = helper->plate_id(station, plate, true); + if (!vetoMgr->identifierBelongs(id)) + { + ATH_MSG_FATAL("Valid Veto identifier does not pass identifierBelongs."); + return StatusCode::FAILURE; + } + IdentifierHash hash = helper->plate_hash(id); + ScintDD::ScintDetectorElement* elementByLevels = vetoMgr->getDetectorElement(station, plate); + ScintDD::ScintDetectorElement* elementById = vetoMgr->getDetectorElement(id); + ScintDD::ScintDetectorElement* elementByHash = vetoMgr->getDetectorElement(hash); + ScintDD::ScintDetectorElement* element = (*elements)[hash]; + if (elementByLevels != element || elementById != element || elementByHash != element) + { + ATH_MSG_FATAL("Inconsistent retrieval of Veto detector elements"); + return StatusCode::FAILURE; + } + ATH_MSG_ALWAYS("Found Veto plate (" << station << ", " << plate << ") with global center at (" << + element->center().x() << ", " << + element->center().y() << ", " << + element->center().z() << ")." + ); + const ScintDD::ScintDetectorElement* next = element->nextInZ(); + if (next != nullptr) + { + if (next->prevInZ() != element) + { + ATH_MSG_FATAL("Previous neighbor of next Veto element is not this element."); + return StatusCode::FAILURE; + } + } + const ScintDD::ScintDetectorElement* prev = element->prevInZ(); + if (prev != nullptr) + { + if (prev->nextInZ() != element) + { + ATH_MSG_FATAL("Next neighbor of previous Veto element is not this element."); + return StatusCode::FAILURE; + } + } + if (next == nullptr && prev == nullptr) + { + ATH_MSG_FATAL("Veto element " << hash << " has no previous OR next neighbor."); + return StatusCode::FAILURE; + } + } + } + } + else + { + ATH_MSG_FATAL("Failed to retrieve (typed) Veto detector manager directly from DetStore."); + return StatusCode::FAILURE; + } return StatusCode::SUCCESS; } + StatusCode GeoModelTestAlg::finalize() { diff --git a/DetectorDescription/GeoModel/GeoModelTest/src/GeoModelTestAlg.h b/DetectorDescription/GeoModel/GeoModelTest/src/GeoModelTestAlg.h index 866968b1cbb0d5b153eb817fe6f27ca53d2951ec..f70dd6fb837b1649a4eeab465e9505cf0b186654 100644 --- a/DetectorDescription/GeoModel/GeoModelTest/src/GeoModelTestAlg.h +++ b/DetectorDescription/GeoModel/GeoModelTest/src/GeoModelTestAlg.h @@ -12,5 +12,12 @@ class GeoModelTestAlg : public AthAlgorithm StatusCode initialize(); StatusCode execute(); StatusCode finalize(); - + + private: + StatusCode testVeto(); + + // Independently specify the "right" number of elements, for comparison with what we get from detector store + Gaudi::Property<int> m_numVetoStations {this, "NumVetoStations", 2, "Number of stations in the Veto detector"}; + Gaudi::Property<int> m_numVetoPlatesPerStation {this, "NumVetoPlatesPerStation", 2, "Number of plates per station in the Veto detector"}; + Gaudi::Property<int> m_numVetoPmtsPerPlate {this, "NumVetoPmtsPerPlate", 1, "Number of pmts per plate in the Veto detector"}; }; \ No newline at end of file diff --git a/Scintillator/ScintDetDescr/ScintReadoutGeometry/ScintReadoutGeometry/ScintDetectorManager.h b/Scintillator/ScintDetDescr/ScintReadoutGeometry/ScintReadoutGeometry/ScintDetectorManager.h index b53ca47e5d149298f2d3e635a8c0099c973d9002..d357c752292941de4eb3a6bcb83179cdb6c15079 100644 --- a/Scintillator/ScintDetDescr/ScintReadoutGeometry/ScintReadoutGeometry/ScintDetectorManager.h +++ b/Scintillator/ScintDetDescr/ScintReadoutGeometry/ScintReadoutGeometry/ScintDetectorManager.h @@ -88,13 +88,6 @@ class ScintNumerology; /** Get tag used in dictionary */ const std::string & tag() const; - // /** Methods to query which manager we have */ - // virtual bool isPixel() const = 0; - // bool isSCT() const {return !isPixel();} - - /** Add alignable transforms. No access to these, they will be changed by manager: */ - // virtual void addAlignableTransform (int level, const Identifier &id, GeoAlignableTransform *xf) = 0; - /** Invalidate cache for all detector elements */ virtual void invalidateAll() const; @@ -114,9 +107,6 @@ class ScintNumerology; GeoVAlignmentStore* alignStore=nullptr) const; /** Access to module design */ - // void addDesign(const ScintDetectorDesign *); - // int numDesigns() const; - // const ScintDetectorDesign * getDesign(int i) const; void setDesign(const ScintDetectorDesign*); const ScintDetectorDesign* getDesign() const; diff --git a/Scintillator/ScintDetDescr/ScintReadoutGeometry/ScintReadoutGeometry/VetoDetectorManager.h b/Scintillator/ScintDetDescr/ScintReadoutGeometry/ScintReadoutGeometry/VetoDetectorManager.h index 9c64091a97949408025aba2634d2069ea02f74e8..1f8e87695aa345e942f251a2e386356d7cb2de5b 100644 --- a/Scintillator/ScintDetDescr/ScintReadoutGeometry/ScintReadoutGeometry/VetoDetectorManager.h +++ b/Scintillator/ScintDetDescr/ScintReadoutGeometry/ScintReadoutGeometry/VetoDetectorManager.h @@ -43,6 +43,7 @@ namespace ScintDD { @author: Grant Gorfine - modified and maintained by Nick Styles & Andreas Salzburger + - modified for FASER by D. Casper */ class VetoDetectorManager : public ScintDetectorManager { @@ -95,16 +96,9 @@ namespace ScintDD { GeoAlignableTransform *xf, const GeoVPhysVol * child); - // DEPRECATED - // virtual void addAlignableTransform (int, const Identifier &, GeoAlignableTransform *) override {}; // For backward compatibility - /** Initialize the neighbours. This can only be done when all elements are built. */ virtual void initNeighbours() override; - // /** Methods to query which manager we have */ - // virtual bool isPixel() const = 0; - // bool isSCT() const {return !isPixel();} - /** Check identifier is for this detector */ virtual bool identifierBelongs(const Identifier & id) const override; @@ -148,7 +142,6 @@ namespace ScintDD { typedef std::map<Identifier, ExtendedAlignableTransform *> AlignableTransformMap; std::vector< AlignableTransformMap > m_higherAlignableTransforms; std::vector< ExtendedAlignableTransform *> m_alignableTransforms; - // std::vector< ExtendedAlignableTransform *> m_moduleAlignableTransforms; const VetoID* m_idHelper; /** This variable switches the how the local alignment corrections are applied diff --git a/Scintillator/ScintDetDescr/ScintReadoutGeometry/src/VetoDetectorManager.cxx b/Scintillator/ScintDetDescr/ScintReadoutGeometry/src/VetoDetectorManager.cxx index 61d6030d19aacec3c8bc739208cc0b1abefca29b..e59ea9c18c7ff713946b4b8c976888932ad2921e 100644 --- a/Scintillator/ScintDetDescr/ScintReadoutGeometry/src/VetoDetectorManager.cxx +++ b/Scintillator/ScintDetDescr/ScintReadoutGeometry/src/VetoDetectorManager.cxx @@ -201,42 +201,6 @@ namespace ScintDD { ATH_MSG_WARNING("Frames other than global or local are not supported."); return false; } - // } else if (level == 1) { // module level - - // // We retrieve it via a hashId. - // IdentifierHash idHash = m_idHelper->plate_hash(id); - // if (!idHash.is_valid()) return false; - - // int idModuleHash = idHash; - // // int idModuleHash = idHash / 2; - - // // if (idHash%2) { - // // ATH_MSG_WARNING("Side 1 wafer id used for module id"); - // // return false; - // // } - - // if (frame == ScintDD::global) { // global shift - // // Its a global transform - // return setAlignableTransformGlobalDelta(m_moduleAlignableTransforms[idModuleHash], delta, alignStore); - // } else if (frame == ScintDD::local) { // local shift - // ScintDetectorElement * element = m_elementCollection[idHash]; - // if (!element) return false; - - // // Its a local transform - // //See header file for definition of m_isLogical - // if( m_isLogical ){ - // //Ensure cache is up to date and use the alignment corrected local to global transform - // element->setCache(); - // return setAlignableTransformLocalDelta(m_moduleAlignableTransforms[idModuleHash], element->plateTransform(), delta, alignStore); - // } else - // //Use default local to global transform - // return setAlignableTransformLocalDelta(m_moduleAlignableTransforms[idModuleHash],element->defPlateTransform(), delta, alignStore); - - // } else { - // // other not supported - // ATH_MSG_WARNING("Frames other than global or local are not supported."); - // return false; - // } } else { // higher level if (frame != ScintDD::global) { ATH_MSG_WARNING("Non global shift at higher levels is not supported."); @@ -284,13 +248,6 @@ namespace ScintDD { if (idHash.is_valid()) { m_alignableTransforms[idHash]= new ExtendedAlignableTransform(transform, child); } - // } else if (level == 1) { - // // Module - // IdentifierHash idHash = m_idHelper->plate_hash(id); - // if (idHash.is_valid()) { - // // m_moduleAlignableTransforms[idHash/2]=new ExtendedAlignableTransform(transform, child); - // m_moduleAlignableTransforms[idHash]=new ExtendedAlignableTransform(transform, child); - // } } else { // Higher levels are saved in a map. NB level=0 is treated above. int index = level - FIRST_HIGHER_LEVEL; // level 0 is treated separately. diff --git a/Scintillator/ScintDetDescr/VetoGeoModel/python/VetoGeoModelConfig.py b/Scintillator/ScintDetDescr/VetoGeoModel/python/VetoGeoModelConfig.py index 6e942ae358812a29847705ca4972f52d819c1378..fe6dca0b6ad1c8ced0ffa9253ed0085d2f4f9e6e 100644 --- a/Scintillator/ScintDetDescr/VetoGeoModel/python/VetoGeoModelConfig.py +++ b/Scintillator/ScintDetDescr/VetoGeoModel/python/VetoGeoModelConfig.py @@ -20,6 +20,12 @@ def VetoGeometryCfg( flags ): from GeometryDBSvc.GeometryDBSvcConf import GeometryDBSvc acc.addService(GeometryDBSvc("ScintGeometryDBSvc")) + from RDBAccessSvc.RDBAccessSvcConf import RDBAccessSvc + acc.addService(RDBAccessSvc("RDBAccessSvc")) + + from DBReplicaSvc.DBReplicaSvcConf import DBReplicaSvc + acc.addService(DBReplicaSvc("DBReplicaSvc")) + from VetoGeoModel.VetoGeoModelConf import VetoDetectorTool vetoDetectorTool = VetoDetectorTool() diff --git a/Scintillator/ScintDetDescr/VetoGeoModel/src/VetoPlate.cxx b/Scintillator/ScintDetDescr/VetoGeoModel/src/VetoPlate.cxx index 457336c34943806ac04267bfd048dc5fbfabe325..9b32c4a1e38c4efe2c4003a09d3d49c22a054a34 100644 --- a/Scintillator/ScintDetDescr/VetoGeoModel/src/VetoPlate.cxx +++ b/Scintillator/ScintDetDescr/VetoGeoModel/src/VetoPlate.cxx @@ -45,7 +45,7 @@ VetoPlate::getParameters() m_thickness = parameters->plateThickness(); m_length = parameters->plateLength(); m_width = parameters->plateWidth(); - + m_detectorManager->numerology().setNumPmtsPerPlate(parameters->platePmts()); } const GeoLogVol * diff --git a/Simulation/G4Faser/G4FaserApp/CMakeLists.txt b/Simulation/G4Faser/G4FaserApp/CMakeLists.txt index 02b9a8f5536ff09b5cd7bb3ce45320ebcbedf903..8382ef9a766dd19a7268fe8a3f624e4f8319c8c3 100644 --- a/Simulation/G4Faser/G4FaserApp/CMakeLists.txt +++ b/Simulation/G4Faser/G4FaserApp/CMakeLists.txt @@ -47,7 +47,8 @@ find_package( Eigen ) atlas_add_test( G4FaserAlgConfig_Test SCRIPT test/runG4.py - PROPERTIES TIMEOUT 300 ) + PROPERTIES TIMEOUT 300 + PROPERTIES WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/Simulation/G4Faser/G4FaserApp/test/runG4.py b/Simulation/G4Faser/G4FaserApp/test/runG4.py index 5a27b8c6864e76a7c9563b3de812b65ccbf61628..311e0e091d503b628cbfb9470605905a227941fe 100644 --- a/Simulation/G4Faser/G4FaserApp/test/runG4.py +++ b/Simulation/G4Faser/G4FaserApp/test/runG4.py @@ -1,6 +1,7 @@ #!/usr/bin/env python if __name__ == "__main__": import os + import sys import GaudiPython import ParticleGun as PG from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator @@ -134,4 +135,4 @@ if __name__ == "__main__": # # Execute and finish # - acc.run(maxEvents=1000) + sys.exit(int(acc.run(maxEvents=1000).isFailure())) diff --git a/Tracker/TrackerDetDescr/FaserSCT_GeoModel/python/FaserSCT_GeoModelConfig.py b/Tracker/TrackerDetDescr/FaserSCT_GeoModel/python/FaserSCT_GeoModelConfig.py index ad3cc8477aa58ce79a93eb3175a0bf8b9c7a06bf..647e449c21f3f140b203c678455f038884f3b62a 100644 --- a/Tracker/TrackerDetDescr/FaserSCT_GeoModel/python/FaserSCT_GeoModelConfig.py +++ b/Tracker/TrackerDetDescr/FaserSCT_GeoModel/python/FaserSCT_GeoModelConfig.py @@ -17,8 +17,16 @@ def FaserSCT_GeometryCfg( flags ): from FaserGeoModel.GeoModelConfig import GeoModelCfg acc = GeoModelCfg( flags ) geoModelSvc=acc.getPrimary() + from GeometryDBSvc.GeometryDBSvcConf import GeometryDBSvc acc.addService(GeometryDBSvc("TrackerGeometryDBSvc")) + + from RDBAccessSvc.RDBAccessSvcConf import RDBAccessSvc + acc.addService(RDBAccessSvc("RDBAccessSvc")) + + from DBReplicaSvc.DBReplicaSvcConf import DBReplicaSvc + acc.addService(DBReplicaSvc("DBReplicaSvc")) + from FaserSCT_GeoModel.FaserSCT_GeoModelConf import FaserSCT_DetectorTool sctDetectorTool = FaserSCT_DetectorTool()