ATLAS Offline Software
|
Class to provide easy MsgStream
access and capabilities.
More...
#include <AthenaBaseComps/AthMessaging.h>
Inherited by AFP_ToFRawData_v2, ALFA_CenterGravity, ALFA_EdgeMethod, ALFA_HalfReco, ALFA_MDGap, ALFA_MDMultiple, ALFA_MDOverlap, ALFA_MDTracking, ALFA_ODTracking, Analysis::JetTagCalibCondData, asg::AsgMessaging, AskForRoI, AthConstConverter, Athena::LeafCnv, Athena::RootCnv, Athena::xAODCnv, AthenaEventLoopMgr, AthenaHiveEventLoopMgr, AthenaPoolConverter, AthMemoryAuditor, AtlasDetectorID, AtlasDetectorIDHelper, CaloGeometryFromCaloDDM, CookieCutterHelpers::CentralPosition, CrackDMConstruction, CTP_Decoder, DebugView [private]
, DerivationFramework::BPhysPVCascadeTools, DerivationFramework::BPhysPVTools, DetDescrConverter, EventInfoByteStreamAuxCnv, EventInfoByteStreamxAODCnv, EventInfoMuonCalibStreamCnv, ExtParameterisedVolumeBuilder, FPGATrackSimFitConstantBank, FPGATrackSimModuleRelabel, 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::iGeant4::PhysicsValidationUserAction, G4UA::LooperKiller, G4UA::LooperThresholdSet, G4UA::MaterialStepRecorder, G4UA::MCTruthSteppingAction, G4UA::MomentumConservation, G4UA::ScoringVolumeTrackKiller, G4UA::SG_StepNtuple, G4UA::StepHistogram, G4UA::StepNtuple, G4UA::StoppedParticleAction, G4UA::TestBoundariesUserAction, G4UA::VerboseSelector, G4UA::VolumeDebugger, G4UA::VolumeDumper, Geo2G4Builder, Geo2G4MaterialFactory, Geo2G4SolidFactory, HGTD_DetectorManager, HGTD_GmxInterface, HLT::HLTResultMTByteStreamCnv, IDPVM::ResolutionHelper, IDTPM::PlotMgr, IDTPM::TrackAnalysisCollections, IDTPM::TrackMatchingLookupBase< T, R >, InDet::InDetMaterialVeto, InDet::TRT_ElectronPidTool::ToTcalculator, InDetDD::AthenaComps, InDetDD::BCMPrimeGmxInterface, InDetDD::DistortedMaterialManager, InDetDD::ExtraMaterial, InDetDD::InDetDetectorManager, InDetDD::ITk::PixelGmxInterface, InDetDD::ITk::StripGmxInterface, InDetDD::SiCommonItems, InDetDD::TRT_DetElementContainer, InDetDD::VolumeBuilder, InDetMaterialManager, InDetPlotBase, InducedChargeModel, IOVDbFolder, 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, McVtxFilter, MM_StripsResponseSimulation, MMLoadVariables, MMT_Diamond, MMT_Parameters, Muon::DigitEffiData, Muon::STgcClusterBuilderCommon, Muon::TgcSlbDataHelper, Muon::TwinTubeMap, MuonCalib::CalibT0DbOperations, MuonG4R4::MdtSensitiveDetector, MuonG4R4::MmSensitiveDetector, MuonG4R4::RpcSensitiveDetector, MuonG4R4::sTgcSensitiveDetector, MuonG4R4::TgcSensitiveDetector, MuonGM::MuonChamber, MuonGM::MuonChamberLite, MuonGM::MuonDetectorManager, MuonGM::MuonPadDesign, MuonGM::MuonReadoutElement, MuonGM::MuonStation, MuonGM::MYSQL, MuonGM::RDBReaderAtlas, MuonGM::Station, MuonGM::TgcReadoutParams, MuonGMR4::MuonDetectorManager, MuonGMR4::MuonReadoutElement, MuonGMR4::StripDesign, MuonHoughHisto2D, MuonHoughTransformer, MuonHoughTransformSteering, MuonR4::CalibSegmentChi2Minimizer [private]
, MuonR4::MdtSegmentFitter, MuonR4::MdtSegmentSeedGenerator, MuonR4::SegmentAmbiSolver, MuonVal::IParticleFourMomBranch, MuonVal::MuonTesterBranch, MuonVal::MuonTesterTree, NswCalibDbTimeChargeData, NswErrorCalibData, NSWL1::L1TdrStgcTriggerLogic, ParticleCandidateList, PileUpEventLoopMgr, PileUpStream, PixelGeoDC2::PixelGeometryManager, pool::IFileCatalog, RatesHistoBase, Ringer::BuildCaloRingsFctorBase, RoIBResultByteStreamCnv< ROBF >, RootAuxDynIO::RNTupleAuxDynReader, RootAuxDynIO::RNTupleAuxDynWriter, RootAuxDynIO::TBranchAuxDynWriter, RootStorageSvc::RNTupleWriterHelper, Routing2, SCT_ReadoutData, ServicesTracker, SingleLogicalVolumeFactory, SqliteRecordset, sTGCAsBuiltData2, sTgcDigitMaker, TCCPlotsBase, TgcDigitJitterData, TgcDigitMaker, TgcDigitThresholdData, TGCTriggerBWCWReader, TileCellDim, TileCorrelation, TileDddbManager, TileDetDescrManager, TilePulseShape, TileROD_Encoder, TrackFitter, IDTPM::TrackMatchingLookupBase< xAOD::TrackParticle >, IDTPM::TrackMatchingLookupBase< xAOD::TrackParticle, xAOD::TruthParticle >, IDTPM::TrackMatchingLookupBase< xAOD::TruthParticle, xAOD::TrackParticle >, Trig::TrigBtagEmulationChain, TrigCostAuditor, TrigSORFromPtreeHelper, Trk::AlignModule, Trk::GeoShapeConverter, Trk::VolumeConverter, TRRegionXMLHandler, TRT_PAI_effectiveGas, TRT_PAI_gasMixture, TRTDigCondBase, TRTDigSettings, TRTElectronicsProcessing, TRTNoise, TRTProcessingOfStraw, TRTTimeCorrection, TRTTransitionRadiation, VolumeTreeNavigator, ZDC_DetFactory, ZDC_DetManager, and ZdcLucrodDecoder.
Public Member Functions | |
AthMessaging (IMessageSvc *msgSvc, const std::string &name) | |
Constructor. More... | |
AthMessaging (const std::string &name) | |
Constructor with auto-retrieval of the MessageSvc. More... | |
virtual | ~AthMessaging () |
Destructor: More... | |
bool | msgLvl (const MSG::Level lvl) const |
Test the output level. More... | |
MsgStream & | msg () const |
The standard message stream. More... | |
MsgStream & | msg (const MSG::Level lvl) const |
The standard message stream. More... | |
void | setLevel (MSG::Level lvl) |
Change the current logging level. More... | |
Private Member Functions | |
AthMessaging () | |
Default constructor: More... | |
AthMessaging (const AthMessaging &rhs) | |
AthMessaging & | operator= (const AthMessaging &rhs) |
void | initMessaging () const |
Initialize our message level and MessageSvc. More... | |
Private Attributes | |
std::string | m_nm |
Message source name. More... | |
boost::thread_specific_ptr< MsgStream > | m_msg_tls |
MsgStream instance (a std::cout like with print-out levels) More... | |
std::atomic< IMessageSvc * > | m_imsg { nullptr } |
MessageSvc pointer. More... | |
std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
Current logging level. More... | |
std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
Messaging initialized (initMessaging) More... | |
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:
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::AthMessaging | ( | IMessageSvc * | msgSvc, |
const std::string & | name | ||
) |
AthMessaging::AthMessaging | ( | const std::string & | name | ) |
Constructor with auto-retrieval of the MessageSvc.
name | Name of the message stream |
Definition at line 19 of file AthMessaging.cxx.
|
virtual |
|
private |
Default constructor:
|
private |
|
private |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
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 164 of file AthMessaging.h.
|
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 179 of file AthMessaging.h.
|
inline |
Test the output level.
lvl | The message level to test against |
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
|
private |
void AthMessaging::setLevel | ( | MSG::Level | lvl | ) |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
|
mutableprivate |
Messaging initialized (initMessaging)
Definition at line 141 of file AthMessaging.h.
|
mutableprivate |
MessageSvc pointer.
Definition at line 135 of file AthMessaging.h.
|
mutableprivate |
Current logging level.
Definition at line 138 of file AthMessaging.h.
|
mutableprivate |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
|
private |
Message source name.
Definition at line 129 of file AthMessaging.h.