CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Public Attributes

edm::es::Label Struct Reference

#include <es_Label.h>

List of all members.

Public Member Functions

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

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.

: labels_(), default_() {}
edm::es::Label::Label ( const char *  iLabel) [inline]

Definition at line 53 of file es_Label.h.

: labels_(), default_(iLabel) {}
edm::es::Label::Label ( const std::string &  iString) [inline]

Definition at line 54 of file es_Label.h.

: labels_(), default_(iString) {}
edm::es::Label::Label ( const std::string &  iString,
unsigned int  iIndex 
) [inline]

Definition at line 55 of file es_Label.h.

References labels_.

                                                              : 
           labels_(iIndex+1,def()), default_() {labels_[iIndex] = iString;}

Member Function Documentation

static const std::string& edm::es::Label::def ( ) [inline, static]

Definition at line 81 of file es_Label.h.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by operator()().

                                       {
            static const std::string s_def("\n\t");
            return s_def;
         }
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.

                                                                          {
            if(iIndex==labels_.size()){
               labels_.push_back(iString);
            } else if(iIndex > labels_.size()) {
               std::vector<std::string> temp(iIndex+1,def());
               copy_all(labels_, temp.begin());
               labels_.swap(temp);
            } else {
               if( labels_[iIndex] != def() ) {
                  Exception e(errors::Configuration,"Duplicate Label");
                  e <<"The index "<<iIndex<<" was previously assigned the label \""
                    <<labels_[iIndex]<<"\" and then was later assigned \""
                    <<iString<<"\"";
                  e.raise();
               }
               labels_[iIndex] = iString;
            }
            return *this;
         }
Label& edm::es::Label::operator() ( int  iIndex,
const std::string &  iString 
) [inline]

Definition at line 77 of file es_Label.h.

                                                                 {
            return (*this)(iString, iIndex);
         }

Member Data Documentation

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().