CMS 3D CMS Logo

Public Member Functions | Private Attributes

edm::ESInputTag Class Reference

#include <ESInputTag.h>

List of all members.

Public Member Functions

const std::string & data () const
std::string encode () const
 ESInputTag ()
 ESInputTag (const std::string &iModuleLabel, const std::string &iDataLabel)
 ESInputTag (const std::string &iEncodedValue)
const std::string & module () const
bool operator== (const edm::ESInputTag &iRHS) const

Private Attributes

std::string data_
std::string module_

Detailed Description

Definition at line 42 of file ESInputTag.h.


Constructor & Destructor Documentation

ESInputTag::ESInputTag ( )

Definition at line 34 of file ESInputTag.cc.

{
}
ESInputTag::ESInputTag ( const std::string &  iModuleLabel,
const std::string &  iDataLabel 
)

Definition at line 38 of file ESInputTag.cc.

                                                                              :
module_(moduleLabel),
data_(dataLabel)
{
}
ESInputTag::ESInputTag ( const std::string &  iEncodedValue)

Definition at line 44 of file ESInputTag.cc.

References edm::errors::Configuration, data_, Exception, module_, edm::tokenize(), and EcalElecEmulTccFlatFileProducerFromTPG_cfg::tokens.

{
   // string is delimited by colons
   std::vector<std::string> tokens = tokenize(iEncodedValue, ":");
   int nwords = tokens.size();
   if(nwords > 2) {
      throw edm::Exception(errors::Configuration,"ESInputTag")
      << "ESInputTag " << iEncodedValue << " has " << nwords << " tokens but only up two 2 are allowed.";
   }
   if(nwords > 0) module_ = tokens[0];
   if(nwords > 1) data_ = tokens[1];
}

Member Function Documentation

const std::string& edm::ESInputTag::data ( ) const [inline]

Returns the label used to access the data from the EventSetup. The empty string is an allowed (and default) value.

Definition at line 62 of file ESInputTag.h.

References data_.

Referenced by BOOST_PYTHON_MODULE(), and edm::eventsetup::EventSetupRecord::validate().

{return data_;}
std::string ESInputTag::encode ( ) const

Definition at line 91 of file ESInputTag.cc.

References data_, module_, and query::result.

Referenced by edm::encode().

                                   {
   static std::string const separator(":");
   std::string result = module_;
   if(!data_.empty()) {
      result += separator + data_;
   }
   return result;
}
const std::string& edm::ESInputTag::module ( ) const [inline]

Returns the label assigned to the module for the data to be retrieved. If the value matches the defaultModule value (which is the empty string) Then no match is attempted with the module label.

Definition at line 57 of file ESInputTag.h.

References module_.

Referenced by BOOST_PYTHON_MODULE(), and edm::eventsetup::EventSetupRecord::validate().

{ return module_;}
bool ESInputTag::operator== ( const edm::ESInputTag iRHS) const

Definition at line 85 of file ESInputTag.cc.

References data_, and module_.

{
   return module_ == iRHS.module_ &&
   data_ == iRHS.data_;
}

Member Data Documentation

std::string edm::ESInputTag::data_ [private]

Definition at line 78 of file ESInputTag.h.

Referenced by data(), encode(), ESInputTag(), and operator==().

std::string edm::ESInputTag::module_ [private]

Definition at line 77 of file ESInputTag.h.

Referenced by encode(), ESInputTag(), module(), and operator==().