test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes
edm::es::Label Struct Reference

#include <es_Label.h>

Public Member Functions

 Label ()
 
 Label (const char *iLabel)
 
 Label (const std::string &iString)
 
 Label (const std::string &iString, unsigned int iIndex)
 
Labeloperator() (const std::string &iString, unsigned int iIndex)
 
Labeloperator() (int iIndex, const std::string &iString)
 

Static Public Member Functions

static const std::string & def ()
 

Public Attributes

std::string default_
 
std::vector< std::string > labels_
 

Detailed Description

Definition at line 51 of file es_Label.h.

Constructor & Destructor Documentation

edm::es::Label::Label ( )
inline

Definition at line 52 of file es_Label.h.

52 : labels_(), default_() {}
std::string default_
Definition: es_Label.h:86
std::vector< std::string > labels_
Definition: es_Label.h:85
edm::es::Label::Label ( const char *  iLabel)
inline

Definition at line 53 of file es_Label.h.

53 : labels_(), default_(iLabel) {}
std::string default_
Definition: es_Label.h:86
std::vector< std::string > labels_
Definition: es_Label.h:85
edm::es::Label::Label ( const std::string &  iString)
inline

Definition at line 54 of file es_Label.h.

54 : labels_(), default_(iString) {}
std::string default_
Definition: es_Label.h:86
std::vector< std::string > labels_
Definition: es_Label.h:85
edm::es::Label::Label ( const std::string &  iString,
unsigned int  iIndex 
)
inline

Definition at line 55 of file es_Label.h.

References labels_.

55  :
56  labels_(iIndex+1,def()), default_() {labels_[iIndex] = iString;}
static const std::string & def()
Definition: es_Label.h:81
std::string default_
Definition: es_Label.h:86
std::vector< std::string > labels_
Definition: es_Label.h:85

Member Function Documentation

static const std::string& edm::es::Label::def ( )
inlinestatic

Definition at line 81 of file es_Label.h.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by operator()(), and edm::ESProducer::registerProduct().

81  {
82  static const std::string s_def("\n\t");
83  return s_def;
84  }
Label& edm::es::Label::operator() ( const std::string &  iString,
unsigned int  iIndex 
)
inline

Definition at line 58 of file es_Label.h.

References edm::errors::Configuration, edm::copy_all(), def(), alignCSCRings::e, labels_, cms::Exception::raise(), and groupFilesInBlocks::temp.

58  {
59  if(iIndex==labels_.size()){
60  labels_.push_back(iString);
61  } else if(iIndex > labels_.size()) {
62  std::vector<std::string> temp(iIndex+1,def());
63  copy_all(labels_, temp.begin());
64  labels_.swap(temp);
65  } else {
66  if( labels_[iIndex] != def() ) {
67  Exception e(errors::Configuration,"Duplicate Label");
68  e <<"The index "<<iIndex<<" was previously assigned the label \""
69  <<labels_[iIndex]<<"\" and then was later assigned \""
70  <<iString<<"\"";
71  e.raise();
72  }
73  labels_[iIndex] = iString;
74  }
75  return *this;
76  }
static const std::string & def()
Definition: es_Label.h:81
Func copy_all(ForwardSequence &s, Func f)
wrappers for copy
Definition: Algorithms.h:24
std::vector< std::string > labels_
Definition: es_Label.h:85
Label& edm::es::Label::operator() ( int  iIndex,
const std::string &  iString 
)
inline

Definition at line 77 of file es_Label.h.

77  {
78  return (*this)(iString, iIndex);
79  }

Member Data Documentation

std::string edm::es::Label::default_

Definition at line 86 of file es_Label.h.

Referenced by edm::ESProducer::registerProduct().

std::vector<std::string> edm::es::Label::labels_

Definition at line 85 of file es_Label.h.

Referenced by Label(), operator()(), and edm::ESProducer::registerProduct().