Class to provide easy MsgStream access and capabilities.
More...
#include <AthenaBaseComps/AthMessaging.h>
Inherited by IDTPM::TrackMatchingLookupBase< xAOD::TrackParticle >, IDTPM::TrackMatchingLookupBase< xAOD::TrackParticle, xAOD::TruthParticle >, IDTPM::TrackMatchingLookupBase< xAOD::TruthParticle, xAOD::TrackParticle >, AFP_ToFRawData_v2, ALFA_CenterGravity, ALFA_EdgeMethod, ALFA_HalfReco, ALFA_MDGap, ALFA_MDMultiple, ALFA_MDOverlap, ALFA_MDTracking, ALFA_ODTracking, Analysis::JetTagCalibCondData, AskForRoI, AthConstConverter, Athena::LeafCnv, Athena::RootCnv, Athena::xAODCnv, AthenaEventLoopMgr, AthenaHiveEventLoopMgr, AthenaPoolConverter, AtlasDetectorID, AtlasDetectorIDHelper, CTP_Decoder, CaloGeometryFromCaloDDM, CookieCutterHelpers::CentralPosition, CrackDMConstruction, DerivationFramework::BPhysPVCascadeTools, DerivationFramework::BPhysPVTools, DetDescrConverter, EventInfoByteStreamAuxCnv, EventInfoByteStreamxAODCnv, EventInfoMuonCalibStreamCnv, ExtParameterisedVolumeBuilder, FPGATrackSimFitConstantBank, FPGATrackSimModuleRelabel, G4AtlasDetectorConstructionTool::G4AtlasDetectorConstruction, G4AtlasRunManager, G4UA::AthenaTrackingAction, G4UA::CaloG4::CalibrationDefaultProcessing, G4UA::EnergyConservationTest, G4UA::FastIDKiller, G4UA::G4AtlantisDumper, G4UA::G4CosmicAndFilter, G4UA::G4CosmicFilter, G4UA::G4CosmicOrFilter, G4UA::G4HitFilter, G4UA::G4SimTimer, G4UA::HIPKiller, G4UA::HIPLArVolumeAccept, G4UA::HitWrapper, G4UA::HyperspaceCatcher, G4UA::LooperKiller, G4UA::LooperThresholdSet, G4UA::LooperThresholdSet, G4UA::MCTruthSteppingAction, G4UA::MaterialStepRecorder, G4UA::MomentumConservation, G4UA::SG_StepNtuple, G4UA::ScoringVolumeTrackKiller, G4UA::StepHistogram, G4UA::StepNtuple, G4UA::StoppedParticleAction, G4UA::TestBoundariesUserAction, G4UA::VerboseSelector, G4UA::VolumeDebugger, G4UA::VolumeDumper, G4UA::iGeant4::PhysicsValidationUserAction, Geo2G4Builder, Geo2G4MaterialFactory, Geo2G4SolidFactory, HGTD_DetectorManager, HGTD_GmxInterface, HLT::HLTResultMTByteStreamCnv, IDPVM::ResolutionHelper, IDTPM::PlotMgr, IDTPM::TrackAnalysisCollections, IDTPM::TrackMatchingLookupBase< T, R >, IOVDbFolder, IPhysicsContructor, InDet::InDetMaterialVeto, InDet::TRT_ElectronPidTool::ToTcalculator, InDetDD::AthenaComps, InDetDD::BCMPrimeGmxInterface, InDetDD::DistortedMaterialManager, InDetDD::ExtraMaterial, InDetDD::ITk::PixelGmxInterface, InDetDD::ITk::StripGmxInterface, InDetDD::InDetDetectorManager, InDetDD::SiCommonItems, InDetDD::TRT_DetElementContainer, InDetDD::VolumeBuilder, InDetMaterialManager, InDetPlotBase, InducedChargeModel, JetTagDQA::BTaggingValidationPlots, L1TriggerResultByteStreamCnv, LArAlignHelper, LArCondFlatBase, LArCondSuperCellBase, LArFebConfig, LArG4::EC::HVHelper, LArGeo::BarrelConstruction, LArGeo::BarrelCryostatConstruction, LArGeo::EMECConstruction, LArGeo::EMECSupportConstruction, LArGeo::LArDetectorFactory, LArGeo::LArDetectorFactoryLite, LArHVIdMappingReader, LArLATOMEDecoder::EventProcess, LArMaterialManager, LArTTCellMap, LArWheelSliceSolid, LArWheelSolid, LUCID_DigitByteStreamCnv, LVL1BS::CmxCpHitsByteStreamAuxCnv, LVL1BS::CmxCpHitsByteStreamxAODCnv, LVL1BS::CmxCpTobByteStreamAuxCnv, LVL1BS::CmxCpTobByteStreamxAODCnv, LVL1BS::CmxEtSumsByteStreamAuxCnv, LVL1BS::CmxEtSumsByteStreamxAODCnv, LVL1BS::CmxJetHitsByteStreamAuxCnv, LVL1BS::CmxJetHitsByteStreamxAODCnv, LVL1BS::CmxJetTobByteStreamAuxCnv, LVL1BS::CmxJetTobByteStreamxAODCnv, LVL1BS::CmxRoIByteStreamAuxCnv, LVL1BS::CmxRoIByteStreamxAODCnv, LVL1BS::CpmTobRoiByteStreamAuxCnv, LVL1BS::CpmTobRoiByteStreamxAODCnv, LVL1BS::CpmTowerByteStreamAuxCnv, LVL1BS::CpmTowerByteStreamxAODCnv, LVL1BS::JemEtSumsByteStreamAuxCnv, LVL1BS::JemEtSumsByteStreamxAODCnv, LVL1BS::JemTobRoiByteStreamAuxCnv, LVL1BS::JemTobRoiByteStreamxAODCnv, LVL1BS::JetElementByteStreamAuxCnv, LVL1BS::JetElementByteStreamxAODCnv, LVL1BS::L1CaloByteStreamAuxCnv< ContainerT, AuxContainerT >, LVL1BS::L1TopoByteStreamAuxCnv, LVL1BS::L1TopoByteStreamxAODCnv, LVL1BS::PpmByteStreamAuxCnv, LVL1BS::PpmByteStreamxAODCnv, LVL1BS::RodHeaderByteStreamAuxCnv, LVL1BS::RodHeaderByteStreamxAODCnv, LVL1TGC::TGCBIS78, LVL1TGC::TGCBIS78CoincidenceMap, LVL1TGC::TGCEIFICoincidenceMap, LVL1TGC::TGCGoodMF, LVL1TGC::TGCNSW, LVL1TGC::TGCTMDB, LVL1TGCTrigger::TGCDatabaseManager, LVL1TGCTrigger::TGCNSWCoincidenceMap, MMLoadVariables, MMT_Diamond, MM_StripsResponseSimulation, McVtxFilter, Muon::DigitEffiData, Muon::STgcClusterBuilderCommon, Muon::TgcSlbDataHelper, Muon::TwinTubeMap, Muon::mmCTPClusterCalibData, MuonCalib::CalibT0DbOperations, MuonG4R4::MuonSensitiveDetector, MuonGM::MYSQL, MuonGM::MuonChamber, MuonGM::MuonChamberLite, MuonGM::MuonDetectorManager, MuonGM::MuonPadDesign, MuonGM::MuonReadoutElement, MuonGM::MuonStation, MuonGM::RDBReaderAtlas, MuonGM::Station, MuonGM::TgcReadoutParams, MuonGMR4::MuonDetectorManager, MuonGMR4::MuonReadoutElement, MuonGMR4::SpectrometerSector, MuonGMR4::StripDesign, MuonHoughHisto2D, MuonHoughTransformSteering, MuonHoughTransformer, MuonR4::MsTrackSeeder, MuonR4::SegmentFit::MdtSegmentSeedGenerator, MuonR4::SegmentFit::SegmentAmbiSolver, MuonR4::SegmentFit::SegmentLineFitter, MuonVal::IParticleFourMomBranch, MuonVal::MuonTesterBranch, MuonVal::MuonTesterTree, NswCalibDbTimeChargeData, NswErrorCalibData, ParticleCandidateList, PileUpEventLoopMgr, PileUpStream, PixelGeoDC2::PixelGeometryManager, RDBMaterialManager, RatesHistoBase, Ringer::BuildCaloRingsFctorBase, Ringer::BuildCaloRingsJetFctorBase, RoIBResultByteStreamCnv< ROBF >, RootAuxDynIO::RNTupleAuxDynReader, RootAuxDynIO::RNTupleAuxDynWriter, RootAuxDynIO::TBranchAuxDynWriter, Routing2, SCT_ReadoutData, ServicesTracker, SingleLogicalVolumeFactory, SqliteRecordset, TCCPlotsBase, TGCTriggerBWCWReader, TRRegionXMLHandler, TRTDigCondBase, TRTDigSettings, TRTElectronicsProcessing, TRTNoise, TRTProcessingOfStraw, TRTTimeCorrection, TRTTransitionRadiation, TRT_PAI_effectiveGas, TRT_PAI_gasMixture, TgcDigitJitterData, TgcDigitMaker, TgcDigitThresholdData, TileCellDim, TileCorrelation, TileDddbManager, TileDetDescrManager, TilePulseShape, TileROD_Encoder, TrackFitter, TrigCostAuditor, TrigSORFromPtreeHelper, Trk::AlignModule, Trk::GeoShapeConverter, Trk::VolumeConverter, VolumeTreeNavigator, ZDC_DetFactory, ZDC_DetManager, ZdcLucrodDecoder, asg::AsgMessaging, pool::APRMessaging, pool::DbSessionObj, pool::DbStorageExplorer, pool::IFileCatalog, sTGCAsBuiltData, sTGCSensitiveDetector, sTgcDigitMaker, and sTgcDigitMaker.
|
| | AthMessaging (IMessageSvc *msgSvc, const std::string &name) |
| | Constructor.
|
| | AthMessaging (const std::string &name) |
| | Constructor with auto-retrieval of the MessageSvc.
|
| virtual | ~AthMessaging () |
| | Destructor:
|
| bool | msgLvl (const MSG::Level lvl) const |
| | Test the output level.
|
| MsgStream & | msg () const |
| | The standard message stream.
|
| MsgStream & | msg (const MSG::Level lvl) const |
| | The standard message stream.
|
| void | setLevel (MSG::Level lvl) |
| | Change the current logging level.
|
|
| std::string | m_nm |
| | Message source name.
|
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| | MsgStream instance (a std::cout like with print-out levels)
|
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| | MessageSvc pointer.
|
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| | Current logging level.
|
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| | Messaging initialized (initMessaging)
|
Class to provide easy MsgStream access and capabilities.
All the expensive operations (e.g. retrieval of MessageSvc) are done lazily, i.e. only when a message is printed to keep the construction of this class as fast as possible.
One usually inherits from this class and uses it like so:
public:
}
};
void print(char *figname, TCanvas *c1)
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
The above will retrieve the pointer to the MessageSvc when needed. If you have access to it already, it is preferred to pass it explicitly:
Definition at line 54 of file AthMessaging.h.
◆ AthMessaging() [1/4]
| AthMessaging::AthMessaging |
( |
IMessageSvc * | msgSvc, |
|
|
const std::string & | name ) |
Constructor.
- Parameters
-
| msgSvc | Pointer to the MessageSvc |
| name | Name of the message stream |
Definition at line 13 of file AthMessaging.cxx.
14 :
16{}
std::string m_nm
Message source name.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
◆ AthMessaging() [2/4]
| AthMessaging::AthMessaging |
( |
const std::string & | name | ) |
|
Constructor with auto-retrieval of the MessageSvc.
- Parameters
-
| name | Name of the message stream |
Definition at line 19 of file AthMessaging.cxx.
◆ ~AthMessaging()
| AthMessaging::~AthMessaging |
( |
| ) |
|
|
virtual |
◆ AthMessaging() [3/4]
| AthMessaging::AthMessaging |
( |
| ) |
|
|
private |
◆ AthMessaging() [4/4]
◆ initMessaging()
| void AthMessaging::initMessaging |
( |
| ) |
const |
|
private |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
40{
42
43 if (
m_lvl == MSG::NIL) {
47 }
48}
std::atomic< MSG::Level > m_lvl
Current logging level.
IMessageSvc * getMessageSvc(bool quiet=false)
◆ msg() [1/2]
| MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inline |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 163 of file AthMessaging.h.
164{
166 if (!ms) {
170 }
171
174}
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
void initMessaging() const
Initialize our message level and MessageSvc.
◆ msg() [2/2]
| MsgStream & AthMessaging::msg |
( |
const MSG::Level | lvl | ) |
const |
|
inline |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 178 of file AthMessaging.h.
179{
return msg() << lvl; }
MsgStream & msg() const
The standard message stream.
◆ msgLvl()
| bool AthMessaging::msgLvl |
( |
const MSG::Level | lvl | ) |
const |
|
inline |
Test the output level.
- Parameters
-
| lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
| true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
152{
155 return true;
156 } else {
157 return false;
158 }
159}
◆ operator=()
◆ setLevel()
| void AthMessaging::setLevel |
( |
MSG::Level | lvl | ) |
|
◆ ATLAS_THREAD_SAFE
| std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivate |
◆ m_imsg
| std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivate |
◆ m_lvl
| std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivate |
◆ m_msg_tls
| boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivate |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_nm
| std::string AthMessaging::m_nm |
|
private |
The documentation for this class was generated from the following files: