Rosetta
|
Class for handling user debug/warnings/errors. Use instance of this class instead of 'std::cout' for all your regular io. Channel argument must be related to the location of the source file. For example if you create Tracer object in src/basic/scoring/myfile.cc, then channel must be something like 'basic.scoring.myfile'. More...
#include <Tracer.hh>
Classes | |
class | TracerProxy |
Public Member Functions | |
Tracer (std::string const &channel="", TracerPriority priority=t_info, bool muted_by_default=false) | |
Create Tracer object with given channel and priority. More... | |
Tracer (std::string const &channel, utility::CSI::CSI_Enum const &channel_color, utility::CSI::CSI_Enum const &channel_name_color=utility::CSI::Nothing, TracerPriority priority=t_info, bool muted_by_default=false) | |
Create Tracer object with channel color, channel name color and given channel and priority. More... | |
virtual | ~Tracer () |
Tracer (Tracer const &)=delete | |
Tracer & | operator= (Tracer const &)=delete |
template<typename T > | |
TracerImpl & | operator<< (T const &entry) |
output operator We return a TracerImpl instead of ourself to make subsequent access faster. More... | |
TracerImpl & | operator<< (std::ostream &(*entry)(std::ostream &)) |
operator std::ostream & () | |
Allow Tracer object to be passed to something expecting a std::ostream. More... | |
void | flush () |
void | flush_all_channels () |
flush tracer buffer and flush buffers of all sub-channels ie: Fatal, Error, Warning, Info, Debug, Trace More... | |
bool | visible () |
bool | visible (int priority) |
std::string const & | channel () |
TracerImpl & | operator() (int priority) |
void | set_local_print_channel_name (bool const setting) |
Set whether we're printing the channel name. More... | |
bool | get_local_print_channel_name () |
Get whether we're printing the channel name. More... | |
std::streamsize | width () |
std::streamsize | width (std::streamsize wide) |
std::streamsize | precision () |
std::streamsize | precision (std::streamsize prec) |
std::ios_base::fmtflags | flags () |
std::ios_base::fmtflags | flags (std::ios_base::fmtflags fmtfl) |
Static Public Member Functions | |
static void | set_ios_hook (otstreamOP tr, std::string const &monitoring_channels_list, bool raw=true) |
TODO: See if we can kill any usage of this, except for the esoteric. More... | |
static std::string const & | get_all_channels_string () |
static bool | super_mute () |
global super mute flag that allow to mute all io no matter what. More... | |
static void | super_mute (bool f) |
Public Attributes | |
TracerProxy | Fatal |
channels with predefined priority levels. More... | |
TracerProxy | Error |
TracerProxy | Warning |
TracerProxy | Info |
TracerProxy | Debug |
TracerProxy | Trace |
Static Public Attributes | |
static utility::CSI::CSI_Enum | Reset |
static utility::CSI::CSI_Enum | Bold |
static utility::CSI::CSI_Enum | Underline |
static utility::CSI::CSI_Enum | Black |
static utility::CSI::CSI_Enum | Red |
static utility::CSI::CSI_Enum | Green |
static utility::CSI::CSI_Enum | Yellow |
static utility::CSI::CSI_Enum | Blue |
static utility::CSI::CSI_Enum | Magenta |
static utility::CSI::CSI_Enum | Cyan |
static utility::CSI::CSI_Enum | White |
static utility::CSI::CSI_Enum | bgBlack |
static utility::CSI::CSI_Enum | bgRed |
static utility::CSI::CSI_Enum | bgGreen |
static utility::CSI::CSI_Enum | bgYellow |
static utility::CSI::CSI_Enum | bgBlue |
static utility::CSI::CSI_Enum | bgMagenta |
static utility::CSI::CSI_Enum | bgCyan |
static utility::CSI::CSI_Enum | bgWhite |
Protected Member Functions | |
TracerImpl & | tracer_impl () |
The function which handles the construct-on-first use Not virtual for speed in the usual (non-creation) case. More... | |
virtual std::unique_ptr< TracerImpl > | create_impl () |
Private Attributes | |
std::string | channel_ |
utility::CSI::CSI_Enum | channel_color_ |
utility::CSI::CSI_Enum | channel_name_color_ |
TracerPriority | priority_ |
bool | muted_by_default_ |
Class for handling user debug/warnings/errors. Use instance of this class instead of 'std::cout' for all your regular io. Channel argument must be related to the location of the source file. For example if you create Tracer object in src/basic/scoring/myfile.cc, then channel must be something like 'basic.scoring.myfile'.
Intended usage is as a global-scope static object. If you need a heap/stack allocated object, use the TracerImpl class directly.
The funky indirection to TracerImpl here is so that the heavy-weight TracerImpl object is only constructed on first use, and isn't static or thread_local
basic::Tracer::Tracer | ( | std::string const & | channel = "" , |
TracerPriority | priority = t_info , |
||
bool | muted_by_default = false |
||
) |
Create Tracer object with given channel and priority.
basic::Tracer::Tracer | ( | std::string const & | channel, |
utility::CSI::CSI_Enum const & | channel_color, | ||
utility::CSI::CSI_Enum const & | channel_name_color = utility::CSI::Nothing , |
||
TracerPriority | priority = t_info , |
||
bool | muted_by_default = false |
||
) |
Create Tracer object with channel color, channel name color and given channel and priority.
Ex: static basic::Tracer Blue("blue", utility::CSI::Blue);
|
virtualdefault |
Ideally, we'd clean ourselves up from the tracer_impl_map, but that's complicated by it being a) thread-dependent, and b) subject to static initialization order fiasco (static destruction order fiasco) issues. Regardless, the associated TracerImpl will be flushed when the static tracer_impl_map gets destroyed. The one tricky bit is that the TracerImpl for non-static tracers stick around, and may accidentally be re-used if we re-use the same pointer ... so avoid non-static Tracer
objects: use a TracerImpl directly instead.
|
delete |
|
inline |
References basic::TracerImpl::channel(), and tracer_impl().
Referenced by basic::show_time().
|
protectedvirtual |
Reimplemented in basic::MemTracer.
References channel_, channel_color_, channel_name_color_, muted_by_default_, and priority_.
Referenced by tracer_impl().
|
inline |
References tracer_impl().
|
inline |
References tracer_impl().
|
inline |
References tracer_impl().
Referenced by apps::pilot::CustomStarTreeMover::apply(), benchmark_contacts(), ChallengeMover::count_alignment(), ChallengeMover::initialize_pose(), main(), measure_sequence_recovery(), my_main(), basic::options::process(), relax_cenrot_pose(), repack_cluster(), basic::mpi::request_data_from_head_node(), run(), ChallengeMover::sample(), and apps::pilot::SampleSecondaryStructureAlignmentMover::setup_startree().
|
inline |
flush tracer buffer and flush buffers of all sub-channels ie: Fatal, Error, Warning, Info, Debug, Trace
References basic::TracerImpl::flush_all_channels(), and tracer_impl().
Referenced by main().
|
inlinestatic |
References basic::TracerImpl::get_all_channels_string().
|
inline |
Get whether we're printing the channel name.
This looks at the local setting, but does not check the global setting.
References basic::TracerImpl::get_local_print_channel_name(), and tracer_impl().
|
inline |
Allow Tracer object to be passed to something expecting a std::ostream.
References tracer_impl().
|
inline |
References tracer_impl().
|
inline |
References tracer_impl().
|
inline |
output operator We return a TracerImpl instead of ourself to make subsequent access faster.
References tracer_impl().
|
inline |
References tracer_impl().
Referenced by main(), print_tree(), and test_Random().
|
inline |
References tracer_impl().
|
inlinestatic |
TODO: See if we can kill any usage of this, except for the esoteric.
References basic::options::OptionKeys::out::file::raw, basic::TracerImpl::set_ios_hook(), and tr.
Referenced by pyrosetta.logging_support.PythonLoggingSink::__del__(), test.T007_TracerIO.MyPyTracer::__del__(), and main().
|
inline |
Set whether we're printing the channel name.
This overrides the local setting, but does not alter the global setting.
References basic::TracerImpl::set_local_print_channel_name(), and tracer_impl().
|
inlinestatic |
global super mute flag that allow to mute all io no matter what.
References basic::TracerImpl::super_mute().
|
inlinestatic |
References create_a3b_hbs::f, and basic::TracerImpl::super_mute().
|
protected |
The function which handles the construct-on-first use Not virtual for speed in the usual (non-creation) case.
References create_impl(), and THREAD_LOCAL.
Referenced by channel(), flags(), flush(), flush_all_channels(), get_local_print_channel_name(), operator std::ostream &(), operator()(), operator<<(), precision(), set_local_print_channel_name(), basic::Tracer::TracerProxy::tracer_proxy_impl(), visible(), and width().
|
inline |
References tracer_impl(), and basic::TracerImpl::visible().
Referenced by main().
|
inline |
References tracer_impl(), and basic::TracerImpl::visible().
|
inline |
References tracer_impl().
Referenced by main().
|
inline |
References tracer_impl().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Referenced by main().
|
static |
Referenced by main().
|
static |
|
static |
Referenced by main().
|
static |
|
static |
|
private |
Referenced by create_impl(), and basic::TracerImpl::init().
|
private |
Referenced by create_impl().
|
private |
Referenced by create_impl().
|
static |
Referenced by build_full_model_test(), and BuildFullModel::fill_and_sample_full_model().
TracerProxy basic::Tracer::Debug |
Referenced by add_side_chains_partialthread(), ThisApplication::analyze_tree(), ConstraintToolMover::apply(), CenRelaxMover::apply(), apps::pilot::CustomStarTreeMover::apply(), apps::pilot::SampleSecondaryStructureAlignmentMover::apply(), MyScoreMover::apply(), MinCenrotMover::apply(), CenRotRelaxMover::apply(), BacksideHbondFinderMover::apply(), DetectSymmetry::apply(), CenRotRBRelaxMover::apply(), build_full_model_test(), calc_scores(), calculate_helical_parameters(), basic::database::schema_generator::Schema::check_table_and_perform_write(), DockFragmentsMover::cluster_frags(), compare_cartesian_rmsd(), compare_frags_pose(), determine_residues_to_rebuild(), drrafter_error_estimation(), evaluate_score(), apps::pilot::momeara::HBondConformation::example_OH_pose(), basic::database::find_cache_file(), protocols::abinitio::JumpSpecificAbrelax::fold(), SetupHotspotMover::generate_csts(), generate_dunbrack_binaries(), protocols::abinitio::JumpSpecificAbrelax::generate_extended_pose(), basic::mpi::MessageListenerFactory::get_listener(), get_median_structure(), get_simple_RNA_protein_fold_tree(), apps::pilot::momeara::HBondConformation::hbond_param_sweep(), InstantiateModulesBenchmark::instantiate_filters(), InstantiateModulesBenchmark::instantiate_movers(), InstantiateModulesBenchmark::instantiate_packer_palettes(), InstantiateModulesBenchmark::instantiate_res_selectors(), InstantiateModulesBenchmark::instantiate_reslvl_taskops(), InstantiateModulesBenchmark::instantiate_simple_metrics(), InstantiateModulesBenchmark::instantiate_taskops(), ChallengeMover::jumps_from_pose(), basic::citation_manager::CitationManager::load_rosetta_citations_from_database(), main(), apps::pilot::momeara::HBondConformation::make_conformation(), make_mutations(), mutate_and_score_RNP(), BacksideHbondFinderMover::mutate_residue(), my_main(), basic::citation_manager::CitationManager::populate_doi_rosetta_citation_map(), read_in_mutations(), read_pose(), read_RDC_file(), read_structures(), read_thickness(), recover_clustered_frags(), apps::pilot::momeara::HBondConformation::relax_pose_around_hbond(), basic::mpi::request_data_from_head_node(), resample_full_model(), ScoreFragmentSetMover::run(), ConsensusFragmentMover::run(), SolutionRescoreMover::run(), DomainAssemblerNDocker::setup_cen_domains(), protocols::abinitio::JumpSpecificAbrelax::setup_fold(), apps::pilot::SampleSecondaryStructureAlignmentMover::setup_startree(), SphereGrinder(), apps::pilot::AlignChunkMover::steal_torsion_from_template(), test_Tracer(), apps::pilot::SampleSecondaryStructureAlignmentMover::translate_virt_to_CoM(), FragMonteCarlo::updated_covered_rsds(), basic::database::schema_generator::Schema::write(), and basic::thread_manager::RosettaThreadAllocation::~RosettaThreadAllocation().
TracerProxy basic::Tracer::Error |
Referenced by append_sequence_to_pose(), collect_residue_types(), correlation(), filter_frags(), get_out_tag(), ClosabilityScore::get_rt_over_leap(), protocols::jd2::RECONMPIJobDistributor::go(), harvest_motifs(), UBQ_E2Mover::init_on_new_input(), UBQ_GTPase_disulfide_Mover::init_on_new_input(), FloppyTailMover::init_on_new_input(), HBondReporter::load_job_data(), load_loops_from_file(), main(), my_main(), basic::datacache::WriteableCacheableDataFactory::new_data_instance(), output_packstat_pdb(), CloudArchiveManagerWrapper::read_batch(), read_in_flexible_regions(), read_in_mutations(), read_RDC_file(), RosettaJob::request_job_from_server(), ThisApplication::run(), ScoreEachBenchmark::run(), ScoreEachBenchmark::run_long_ranged_two_body_energy(), ScoreEachBenchmark::run_one_body_energy(), ScoreEachBenchmark::run_short_ranged_two_body_energy(), basic::database::safely_prepare_statement(), set_secstruct_from_psipred_ss2(), ScoreEachBenchmark::setUp(), basic::show_time(), sicdock_thread_num(), RerootRestypeVisitor::start_vertex(), statistics(), test_Tracer(), usage(), validate_dunbrack_binaries(), basic::database::schema_generator::Schema::write(), basic::database::write_schema_to_database(), and basic::tensorflow_manager::RosettaTensorflowManager::~RosettaTensorflowManager().
TracerProxy basic::Tracer::Fatal |
channels with predefined priority levels.
Referenced by DummyMover::apply(), check_option_conflicts(), basic::random::determine_random_number_seed(), main(), pose_pos_from_pdb_pos(), reconstruct_lattice_pose_info(), set_basic_dock_options(), basic::options::start_files(), and test_Tracer().
|
static |
Referenced by BuildFullModel::fill_and_sample_full_model(), and main().
TracerProxy basic::Tracer::Info |
Referenced by protocols::abinitio::JumpSpecificAbrelax::add_constraints(), protocols::abinitio::ApplicationContext::ApplicationContext(), MinToolMover::apply(), ScoreMover::apply(), ConstraintToolMover::apply(), RDCToolMover::apply(), SetupHotspotMover::apply(), LoopHashRelax_Sampler::apply(), attach_abego_pools(), attach_simple_abego_pools(), protocols::abinitio::JumpSpecificAbrelax::check_filters(), check_jump(), compute_chi(), compute_intrinsic_deviation(), protocols::abinitio::Application::copy_native_structure(), protocols::abinitio::JumpSpecificAbrelax::copy_native_structure(), protocols::abinitio::JumpSpecificAbrelax::copy_structure(), protocols::abinitio::JumpSpecificAbrelax::do_distributed_rerun(), protocols::abinitio::JumpSpecificAbrelax::do_rerun(), filter_frags(), find_disulfides(), protocols::abinitio::JumpSpecificAbrelax::fold(), SetupHotspotMover::generate_csts(), InjectorMover::hash(), protocols::abinitio::JumpSpecificAbrelax::initialize_constraint_forest(), FragMonteCarlo::initialize_frag_assignment(), FragMonteCarlo::load_scorefiles(), LoopBuild_main(), main(), read_RDC_file(), FragMonteCarlo::report_results(), FragMonteCarlo::report_score(), protocols::abinitio::Application::run(), run(), ThisApplication::run(), run_sandbox(), run_tyr_his(), sequence_tolerance_mf_main(), protocols::abinitio::JumpSpecificAbrelax::setup(), ThisApplication::setup(), setup_favor_native(), protocols::abinitio::JumpSpecificAbrelax::setup_fold(), protocols::abinitio::JumpSpecificAbrelax::setup_fragments(), setup_hotspot_filter(), protocols::abinitio::JumpSpecificAbrelax::setup_jumps(), protocols::abinitio::JumpSpecificAbrelax::setup_templates(), show_dna_geometry(), test_Tracer(), and write_cluster_frags().
|
static |
|
private |
Referenced by create_impl().
|
private |
Referenced by create_impl(), and basic::TracerImpl::init().
|
static |
Referenced by build_full_model_test(), BuildFullModel::fill_and_sample_full_model(), main(), and MC_run().
|
static |
These are just convenience references to the enum entries
Referenced by dsRNA_grow::apply(), build_full_model_test(), BuildFullModel::fill_and_sample_full_model(), main(), BuildFullModel::make_built_residues_repulsive(), BuildFullModel::make_built_residues_virtual(), mg_modeler_test(), my_main(), output_seq_with_residue_emphasis(), swa_rna_sample(), and basic::citation_manager::CitationManager::write_all_citations_and_unpublished_author_info().
TracerProxy basic::Tracer::Trace |
Referenced by analyze_poses_for_convergence(), attach_simple_abego_pools(), bk_test(), bump_check(), basic::database::schema_generator::Schema::check_table_and_perform_write(), densityTools(), evaluate_score(), main(), BuildFullModel::make_built_residues_repulsive(), output_seq_with_residue_emphasis(), rebuild_test(), ThisApplication::run(), protocols::abinitio::JumpSpecificAbrelax::setup_jumps(), test_Tracer(), and write_cluster_frags().
|
static |
TracerProxy basic::Tracer::Warning |
Referenced by protocols::abinitio::JumpSpecificAbrelax::add_constraints(), RescoreSAXS::apply(), CenRotRelaxMover::apply(), ConstraintConfig::apply_fa_csts(), build_full_model_test(), check_interface_symmetry(), check_number_of_poses(), protocols::abinitio::JumpSpecificAbrelax::close_loops(), cluster_silent(), count_analytically(), basic::thread_manager::RosettaThreadManager::do_multistage_work_vector_in_threads(), do_options_checks(), basic::thread_manager::RosettaThreadManager::do_work_vector_in_threads(), filter_combine_long_loop(), basic::database::full_name(), get_angles(), PoseWrap::get_closest_res_for_sc_attach(), basic::database::get_db_session(), get_distance(), get_distance_endpoint(), get_distance_midCA(), MPInterfaceStatistics::get_number_pi_stacking(), get_options_from_options_collection(), TCDock::init(), main(), my_main(), output_residue_types(), ConstraintConfig::parse_config_file(), basic::database::parse_database_connection(), PoseWrap::PoseWrap(), read_ERMS(), recover_clustered_frags(), reroot_restype(), run_aio(), set_basic_dock_options(), basic::database::set_cache_size(), ScoreEachBenchmark::setUp(), InteractionGraphPerformanceBenchmark::setup_for_sc12he(), InteractionGraphPerformanceBenchmark::setup_for_sc12sp2(), InteractionGraphPerformanceBenchmark::setup_for_score12(), InteractionGraphPerformanceBenchmark::setup_for_sp2hecart(), protocols::abinitio::JumpSpecificAbrelax::setup_fragments(), protocols::abinitio::JumpSpecificAbrelax::setup_jumps(), protocols::abinitio::JumpSpecificAbrelax::setup_templates(), HubDenovo::stupid_ddg(), swa_rna_cluster(), PoseWrap::switch_to_cen(), PoseWrap::switch_to_fa(), test_Tracer(), thread_fxn(), trim_back_t033_pose(), and write_cluster_frags().
|
static |
|
static |