larlight::Message Class Reference

Utility class used to show formatted message on the screen. More...

#include <messenger.hh>

List of all members.

Static Public Member Functions

static Messageget ()
 Getter of a message instance.
static void send (MSG::Level level, std::string msg)
 Static method to send message out.
static void send (MSG::Level level, std::string where, std::string msg)
 Extra argument "where" is used to indicate function/class name.

Private Member Functions

 Message ()
 Default constructor ... make it private to limit the duplication of instance.
virtual ~Message ()
 Default destructor.

Static Private Attributes

static Messageme = 0
 Private static pointer.

Detailed Description

Utility class used to show formatted message on the screen.

Definition at line 28 of file messenger.hh.


Constructor & Destructor Documentation

larlight::Message::Message (  )  [inline, private]

Default constructor ... make it private to limit the duplication of instance.

Definition at line 33 of file messenger.hh.

Referenced by get().

00033 {};

virtual larlight::Message::~Message (  )  [inline, private, virtual]

Default destructor.

Definition at line 36 of file messenger.hh.

00036 {};


Member Function Documentation

static Message* larlight::Message::get (  )  [inline, static]
void larlight::Message::send ( MSG::Level  level,
std::string  where,
std::string  msg 
) [static]

Extra argument "where" is used to indicate function/class name.

Definition at line 18 of file messenger.cc.

References larlight::MSG::ColorPrefix, and larlight::MSG::StringPrefix.

00019   {
00020     std::cout 
00021       << MSG::ColorPrefix[level].c_str()
00022       << MSG::StringPrefix[level].c_str()
00023       << "\033[0m"
00024       << "\033[95m"
00025       << "<"
00026       << where.c_str()
00027       << "> "
00028       << "\033[0m"
00029       << msg.c_str()
00030       << std::endl;
00031   }

void larlight::Message::send ( MSG::Level  level,
std::string  msg 
) [static]

Static method to send message out.

Definition at line 8 of file messenger.cc.

References larlight::MSG::ColorPrefix, and larlight::MSG::StringPrefix.

Referenced by larlight::mcshower::AddEdepVtx(), larlight::data_base::association(), larlight::calorimetry::calorimetry(), larlight::mcshower::Charge(), larlight::storage_manager::close(), larlight::cluster::cluster(), larlight::mcshower::DaughterAngle2D(), larlight::user_info::dump_contents(), larlight::endpoint2d::endpoint2d(), larlight::event_calorimetry::event_calorimetry(), larlight::event_cluster::event_cluster(), larlight::event_endpoint2d::event_endpoint2d(), larlight::event_fifo::event_fifo(), larlight::event_hit::event_hit(), larlight::event_mcpart::event_mcpart(), larlight::event_mcshower::event_mcshower(), larlight::event_mctruth::event_mctruth(), larlight::event_pulse::event_pulse(), larlight::event_shower::event_shower(), larlight::event_simch::event_simch(), larlight::event_sps::event_sps(), larlight::event_track::event_track(), larlight::event_user::event_user(), larlight::event_vertex::event_vertex(), larlight::event_wire::event_wire(), larlight::fifo::fifo(), larlight::ana_processor::finalize(), larlight::event_track::get_axis_range(), larlight::track::get_axis_range(), larlight::event_sps::get_axis_range(), larlight::event_hit::get_axis_range(), larlight::user_info::get_barray(), larlight::user_info::get_bool(), larlight::user_info::get_darray(), larlight::storage_manager::get_data(), larlight::user_info::get_double(), larlight::cluster::get_hit_type(), larlight::user_info::get_iarray(), larlight::user_info::get_int(), larlight::user_info::get_sarray(), larlight::user_info::get_string(), larlight::hit::hit(), larlight::ana_processor::initialize(), main(), larlight::mcnu::mcnu(), larlight::mcpart::mcpart(), larlight::mcshower::mcshower(), larlight::mctrajectory::mctrajectory(), larlight::mctruth::mctruth(), larlight::mcshower::MotherAngle2D(), larlight::storage_manager::next_event(), larlight::storage_manager::open(), larlight::pmtfifo::pmtfifo(), larlight::storage_manager::prepare_tree(), larlight::larlight_base::print(), larlight::ana_processor::process_event(), larlight::pulse::pulse(), larutil::LArUtilManager::ReconfigureUtilities(), larlight::storage_manager::reset(), larlight::ana_processor::reset(), larlight::ana_processor::run(), larlight::mcshower::SetDaughterMomentum(), larlight::mcshower::SetDaughterPosition(), larutil::LArUtilConfig::SetDetector(), larlight::mcshower::SetEdepVtx(), larlight::mcshower::SetMotherMomentum(), larlight::mcshower::SetMotherPoint(), larlight::mctruth::SetNeutrino(), larlight::shower::shower(), larlight::simch::simch(), larlight::spacepoint::spacepoint(), larlight::tpcfifo::tpcfifo(), larlight::track::track(), larlight::trigger::trigger(), larlight::user_info::user_info(), larlight::vertex::vertex(), and larlight::wire::wire().

00009   {
00010     std::cout 
00011       << MSG::ColorPrefix[level].c_str()
00012       << MSG::StringPrefix[level].c_str()
00013       << "\033[0m"
00014       << msg.c_str()
00015       << std::endl;
00016   }


Member Data Documentation

Message * larlight::Message::me = 0 [static, private]

Private static pointer.

Definition at line 36 of file messenger.hh.

Referenced by get().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator

Generated on 3 Jun 2014 for MyProject by  doxygen 1.6.1