ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
|
description of debug output options More...
Namespaces | |
namespace | Acts::Logging |
debug output related helper classes and functions | |
Classes | |
class | Acts::Logger |
class for printing debug output More... | |
Macros | |
#define | ACTS_LOCAL_LOGGER(log_object) |
macro to use a local Acts::Logger object | |
#define | ACTS_VERBOSE(x) |
macro for verbose debug output | |
#define | ACTS_DEBUG(x) |
macro for debug debug output | |
#define | ACTS_INFO(x) |
macro for info debug output | |
#define | ACTS_WARNING(x) |
macro for warning debug output | |
#define | ACTS_ERROR(x) |
macro for error debug output | |
#define | ACTS_FATAL(x) |
macro for fatal debug output | |
description of debug output options
The Acts logging facility supports several severity levels which allow you to control the amount of information displayed at run-time. Logger objects can easily be created using the Acts::getDefaultLogger function which should be sufficient to get you started. In case you need more customized debug output, you can make use of the output decorators defined in Acts::Logging or even write your own implementation of Acts::Logging::OutputDecorator.
In order to add debug messages to your program, you should use the provided macros for the different severity levels:
All of these macros require that a function logger()
returning a Acts::Logger object is available in the scope in which the macros are used. Inside classes containing an Acts::Logger object as member variable, this could be achieved by providing a private class method called logger()
(for an example see e.g. Acts::CylinderVolumeBuilder::logger). Inside free functions or member methods with local logger objects, the same effect can be achieved by using the macro ACTS_LOCAL_LOGGER which is provided for your convenience.
In case you are using Acts in another framework which comes with its own logging facility (e.g. Gaudi) you can pipe the logging output from Acts tools and algorithms to your framework's logging system by supplying different implementations of:
Since Acts makes extensive use of Acts::getDefaultLogger to provide sufficient information for debugging, you would need to provide a modified implementation of this function (using your output filter and printing policies) to also pipe this output to your framework.
Changing the implementation of an already defined function is a non-trivial task in C++. We recommend the following approach using the possibility to inject custom code by pre-loading shared libraries with LD_PRELOAD
. You need to provide an appropriate implementation for a function of the following signature into a separate source file and compile it in a shared library
Then you can run your executable, which uses Acts tools and algorithms, in the following way (tested under Unix)
For an example have a look at CustomDefaultLogger.cpp which you can use as follows:
#define ACTS_DEBUG | ( | x | ) |
macro for debug debug output
x | debug message |
logger()
must be a valid expression in the scope where this macro is used and it must return a Acts::Logger object.The debug message is printed if the current Acts::Logging::Level <= Acts::Logging::DEBUG.
Definition at line 83 of file Logger.hpp.
View newest version in sPHENIX GitHub at line 83 of file Logger.hpp
Referenced by FW::EffPlotTool::book(), FW::TrackSummaryPlotTool::book(), FW::FakeRatePlotTool::book(), FW::ResPlotTool::book(), Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::TGeoLayerBuilder::buildLayers(), Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::canRecoverFromNoCompatibleTracks(), Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::canRemoveNonCompatibleTrackFromSeedTracks(), Acts::PassiveLayerBuilder::centralLayers(), FW::Generic::ProtoLayerCreatorT< detector_element_t >::centralProtoLayers(), Acts::VolumeMaterialMapper::checkAndInsert(), Acts::SurfaceMaterialMapper::checkAndInsert(), Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::checkVertexAndCompatibleTracks(), FW::ResPlotTool::clear(), FW::Generic::ProtoLayerCreatorT< detector_element_t >::createProtoLayers(), Acts::SurfaceMaterialMapper::createState(), Acts::PassiveLayerBuilder::endcapLayers(), Acts::CylinderVolumeHelper::estimateAndCheckDimension(), FW::HelloLoggerAlgorithm::execute(), FW::TrackSelector::execute(), FW::DigitizationAlgorithm::execute(), FW::ParticleSelector::execute(), FW::FatrasAlgorithm< simulator_t >::execute(), FW::FittingAlgorithm::execute(), FW::PropagationAlgorithm< propagator_t >::executeTest(), FW::FatrasAlgorithm< simulator_t >::FatrasAlgorithm(), Acts::CombinatorialKalmanFilter< propagator_t, updater_t, smoother_t, source_link_selector_t, branch_stopper_t, calibrator_t, input_converter_t, output_converter_t >::Actor< source_link_t, parameters_t >::filter(), Acts::VolumeMaterialMapper::finalizeMaps(), Acts::SurfaceMaterialMapper::finalizeMaps(), Acts::ZScanVertexFinder< vfitter_t >::find(), Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::find(), Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::find(), Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::getVertexSeed(), main(), Acts::GainMatrixSmoother< parameters_t >::operator()(), Acts::CKFSourceLinkSelector::operator()(), FW::ParticleSelector::ParticleSelector(), FW::RootVertexAndTracksReader::read(), FW::RootMaterialTrackReader::read(), FW::EventGenerator::read(), FW::Options::readFatrasConfig(), Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::reassignTracksToNewVertex(), Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::removeUsedCompatibleTracks(), FW::RootMaterialTrackReader::RootMaterialTrackReader(), FW::RootVertexAndTracksReader::RootVertexAndTracksReader(), Acts::CylinderVolumeBuilder::trackingVolume(), FW::EffPlotTool::write(), FW::Obj::ObjTrackingGeometryWriter::write(), FW::TrackSummaryPlotTool::write(), FW::FakeRatePlotTool::write(), FW::Obj::ObjSurfaceWriter::write(), FW::ResPlotTool::write(), and FW::RootTrajectoryWriter::writeT().
#define ACTS_ERROR | ( | x | ) |
macro for error debug output
x | debug message |
logger()
must be a valid expression in the scope where this macro is used and it must return a Acts::Logger object.The debug message is printed if the current Acts::Logging::Level <= Acts::Logging::ERROR.
Definition at line 125 of file Logger.hpp.
View newest version in sPHENIX GitHub at line 125 of file Logger.hpp
Referenced by Acts::CombinatorialKalmanFilter< propagator_t, updater_t, smoother_t, source_link_selector_t, branch_stopper_t, calibrator_t, input_converter_t, output_converter_t >::Actor< source_link_t, parameters_t >::addSourcelinkState(), Acts::KalmanFitter< propagator_t, updater_t, smoother_t, outlier_finder_t, calibrator_t, input_converter_t, output_converter_t >::Actor< source_link_t, parameters_t >::backwardFilter(), Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::DD4hepLayerBuilder::centralLayers(), Acts::DD4hepVolumeBuilder::centralVolumes(), Acts::LayerCreator::checkBinning(), FW::TrackFinderPerformanceWriter::Impl::close(), Acts::SurfaceArrayCreator::createVariableAxis(), Acts::LayerCreator::cylinderLayer(), FW::Sequencer::determineEventsRange(), Acts::LayerCreator::discLayer(), Acts::DD4hepLayerBuilder::endcapLayers(), FWE::VertexFindingAlgorithm::execute(), FWE::VertexFitAlgorithm::execute(), FW::FatrasAlgorithm< simulator_t >::execute(), Acts::KalmanFitter< propagator_t, updater_t, smoother_t, outlier_finder_t, calibrator_t, input_converter_t, output_converter_t >::Actor< source_link_t, parameters_t >::filter(), Acts::CombinatorialKalmanFilter< propagator_t, updater_t, smoother_t, source_link_selector_t, branch_stopper_t, calibrator_t, input_converter_t, output_converter_t >::Actor< source_link_t, parameters_t >::filter(), Acts::CombinatorialKalmanFilter< propagator_t, updater_t, smoother_t, source_link_selector_t, branch_stopper_t, calibrator_t, input_converter_t, output_converter_t >::Actor< source_link_t, parameters_t >::finalize(), Acts::CombinatorialKalmanFilter< propagator_t, updater_t, smoother_t, source_link_selector_t, branch_stopper_t, calibrator_t, input_converter_t, output_converter_t >::findTracks(), Acts::KalmanFitter< propagator_t, updater_t, smoother_t, outlier_finder_t, calibrator_t, input_converter_t, output_converter_t >::fit(), Acts::LayerArrayCreator::layerArray(), Acts::KalmanFitter< propagator_t, updater_t, smoother_t, outlier_finder_t, calibrator_t, input_converter_t, output_converter_t >::Actor< source_link_t, parameters_t >::operator()(), Acts::CombinatorialKalmanFilter< propagator_t, updater_t, smoother_t, source_link_selector_t, branch_stopper_t, calibrator_t, input_converter_t, output_converter_t >::Actor< source_link_t, parameters_t >::operator()(), Acts::LayerCreator::planeLayer(), Acts::CylinderVolumeBuilder::trackingVolume(), FW::RootParticleWriter::writeT(), and FW::RootSimHitWriter::writeT().
#define ACTS_FATAL | ( | x | ) |
macro for fatal debug output
x | debug message |
logger()
must be a valid expression in the scope where this macro is used and it must return a Acts::Logger object.The debug message is printed if the current Acts::Logging::Level <= Acts::Logging::FATAL.
Definition at line 139 of file Logger.hpp.
View newest version in sPHENIX GitHub at line 139 of file Logger.hpp
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), FW::HitSmearing::execute(), FW::FatrasAlgorithm< simulator_t >::execute(), FW::FittingAlgorithm::execute(), FW::CsvPlanarClusterReader::read(), FW::CsvPlanarClusterWriter::writeT(), and FW::RootPlanarClusterWriter::writeT().
#define ACTS_INFO | ( | x | ) |
macro for info debug output
x | debug message |
logger()
must be a valid expression in the scope where this macro is used and it must return a Acts::Logger object.The debug message is printed if the current Acts::Logging::Level <= Acts::Logging::INFO.
Definition at line 97 of file Logger.hpp.
View newest version in sPHENIX GitHub at line 97 of file Logger.hpp
Referenced by FW::Sequencer::addAlgorithm(), FW::Sequencer::addContextDecorator(), FW::Sequencer::addReader(), FW::Sequencer::addService(), FW::Sequencer::addWriter(), Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::convertDD4hepDetector(), FW::Sequencer::determineEventsRange(), FW::RootTrackParameterWriter::endRun(), FW::RootVertexAndTracksWriter::endRun(), FW::RootParticleWriter::endRun(), FW::TrackFitterPerformanceWriter::endRun(), FW::RootPlanarClusterWriter::endRun(), FW::RootTrajectoryWriter::endRun(), FW::RootMaterialTrackWriter::endRun(), FW::HelloLoggerAlgorithm::execute(), FW::PrintParticles::execute(), FW::HelloWhiteBoardAlgorithm::execute(), FW::HelloRandomAlgorithm::execute(), FW::PrintHits::execute(), FWE::VertexFindingAlgorithm::execute(), FWE::VertexFitAlgorithm::execute(), FW::GeantinoRecording::execute(), FW::GeantinoRecording::GeantinoRecording(), main(), FW::MaterialMapping::MaterialMapping(), FW::RootBFieldWriter< bfield_t >::run(), FW::Sequencer::run(), and Acts::volumeBuilder_dd4hep().
#define ACTS_LOCAL_LOGGER | ( | log_object | ) |
macro to use a local Acts::Logger object
log_object | logger instance of type |
logger
is not yet defined. log_object
is transferred and log_object
should not be used directly any more.This macro allows to use a locally defined logging object with the ACTS_* logging macros. The envisaged usage is the following:
Definition at line 43 of file Logger.hpp.
View newest version in sPHENIX GitHub at line 43 of file Logger.hpp
Referenced by Acts::addCylinderLayerProtoMaterial(), Acts::addDiscLayerProtoMaterial(), Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::convertDD4hepDetector(), FW::determineEventFilesRange(), main(), FW::Options::readFatrasConfig(), FW::RootBFieldWriter< bfield_t >::run(), and Acts::volumeBuilder_dd4hep().
#define ACTS_VERBOSE | ( | x | ) |
macro for verbose debug output
x | debug message |
logger()
must be a valid expression in the scope where this macro is used and it must return a Acts::Logger object.The debug message is printed if the current Acts::Logging::Level <= Acts::Logging::VERBOSE.
Definition at line 69 of file Logger.hpp.
View newest version in sPHENIX GitHub at line 69 of file Logger.hpp
Referenced by FW::WhiteBoard::add(), Acts::addCylinderLayerProtoMaterial(), Acts::addDiscLayerProtoMaterial(), Acts::CylinderVolumeHelper::addFaceVolumes(), Acts::CombinatorialKalmanFilter< propagator_t, updater_t, smoother_t, source_link_selector_t, branch_stopper_t, calibrator_t, input_converter_t, output_converter_t >::Actor< source_link_t, parameters_t >::addHoleState(), Acts::CombinatorialKalmanFilter< propagator_t, updater_t, smoother_t, source_link_selector_t, branch_stopper_t, calibrator_t, input_converter_t, output_converter_t >::Actor< source_link_t, parameters_t >::addPassiveState(), Acts::CombinatorialKalmanFilter< propagator_t, updater_t, smoother_t, source_link_selector_t, branch_stopper_t, calibrator_t, input_converter_t, output_converter_t >::Actor< source_link_t, parameters_t >::addSourcelinkState(), Acts::CylinderVolumeBuilder::analyzeContent(), Acts::KalmanFitter< propagator_t, updater_t, smoother_t, outlier_finder_t, calibrator_t, input_converter_t, output_converter_t >::Actor< source_link_t, parameters_t >::backwardFilter(), Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::TGeoLayerBuilder::buildLayers(), Acts::PlanarModuleStepper::cellSteps(), Acts::PassiveLayerBuilder::centralLayers(), Acts::DD4hepLayerBuilder::centralLayers(), FW::Generic::LayerBuilderT< detector_element_t >::centralLayers(), FW::Generic::ProtoLayerCreatorT< detector_element_t >::centralProtoLayers(), Acts::DD4hepVolumeBuilder::centralVolumes(), Acts::LayerCreator::checkBinning(), Acts::SurfaceArrayCreator::completeBinning(), FW::Generic::LayerBuilderT< detector_element_t >::constructEndcapLayers(), Acts::CylinderVolumeHelper::createContainerTrackingVolume(), Acts::CylinderVolumeHelper::createCylinderLayer(), Acts::CylinderVolumeHelper::createDiscLayer(), Acts::SurfaceArrayCreator::createEquidistantAxis(), Acts::CylinderVolumeHelper::createGapTrackingVolume(), FW::Generic::ProtoLayerCreatorT< detector_element_t >::createProtoLayers(), Acts::SurfaceMaterialMapper::createState(), Acts::CylinderVolumeHelper::createTrackingVolume(), Acts::SurfaceArrayCreator::createVariableAxis(), Acts::LayerCreator::cylinderLayer(), FW::Contextual::PayloadDecorator::decorate(), FW::Contextual::AlignmentDecorator::decorate(), Acts::JsonGeometryConverter::detectorRepToJson(), FW::determineEventFilesRange(), Acts::LayerCreator::discLayer(), Acts::PassiveLayerBuilder::endcapLayers(), Acts::DD4hepLayerBuilder::endcapLayers(), FW::RootSimHitWriter::endRun(), FW::RootPropagationStepsWriter::endRun(), Acts::CylinderVolumeHelper::estimateAndCheckDimension(), FW::HelloLoggerAlgorithm::execute(), FW::HelloWhiteBoardAlgorithm::execute(), FW::HelloRandomAlgorithm::execute(), FW::DigitizationAlgorithm::execute(), FW::FittingAlgorithm::execute(), FW::PropagationAlgorithm< propagator_t >::executeTest(), Acts::KalmanFitter< propagator_t, updater_t, smoother_t, outlier_finder_t, calibrator_t, input_converter_t, output_converter_t >::Actor< source_link_t, parameters_t >::filter(), Acts::CombinatorialKalmanFilter< propagator_t, updater_t, smoother_t, source_link_selector_t, branch_stopper_t, calibrator_t, input_converter_t, output_converter_t >::Actor< source_link_t, parameters_t >::filter(), Acts::CombinatorialKalmanFilter< propagator_t, updater_t, smoother_t, source_link_selector_t, branch_stopper_t, calibrator_t, input_converter_t, output_converter_t >::Actor< source_link_t, parameters_t >::finalize(), Acts::CombinatorialKalmanFilter< propagator_t, updater_t, smoother_t, source_link_selector_t, branch_stopper_t, calibrator_t, input_converter_t, output_converter_t >::findTracks(), Acts::KalmanFitter< propagator_t, updater_t, smoother_t, outlier_finder_t, calibrator_t, input_converter_t, output_converter_t >::fit(), FW::WhiteBoard::get(), Acts::CylinderVolumeHelper::glueTrackingVolumes(), Acts::CylinderVolumeHelper::interGlueTrackingVolume(), Acts::JsonGeometryConverter::jsonToMaterialMaps(), Acts::LayerArrayCreator::layerArray(), Acts::VolumeMaterialMapper::mapMaterialTrack(), Acts::SurfaceMaterialMapper::mapMaterialTrack(), Acts::KalmanFitter< propagator_t, updater_t, smoother_t, outlier_finder_t, calibrator_t, input_converter_t, output_converter_t >::Actor< source_link_t, parameters_t >::materialInteractor(), Acts::CombinatorialKalmanFilter< propagator_t, updater_t, smoother_t, source_link_selector_t, branch_stopper_t, calibrator_t, input_converter_t, output_converter_t >::Actor< source_link_t, parameters_t >::materialInteractor(), Acts::GainMatrixSmoother< parameters_t >::operator()(), FW::Pythia8Generator::operator()(), Acts::GainMatrixUpdater< parameters_t >::operator()(), Acts::CKFSourceLinkSelector::operator()(), Acts::KalmanFitter< propagator_t, updater_t, smoother_t, outlier_finder_t, calibrator_t, input_converter_t, output_converter_t >::Actor< source_link_t, parameters_t >::operator()(), Acts::CombinatorialKalmanFilter< propagator_t, updater_t, smoother_t, source_link_selector_t, branch_stopper_t, calibrator_t, input_converter_t, output_converter_t >::Actor< source_link_t, parameters_t >::operator()(), Acts::LayerCreator::planeLayer(), FW::Pythia8Generator::Pythia8Generator(), FW::RootVertexAndTracksReader::read(), FW::RootMaterialTrackReader::read(), FW::EventGenerator::read(), Acts::SurfaceMaterialMapper::resolveMaterialSurfaces(), Acts::VolumeMaterialMapper::resolveMaterialVolume(), Acts::TGeoLayerBuilder::resolveSensitive(), FW::RootMaterialDecorator::RootMaterialDecorator(), Acts::AdaptiveMultiVertexFitter< input_track_t, linearizer_t >::setWeightsAndUpdate(), Acts::SurfaceArrayCreator::surfaceArrayOnCylinder(), Acts::SurfaceArrayCreator::surfaceArrayOnDisc(), Acts::SurfaceArrayCreator::surfaceArrayOnPlane(), Acts::CylinderVolumeBuilder::trackingVolume(), Acts::volumeBuilder_dd4hep(), FW::Obj::ObjTrackingGeometryWriter::write(), FW::Obj::ObjSurfaceWriter::write(), and FW::RootMaterialWriter::write().
#define ACTS_WARNING | ( | x | ) |
macro for warning debug output
x | debug message |
logger()
must be a valid expression in the scope where this macro is used and it must return a Acts::Logger object.The debug message is printed if the current Acts::Logging::Level <= Acts::Logging::WARNING.
Definition at line 111 of file Logger.hpp.
View newest version in sPHENIX GitHub at line 111 of file Logger.hpp
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::TGeoLayerBuilder::buildLayers(), FW::Generic::ProtoLayerCreatorT< detector_element_t >::centralProtoLayers(), Acts::CylinderVolumeHelper::createContainerTrackingVolume(), Acts::LayerArrayCreator::createNavigationSurface(), Acts::DD4hepLayerBuilder::createSensitiveSurface(), Acts::CylinderVolumeHelper::createTrackingVolume(), Acts::AdaptiveMultiVertexFinder< vfitter_t, sfinder_t >::doSeeding(), Acts::CylinderVolumeHelper::estimateAndCheckDimension(), FW::FittingAlgorithm::execute(), FW::ResPlotTool::fill(), Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::fillPerigeesToFit(), FW::Options::readFatrasConfig(), Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::removeAllTracks(), Acts::IterativeVertexFinder< vfitter_t, sfinder_t >::removeUsedCompatibleTracks(), and FW::RootTrajectoryWriter::writeT().