CMS 3D CMS Logo

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

#include <ElementID.h>

Public Types

using key_type = unsigned int
 

Public Member Functions

 ElementID ()=default
 
 ElementID (edm::ProductID id, key_type ind)
 
ProductID id () const
 
key_type index () const
 
bool isValid () const
 
key_type key () const
 
void reset ()
 
void swap (ElementID &other)
 

Private Attributes

ProductID id_
 
key_type index_ = 0
 

Detailed Description

ElementID is a unique identifier for an element within a container. It extends the ProductID concept by adding an index to an object within a container.

It provides both index() and key() methods so that it can be used in place of Ref/Ptr in the interfaces of e.g. ValueMap or Association.

Definition at line 17 of file ElementID.h.

Member Typedef Documentation

using edm::ElementID::key_type = unsigned int

Definition at line 19 of file ElementID.h.

Constructor & Destructor Documentation

edm::ElementID::ElementID ( )
default
edm::ElementID::ElementID ( edm::ProductID  id,
key_type  ind 
)
inlineexplicit

Definition at line 22 of file ElementID.h.

22 : index_(ind), id_(id) {}
key_type index_
Definition: ElementID.h:36
ProductID id_
Definition: ElementID.h:37

Member Function Documentation

ProductID edm::ElementID::id ( ) const
inline

Definition at line 25 of file ElementID.h.

References id_.

Referenced by edm::operator<(), and edm::operator==().

25 { return id_; }
ProductID id_
Definition: ElementID.h:37
key_type edm::ElementID::index ( ) const
inline

Definition at line 26 of file ElementID.h.

References index_.

Referenced by BeautifulSoup.PageElement::insert(), edm::operator<(), and edm::operator==().

26 { return index_; }
key_type index_
Definition: ElementID.h:36
bool edm::ElementID::isValid ( void  ) const
inline

Definition at line 24 of file ElementID.h.

References id_, and edm::ProductID::isValid().

Referenced by ntupleDataFormat._Object::_checkIsValid(), and core.AutoHandle.AutoHandle::ReallyLoad().

24 { return id_.isValid(); }
ProductID id_
Definition: ElementID.h:37
bool isValid() const
Definition: ProductID.h:32
key_type edm::ElementID::key ( ) const
inline

Definition at line 27 of file ElementID.h.

References index_.

27 { return index_; }
key_type index_
Definition: ElementID.h:36
void edm::ElementID::reset ( void  )
inline

Definition at line 28 of file ElementID.h.

References id_, index_, trackingPlots::other, edm::ProductID::reset(), and swap().

28  {
29  index_ = 0;
30  id_.reset();
31  }
void reset()
Definition: ProductID.h:36
key_type index_
Definition: ElementID.h:36
ProductID id_
Definition: ElementID.h:37
void edm::ElementID::swap ( ElementID other)

Definition at line 6 of file ElementID.cc.

References id_, index_, edm::swap(), and std::swap().

Referenced by reset(), and edm::swap().

6  {
7  std::swap(index_, other.index_);
8  edm::swap(id_, other.id_);
9  }
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:117
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
key_type index_
Definition: ElementID.h:36
ProductID id_
Definition: ElementID.h:37

Member Data Documentation

ProductID edm::ElementID::id_
private

Definition at line 37 of file ElementID.h.

Referenced by id(), isValid(), reset(), and swap().

key_type edm::ElementID::index_ = 0
private

Definition at line 36 of file ElementID.h.

Referenced by index(), key(), reset(), and swap().