Public Member Functions | |
void | set (std::string const &name, std::string const &label, const void *moduleID, const char *phase) |
virtual void | snapshot () |
StringProducerWithPhase () | |
virtual std::string | theContext () const |
Private Types | |
typedef std::map< const void *, std::string > ::const_iterator | NLMiter |
Private Attributes | |
std::string | cache_ |
std::string const * | label_ |
std::string const | label_initial_value_ |
const void * | moduleID_ |
std::string const * | name_ |
std::string const | name_initial_value_ |
std::map< const void *, std::string > | nameLabelMap_ |
const char * | phasePtr_ |
std::string | snapshot_label_ |
std::string | snapshot_name_ |
char | snapshot_phase_ [PHASE_MAX_LENGTH+1] |
Static Private Attributes | |
static const int | PHASE_MAX_LENGTH = 32 |
Definition at line 86 of file MessageDrop.cc.
typedef std::map<const void*, std::string>::const_iterator edm::messagedrop::StringProducerWithPhase::NLMiter [private] |
Definition at line 88 of file MessageDrop.cc.
edm::messagedrop::StringProducerWithPhase::StringProducerWithPhase | ( | ) | [inline] |
Definition at line 90 of file MessageDrop.cc.
: name_initial_value_ (" ") // change log 4 , label_initial_value_ (" ") , name_ (&name_initial_value_) , label_ (&label_initial_value_) , phasePtr_ ("(Startup)") , moduleID_ (0) , cache_ () , nameLabelMap_ () , snapshot_name_ () , snapshot_label_ () , snapshot_phase_ () { memset(snapshot_phase_, '\0', sizeof(snapshot_phase_)); }
void edm::messagedrop::StringProducerWithPhase::set | ( | std::string const & | name, |
std::string const & | label, | ||
const void * | moduleID, | ||
const char * | phase | ||
) | [inline] |
Definition at line 123 of file MessageDrop.cc.
References label, and mergeVDriftHistosByStation::name.
Referenced by edm::MessageDrop::setModuleWithPhase().
virtual void edm::messagedrop::StringProducerWithPhase::snapshot | ( | ) | [inline, virtual] |
Implements edm::messagedrop::StringProducer.
Definition at line 133 of file MessageDrop.cc.
{ snapshot_name_ = *name_; name_ = &snapshot_name_; snapshot_label_ = *label_; label_ = &snapshot_label_; if ( snapshot_phase_ != phasePtr_ ) { // change log 6 std::strncpy (snapshot_phase_,phasePtr_,PHASE_MAX_LENGTH); } snapshot_phase_[PHASE_MAX_LENGTH] = 0; phasePtr_ = snapshot_phase_; }
virtual std::string edm::messagedrop::StringProducerWithPhase::theContext | ( | ) | const [inline, virtual] |
Implements edm::messagedrop::StringProducer.
Definition at line 105 of file MessageDrop.cc.
{ if (cache_.empty()) { if (moduleID_ != 0) { NLMiter nameLableIter = nameLabelMap_.find(moduleID_); if (nameLableIter != nameLabelMap_.end()) { cache_.assign(nameLableIter->second); cache_.append(phasePtr_); return cache_; } } cache_.assign(*name_); cache_.append(":"); cache_.append(*label_); nameLabelMap_[moduleID_] = cache_; cache_.append(phasePtr_); } return cache_; }
std::string edm::messagedrop::StringProducerWithPhase::cache_ [mutable, private] |
Definition at line 153 of file MessageDrop.cc.
std::string const* edm::messagedrop::StringProducerWithPhase::label_ [private] |
Definition at line 150 of file MessageDrop.cc.
std::string const edm::messagedrop::StringProducerWithPhase::label_initial_value_ [private] |
Definition at line 148 of file MessageDrop.cc.
const void* edm::messagedrop::StringProducerWithPhase::moduleID_ [private] |
Definition at line 152 of file MessageDrop.cc.
std::string const* edm::messagedrop::StringProducerWithPhase::name_ [private] |
Definition at line 149 of file MessageDrop.cc.
std::string const edm::messagedrop::StringProducerWithPhase::name_initial_value_ [private] |
Definition at line 147 of file MessageDrop.cc.
std::map<const void*, std::string> edm::messagedrop::StringProducerWithPhase::nameLabelMap_ [mutable, private] |
Definition at line 154 of file MessageDrop.cc.
const int edm::messagedrop::StringProducerWithPhase::PHASE_MAX_LENGTH = 32 [static, private] |
Definition at line 146 of file MessageDrop.cc.
const char* edm::messagedrop::StringProducerWithPhase::phasePtr_ [private] |
Definition at line 151 of file MessageDrop.cc.
std::string edm::messagedrop::StringProducerWithPhase::snapshot_label_ [private] |
Definition at line 156 of file MessageDrop.cc.
std::string edm::messagedrop::StringProducerWithPhase::snapshot_name_ [private] |
Definition at line 155 of file MessageDrop.cc.
char edm::messagedrop::StringProducerWithPhase::snapshot_phase_[PHASE_MAX_LENGTH+1] [private] |
Definition at line 157 of file MessageDrop.cc.