CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
edm::ESInputTag Class Reference

#include <ESInputTag.h>

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 87 of file ESInputTag.h.

Constructor & Destructor Documentation

ESInputTag::ESInputTag ( )
explicitdefault
ESInputTag::ESInputTag ( const std::string &  iModuleLabel,
const std::string &  iDataLabel 
)
explicit

Definition at line 26 of file ESInputTag.cc.

27  : module_(moduleLabel), data_(dataLabel) {}
std::string data_
Definition: ESInputTag.h:113
std::string module_
Definition: ESInputTag.h:112
ESInputTag::ESInputTag ( const std::string &  iEncodedValue)
explicit

Definition at line 29 of file ESInputTag.cc.

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

29  {
30  // string is delimited by colons
31  std::vector<std::string> tokens = tokenize(iEncodedValue, ":");
32  int nwords = tokens.size();
33  if (nwords > 2) {
34  throw edm::Exception(errors::Configuration, "ESInputTag")
35  << "ESInputTag " << iEncodedValue << " has " << nwords << " tokens but only up two 2 are allowed.";
36  }
37  if (nwords > 0)
38  module_ = tokens[0];
39  if (nwords > 1)
40  data_ = tokens[1];
41 }
std::string data_
Definition: ESInputTag.h:113
std::string module_
Definition: ESInputTag.h:112
std::vector< std::string > tokenize(std::string const &input, std::string const &separator)
breaks the input string into tokens, delimited by the separator

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 104 of file ESInputTag.h.

References data_, encode(), operator==(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by edm::ESConsumesCollector::consumesFrom(), edm::operator<<(), PYBIND11_MODULE(), edm::EDConsumerBase::recordESConsumes(), edm::eventsetup::EventSetupRecordImpl::validate(), and edm::eventsetup::EventSetupRecord::validate().

104 { return data_; }
std::string data_
Definition: ESInputTag.h:113
std::string ESInputTag::encode ( ) const

Definition at line 50 of file ESInputTag.cc.

References data_, module_, mps_fire::result, edm::separator(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by data(), edm::encode(), and FWPSetTableManager::handleEntry().

50  {
51  static std::string const separator(":");
53  if (!data_.empty()) {
54  result += separator + data_;
55  }
56  return result;
57 }
std::string data_
Definition: ESInputTag.h:113
std::string module_
Definition: ESInputTag.h:112
static std::string const separator(":")
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 99 of file ESInputTag.h.

References module_.

Referenced by DDCMSDetector::analyze(), DDTestDumpGeometry::analyze(), DDTestDumpFile::analyze(), DDTestNavigateGeometry::analyze(), edm::ESConsumesCollector::consumesFrom(), edm::operator<<(), PYBIND11_MODULE(), edm::EDConsumerBase::recordESConsumes(), edm::eventsetup::EventSetupRecordImpl::validate(), and edm::eventsetup::EventSetupRecord::validate().

99 { return module_; }
std::string module_
Definition: ESInputTag.h:112
bool ESInputTag::operator== ( const edm::ESInputTag iRHS) const

Definition at line 46 of file ESInputTag.cc.

References data_, and module_.

Referenced by data().

46  {
47  return module_ == iRHS.module_ && data_ == iRHS.data_;
48 }
std::string data_
Definition: ESInputTag.h:113
std::string module_
Definition: ESInputTag.h:112

Member Data Documentation

std::string edm::ESInputTag::data_
private

Definition at line 113 of file ESInputTag.h.

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

std::string edm::ESInputTag::module_
private

Definition at line 112 of file ESInputTag.h.

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