diff --git a/Simulation/G4Utilities/Geo2G4/src/ExtParameterisedVolumeBuilder.cxx b/Simulation/G4Utilities/Geo2G4/src/ExtParameterisedVolumeBuilder.cxx index 6523efc8811df9686fe1e0db77eab1e161398169..34102ce653a153469d4df293646c81a4ce032b18 100644 --- a/Simulation/G4Utilities/Geo2G4/src/ExtParameterisedVolumeBuilder.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/ExtParameterisedVolumeBuilder.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #include "ExtParameterisedVolumeBuilder.h" @@ -22,7 +22,6 @@ #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoSerialTransformer.h" #include "GeoModelInterfaces/StoredMaterialManager.h" -#include "AthenaBaseComps/AthMsgStreamMacros.h" #include "StoreGate/StoreGateSvc.h" #include @@ -31,10 +30,10 @@ ExtParameterisedVolumeBuilder::ExtParameterisedVolumeBuilder(const std::string& n, Geo2G4AssemblyFactory* G4AssemblyFactory): VolumeBuilder(n), + AthMessaging(n), m_getMatEther(true), m_matEther(nullptr), m_matHypUr(nullptr), - m_msg(n), m_G4AssemblyFactory(G4AssemblyFactory) { } diff --git a/Simulation/G4Utilities/Geo2G4/src/ExtParameterisedVolumeBuilder.h b/Simulation/G4Utilities/Geo2G4/src/ExtParameterisedVolumeBuilder.h index bc2d60a38d53cb482f8d5e18e13564a0bddcdaa7..60216ad6e1668df2dd540e428d65979e16193181 100644 --- a/Simulation/G4Utilities/Geo2G4/src/ExtParameterisedVolumeBuilder.h +++ b/Simulation/G4Utilities/Geo2G4/src/ExtParameterisedVolumeBuilder.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #ifndef GEO2G4_ExtParameterisedVolumeBuilder_H @@ -8,13 +8,13 @@ #include "VolumeBuilder.h" #include "Geo2G4AssemblyFactory.h" -#include "AthenaKernel/MsgStreamMember.h" +#include "AthenaBaseComps/AthMessaging.h" #include class Geo2G4AssemblyVolume; class GeoMaterial; -class ExtParameterisedVolumeBuilder: public VolumeBuilder +class ExtParameterisedVolumeBuilder: public VolumeBuilder, public AthMessaging { public: ExtParameterisedVolumeBuilder(const std::string& n, Geo2G4AssemblyFactory* G4AssemblyFactory); @@ -22,10 +22,7 @@ public: G4LogicalVolume* Build(PVConstLink pv, OpticalVolumesMap* optical_volumes = 0) const; /// Geo2G4AssemblyVolume* BuildAssembly(const PVConstLink& pv) const; - /// Log a message using the Athena controlled logging system - MsgStream& msg( MSG::Level lvl ) const { return m_msg << lvl; } - /// Check whether the logging system is active at the provided verbosity level - bool msgLvl( MSG::Level lvl ) const { return m_msg.get().level() <= lvl; } + private: /// Prints info when some PhysVol contains both types (PV and ST) of daughters void PrintSTInfo(const std::string& volume) const; @@ -35,9 +32,7 @@ public: mutable bool m_getMatEther; mutable const GeoMaterial* m_matEther; mutable const GeoMaterial* m_matHypUr; - /// Private message stream member - mutable Athena::MsgStreamMember m_msg; - + Geo2G4AssemblyFactory* m_G4AssemblyFactory; }; diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.cxx b/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.cxx index 2889827bd60549ed3cad43e640802da2614ec3a3..f2fdca205dd728046d867d3dd47aab6652280eee 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.cxx @@ -33,11 +33,11 @@ #include Geo2G4Builder::Geo2G4Builder(const std::string& detectorName) - : m_detectorName(detectorName) + : AthMessaging("Geo2G4Builder") + , m_detectorName(detectorName) , m_motherTransform(GeoTrf::Transform3D::Identity()) , m_matAir(nullptr) , m_pDetStore(nullptr) - , m_msg("Geo2G4Builder") { ISvcLocator* svcLocator = Gaudi::svcLocator(); // from Bootstrap StatusCode sc=svcLocator->service("DetectorStore",m_pDetStore); diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.h b/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.h index e74083e2c942369564b9502d43cbfc4ad88700b3..3cd7cbe0e717199ad64aa0699e7648221b4cfc10 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.h +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #ifndef GEO2G4_Geo2G4Builder_H @@ -17,7 +17,7 @@ // Typedef #include "GeoModelUtilities/GeoBorderSurfaceContainer.h" -#include "AthenaKernel/MsgStreamMember.h" +#include "AthenaBaseComps/AthMessaging.h" #include "GeoPrimitives/CLHEPtoEigenConverter.h" @@ -28,7 +28,7 @@ class GeoMaterial; class StoreGateSvc; -class Geo2G4Builder { +class Geo2G4Builder : public AthMessaging { public: // Constructor: @@ -47,10 +47,6 @@ public: VolumeBuilder* GetVolumeBuilder(std::string); HepGeom::Transform3D GetDetectorTransform() {return Amg::EigenTransformToCLHEP(m_motherTransform);} - /// Log a message using the Athena controlled logging system - MsgStream& msg( MSG::Level lvl ) const { return m_msg << lvl; } - /// Check whether the logging system is active at the provided verbosity level - bool msgLvl( MSG::Level lvl ) const { return m_msg.get().level() <= lvl; } private: @@ -63,9 +59,6 @@ private: // std::Air in the case when top boolean envelope has to be built const GeoMaterial* m_matAir; StoreGateSvc* m_pDetStore; - - /// Private message stream member - mutable Athena::MsgStreamMember m_msg; }; #endif diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4SolidFactory.cxx b/Simulation/G4Utilities/Geo2G4/src/Geo2G4SolidFactory.cxx index 84dc33ebb71e85db86c0f79b4185e4a195ec5f09..813004ca0ff5dce8bdd61374b27574862f1cadcd 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4SolidFactory.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4SolidFactory.cxx @@ -37,7 +37,6 @@ #include "RDBAccessSvc/IRDBRecordset.h" #include "RDBAccessSvc/IRDBAccessSvc.h" #include "GeoModelUtilities/DecodeVersionKey.h" -#include "AthenaBaseComps/AthMsgStreamMacros.h" #include "GeoSpecialShapes/EMECData.h" @@ -145,7 +144,7 @@ const Geo2G4SolidFactory::LArWheelSolid_typemap Geo2G4SolidFactory::s_lwsTypes = }; Geo2G4SolidFactory::Geo2G4SolidFactory() : - m_msg("Geo2G4SolidFactory"), + AthMessaging("Geo2G4SolidFactory"), m_detStore( "StoreGateSvc/DetectorStore", "Geo2G4SolidFactory" ) { } diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4SolidFactory.h b/Simulation/G4Utilities/Geo2G4/src/Geo2G4SolidFactory.h index 924e258cbecb9f80d75cff918dd26fc25201b7c4..b0b8330221164bb175de2a1cda76841667f49d1f 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4SolidFactory.h +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4SolidFactory.h @@ -9,9 +9,8 @@ #include #include "GaudiKernel/ServiceHandle.h" -//#include "GaudiKernel/StatusCode.h" -#include "AthenaKernel/MsgStreamMember.h" +#include "AthenaBaseComps/AthMessaging.h" #include "StoreGate/StoreGateSvc.h" #include "LArWheelSolid_type.h" @@ -19,7 +18,7 @@ class G4VSolid; class GeoShape; class GeoUnidentifiedShape; struct EMECData; -class Geo2G4SolidFactory +class Geo2G4SolidFactory : public AthMessaging { public: typedef ServiceHandle StoreGateSvc_t; @@ -28,10 +27,6 @@ public: Geo2G4SolidFactory(); G4VSolid* Build(const GeoShape*, std::string name=std::string("")) const; - /// Log a message using the Athena controlled logging system - MsgStream& msg( MSG::Level lvl ) const { return m_msg << lvl; } - /// Check whether the logging system is active at the provided verbosity level - bool msgLvl( MSG::Level lvl ) const { return m_msg.get().level() <= lvl; } /** @brief The standard @c StoreGateSvc/DetectorStore * Returns (kind of) a pointer to the @c StoreGateSvc @@ -41,10 +36,7 @@ private: G4VSolid* createLArWheelSolid(const std::string& name, const LArWheelSolidDef_t & lwsdef, const EMECData &emecData) const; G4VSolid* createLArWheelSliceSolid(const GeoUnidentifiedShape* ,const EMECData &emecData) const; - static const LArWheelSolid_typemap s_lwsTypes; - - /// Private message stream member - mutable Athena::MsgStreamMember m_msg; + static const LArWheelSolid_typemap s_lwsTypes; /// Pointer to StoreGate (detector store by default) mutable StoreGateSvc_t m_detStore; }; diff --git a/Simulation/G4Utilities/Geo2G4/src/LArWheelSliceSolid.h b/Simulation/G4Utilities/Geo2G4/src/LArWheelSliceSolid.h index 7d05aaa2d305de53486c75ab19c63b86aa39e9f7..328b4aee8a9f409ad96790d3551227f782705b29 100644 --- a/Simulation/G4Utilities/Geo2G4/src/LArWheelSliceSolid.h +++ b/Simulation/G4Utilities/Geo2G4/src/LArWheelSliceSolid.h @@ -5,7 +5,7 @@ #ifndef GEO2G4_LARWHEELSLICESOLID_H #define GEO2G4_LARWHEELSLICESOLID_H #ifndef PORTABLE_LAR_SHAPE -#include "AthenaKernel/MsgStreamMember.h" +#include "AthenaBaseComps/AthMessaging.h" #endif #include "G4VSolid.hh" @@ -39,6 +39,9 @@ class TF1; class G4Polyhedra; struct EMECData; class LArWheelSliceSolid : public G4VSolid +#ifndef PORTABLE_LAR_SHAPE + , public AthMessaging +#endif { public: typedef enum { Inner, Outer } pos_t; @@ -146,17 +149,11 @@ class LArWheelSliceSolid : public G4VSolid void test(void); void clean_tests(void); void init_tests(void); - /// Log a message using the Athena controlled logging system - MsgStream& msg( MSG::Level lvl ) const { return m_msg << lvl; } - /// Check whether the logging system is active at the provided verbosity level - bool msgLvl( MSG::Level lvl ) const { return m_msg.get().level() <= lvl; } #endif protected: - /// Private message stream member -#ifndef PORTABLE_LAR_SHAPE - mutable Athena::MsgStreamMember m_msg; +#ifndef PORTABLE_LAR_SHAPE TF1 *m_f_area, *m_f_vol, *m_f_area_on_pc, *m_f_length, *m_f_side_area; #endif diff --git a/Simulation/G4Utilities/Geo2G4/src/LArWheelSliceSolidInit.cxx b/Simulation/G4Utilities/Geo2G4/src/LArWheelSliceSolidInit.cxx index 252ff49b421322ea3b08938fc02ab456abb255c7..a7fb0d2c9cc749cb5472135967b39cf9435f77dd 100644 --- a/Simulation/G4Utilities/Geo2G4/src/LArWheelSliceSolidInit.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/LArWheelSliceSolidInit.cxx @@ -25,7 +25,6 @@ #include "GeoSpecialShapes/EMECData.h" #include "CLHEP/Units/PhysicalConstants.h" #ifndef PORTABLE_LAR_SHAPE -#include "AthenaBaseComps/AthMsgStreamMacros.h" #include "AthenaBaseComps/AthCheckMacros.h" #endif #include "G4GeometryTolerance.hh" @@ -51,20 +50,21 @@ LArWheelSliceSolid::LArWheelSliceSolid( G4int zside, const LArWheelCalculator *calc, const EMECData *emecData -) : G4VSolid(name), m_Pos(pos), m_Type(type), - m_Calculator(calc) -#ifndef PORTABLE_LAR_SHAPE - ,m_msg("LArWSS") +) : G4VSolid(name) +#ifndef PORTABLE_LAR_SHAPE + , AthMessaging("LArWSS") #endif + , m_Pos(pos), m_Type(type), m_Calculator(calc) { createSolid(name, zside, slice, emecData); } LArWheelSliceSolid::LArWheelSliceSolid(const G4String& name, const EMECData *emecData) - : G4VSolid(name), m_Calculator(0) + : G4VSolid(name) #ifndef PORTABLE_LAR_SHAPE - , m_msg("LArWSS") + , AthMessaging("LArWSS") #endif + , m_Calculator(0) { if(name.find("::Inner") != G4String::npos) m_Pos = Inner; else if(name.find("::Outer") != G4String::npos) m_Pos = Outer; diff --git a/Simulation/G4Utilities/Geo2G4/src/LArWheelSolid.h b/Simulation/G4Utilities/Geo2G4/src/LArWheelSolid.h index f52005db4d015bbd507715f2a4ffcc5f9f1ca79c..08e81fdf6f51675036f1adf4380a4f1a8dd98581 100644 --- a/Simulation/G4Utilities/Geo2G4/src/LArWheelSolid.h +++ b/Simulation/G4Utilities/Geo2G4/src/LArWheelSolid.h @@ -5,7 +5,7 @@ #ifndef GEO2G4_LARWHEELSOLID_H #define GEO2G4_LARWHEELSOLID_H #ifndef PORTABLE_LAR_SHAPE -#include "AthenaKernel/MsgStreamMember.h" +#include "AthenaBaseComps/AthMessaging.h" #endif #include "G4VSolid.hh" @@ -87,6 +87,9 @@ inline const char *LArWheelSolidTypeString(LArWheelSolid_t type) } class LArWheelSolid : public G4VSolid +#ifndef PORTABLE_LAR_SHAPE +, public AthMessaging +#endif { public: @@ -216,17 +219,9 @@ private: void test(void); void clean_tests(void); void init_tests(void); - /// Log a message using the Athena controlled logging system - MsgStream& msg( MSG::Level lvl ) const { return m_msg << lvl; } - /// Check whether the logging system is active at the provided verbosity level - bool msgLvl( MSG::Level lvl ) const { return m_msg.get().level() <= lvl; } #endif protected: - /// Private message stream member -#ifndef PORTABLE_LAR_SHAPE - mutable Athena::MsgStreamMember m_msg; -#endif TF1 *m_f_area, *m_f_vol, *m_f_area_on_pc, *m_f_length, *m_f_side_area; diff --git a/Simulation/G4Utilities/Geo2G4/src/LArWheelSolidInit.cxx b/Simulation/G4Utilities/Geo2G4/src/LArWheelSolidInit.cxx index 3055281847d5e30fa53a74391e781c21a4b0fdda..ba275349da6d0f898ef5c243939d1fedf52804a4 100644 --- a/Simulation/G4Utilities/Geo2G4/src/LArWheelSolidInit.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/LArWheelSolidInit.cxx @@ -18,10 +18,6 @@ #include "LArFanSection.h" #include "G4ShiftedCone.h" -#ifndef PORTABLE_LAR_SHAPE -#include "AthenaBaseComps/AthMsgStreamMacros.h" -#endif - #ifdef DEBUG_LARWHEELSOLID G4int LArWheelSolid::Verbose = 0; #endif @@ -38,10 +34,11 @@ LArWheelSolid::LArWheelSolid(const G4String& name, LArWheelSolid_t type, LArWheelCalculator *calc, const EMECData *emecData ) - : G4VSolid(name), m_Type(type), m_Calculator(calc), m_PhiPosition(CLHEP::halfpi), m_fs(0) + : G4VSolid(name) #ifndef PORTABLE_LAR_SHAPE - , m_msg("LArWheelSolid") + , AthMessaging("LArWheelSolid") #endif + , m_Type(type), m_Calculator(calc), m_PhiPosition(CLHEP::halfpi), m_fs(0) { #ifndef PORTABLE_LAR_SHAPE #ifdef LARWHEELSOLID_USE_FANBOUND diff --git a/Simulation/G4Utilities/Geo2G4/src/SingleLogicalVolumeFactory.cxx b/Simulation/G4Utilities/Geo2G4/src/SingleLogicalVolumeFactory.cxx index f01fe8aab47711193a18183ca6e684cd88020fe3..ba24416eb11a15276ed6b04982f8b899d4a8aa6b 100644 --- a/Simulation/G4Utilities/Geo2G4/src/SingleLogicalVolumeFactory.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/SingleLogicalVolumeFactory.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #include "SingleLogicalVolumeFactory.h" @@ -11,7 +11,7 @@ #include "G4LogicalVolume.hh" #include "G4Material.hh" -SingleLogicalVolumeFactory::SingleLogicalVolumeFactory(): m_msg("SingleLogicalVolumeFactory") +SingleLogicalVolumeFactory::SingleLogicalVolumeFactory(): AthMessaging("SingleLogicalVolumeFactory") { } diff --git a/Simulation/G4Utilities/Geo2G4/src/SingleLogicalVolumeFactory.h b/Simulation/G4Utilities/Geo2G4/src/SingleLogicalVolumeFactory.h index 7a089ee90146d5ce2cfeb9acc38ee129cc429fe2..332df9badb1d3dbbfdf0e276073f551e24f18c50 100644 --- a/Simulation/G4Utilities/Geo2G4/src/SingleLogicalVolumeFactory.h +++ b/Simulation/G4Utilities/Geo2G4/src/SingleLogicalVolumeFactory.h @@ -1,11 +1,11 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #ifndef GEO2G4_SingleLogicalVolumeFactory_h #define GEO2G4_SingleLogicalVolumeFactory_h -#include "AthenaKernel/MsgStreamMember.h" +#include "AthenaBaseComps/AthMessaging.h" class G4LogicalVolume; class GeoLogVol; @@ -13,17 +13,10 @@ class GeoLogVol; #include #include -class SingleLogicalVolumeFactory { +class SingleLogicalVolumeFactory : public AthMessaging { public: SingleLogicalVolumeFactory(); G4LogicalVolume* Build(const GeoLogVol*) const; - /// Log a message using the Athena controlled logging system - MsgStream& msg( MSG::Level lvl ) const { return m_msg << lvl; } - /// Check whether the logging system is active at the provided verbosity level - bool msgLvl( MSG::Level lvl ) const { return m_msg.get().level() <= lvl; } - private: - /// Private message stream member - mutable Athena::MsgStreamMember m_msg; }; #endif diff --git a/Simulation/G4Utilities/GeoMaterial2G4/GeoMaterial2G4/Geo2G4MaterialFactory.h b/Simulation/G4Utilities/GeoMaterial2G4/GeoMaterial2G4/Geo2G4MaterialFactory.h index 4afaa38a617dddc007d24df7798918e3f0171492..3580a40a6bba279365c4be03355a7ebac21f569d 100644 --- a/Simulation/G4Utilities/GeoMaterial2G4/GeoMaterial2G4/Geo2G4MaterialFactory.h +++ b/Simulation/G4Utilities/GeoMaterial2G4/GeoMaterial2G4/Geo2G4MaterialFactory.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #ifndef GEOMATERIAL2G4_Geo2G4MaterialFactory_h @@ -7,25 +7,21 @@ #include "G4Material.hh" #include "GeoModelKernel/GeoMaterial.h" -#include "AthenaKernel/MsgStreamMember.h" +#include "AthenaBaseComps/AthMessaging.h" + #include #include typedef std::map > matList; typedef std::map > matNames; -class Geo2G4MaterialFactory { +class Geo2G4MaterialFactory : public AthMessaging { public: Geo2G4MaterialFactory(); G4Material* Build(const GeoMaterial*); - /// Log a message using the Athena controlled logging system - MsgStream& msg( MSG::Level lvl ) const { return m_msg << lvl; } - /// Check whether the logging system is active at the provided verbosity level - bool msgLvl( MSG::Level lvl ) const { return m_msg.get().level() <= lvl; } + private: static matList m_geoMaterialToG4Material; static matNames m_geoMaterialNameToObject; - /// Private message stream member - mutable Athena::MsgStreamMember m_msg; }; #endif diff --git a/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4MaterialFactory.cxx b/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4MaterialFactory.cxx index 24ae3b3d4a4e32b890dbb7aa9b4be26b4964cfe9..0576712d91340a76944da2f3fee46d0219d3b9ac 100644 --- a/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4MaterialFactory.cxx +++ b/Simulation/G4Utilities/GeoMaterial2G4/src/Geo2G4MaterialFactory.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #include "GeoMaterial2G4/Geo2G4MaterialFactory.h" @@ -10,15 +10,14 @@ #include "GeoModelUtilities/GeoExtendedMaterial.h" #include "GeoModelUtilities/GeoMaterialPropertiesTable.h" -#include "AthenaBaseComps/AthMsgStreamMacros.h" - #include "G4Material.hh" matList Geo2G4MaterialFactory::m_geoMaterialToG4Material; matNames Geo2G4MaterialFactory::m_geoMaterialNameToObject; -Geo2G4MaterialFactory::Geo2G4MaterialFactory(): m_msg("Geo2G4MaterialFactory") +Geo2G4MaterialFactory::Geo2G4MaterialFactory() : + AthMessaging("Geo2G4MaterialFactory") { }