CMS 3D CMS Logo

Public Member Functions | Private Types | Private Attributes | Static Private Attributes

edm::messagedrop::StringProducerWithPhase Class Reference

Inheritance diagram for edm::messagedrop::StringProducerWithPhase:
edm::messagedrop::StringProducer

List of all members.

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

Detailed Description

Definition at line 86 of file MessageDrop.cc.


Member Typedef Documentation

typedef std::map<const void*, std::string>::const_iterator edm::messagedrop::StringProducerWithPhase::NLMiter [private]

Definition at line 88 of file MessageDrop.cc.


Constructor & Destructor Documentation

edm::messagedrop::StringProducerWithPhase::StringProducerWithPhase ( ) [inline]

Definition at line 90 of file MessageDrop.cc.


Member Function Documentation

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 diffTwoXMLs::label, and mergeVDriftHistosByStation::name.

Referenced by edm::MessageDrop::setModuleWithPhase().

                                 {
      name_ = &name;
      label_ = &label;     
      moduleID_ = moduleID;
      phasePtr_ = phase;
      cache_.clear();        
    } 
virtual void edm::messagedrop::StringProducerWithPhase::snapshot ( ) [inline, virtual]
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_;
    }

Member Data Documentation

std::string edm::messagedrop::StringProducerWithPhase::cache_ [mutable, private]

Definition at line 153 of file MessageDrop.cc.

Definition at line 150 of file MessageDrop.cc.

Definition at line 148 of file MessageDrop.cc.

Definition at line 152 of file MessageDrop.cc.

Definition at line 149 of file MessageDrop.cc.

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.

Definition at line 146 of file MessageDrop.cc.

Definition at line 151 of file MessageDrop.cc.

Definition at line 156 of file MessageDrop.cc.

Definition at line 155 of file MessageDrop.cc.

Definition at line 157 of file MessageDrop.cc.