CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
HcalItemColl< Item > Class Template Reference

#include <HcalItemColl.h>

Public Types

typedef Item value_type
 

Public Member Functions

const Item & at (const unsigned index) const
 
void clear ()
 
bool empty () const
 
const Item * get (const unsigned index) const
 
bool operator!= (const HcalItemColl &r) const
 
bool operator== (const HcalItemColl &r) const
 
void push_back (std::unique_ptr< Item > ptr)
 
void reserve (const unsigned n)
 
std::size_t size () const
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, unsigned)
 

Private Attributes

std::vector< std::shared_ptr< Item > > data_
 

Friends

class boost::serialization::access
 

Detailed Description

template<typename Item>
class HcalItemColl< Item >

Definition at line 21 of file HcalItemColl.h.

Member Typedef Documentation

◆ value_type

template<typename Item>
typedef Item HcalItemColl< Item >::value_type

Definition at line 23 of file HcalItemColl.h.

Member Function Documentation

◆ at()

template<typename Item>
const Item& HcalItemColl< Item >::at ( const unsigned  index) const
inline

Definition at line 45 of file HcalItemColl.h.

45 { return *data_.at(index); }

◆ clear()

template<typename Item>
void HcalItemColl< Item >::clear ( void  )
inline

Definition at line 29 of file HcalItemColl.h.

29 { data_.clear(); }

Referenced by BeautifulSoup.Tag::setString().

◆ empty()

template<typename Item>
bool HcalItemColl< Item >::empty ( ) const
inline

Definition at line 34 of file HcalItemColl.h.

34 { return data_.empty(); }

◆ get()

template<typename Item>
const Item* HcalItemColl< Item >::get ( const unsigned  index) const
inline

◆ operator!=()

template<typename Item>
bool HcalItemColl< Item >::operator!= ( const HcalItemColl< Item > &  r) const
inline

Definition at line 58 of file HcalItemColl.h.

58 { return !(*this == r); }

◆ operator==()

template<typename Item>
bool HcalItemColl< Item >::operator== ( const HcalItemColl< Item > &  r) const
inline

Definition at line 48 of file HcalItemColl.h.

48  {
49  const std::size_t sz = data_.size();
50  if (sz != r.data_.size())
51  return false;
52  for (std::size_t i = 0; i < sz; ++i)
53  if (!(*data_[i] == *r.data_[i]))
54  return false;
55  return true;
56  }

◆ push_back()

template<typename Item>
void HcalItemColl< Item >::push_back ( std::unique_ptr< Item >  ptr)
inline

Definition at line 26 of file HcalItemColl.h.

26 { data_.push_back(std::shared_ptr<Item>(ptr.release())); }

◆ reserve()

template<typename Item>
void HcalItemColl< Item >::reserve ( const unsigned  n)
inline

Definition at line 30 of file HcalItemColl.h.

30 { data_.reserve(n); }

◆ serialize()

template<typename Item>
template<class Archive >
void HcalItemColl< Item >::serialize ( Archive &  ar,
unsigned   
)
inlineprivate

Definition at line 66 of file HcalItemColl.h.

66  {
67  ar& data_;
68  }

◆ size()

template<typename Item>
std::size_t HcalItemColl< Item >::size ( void  ) const
inline

Definition at line 33 of file HcalItemColl.h.

33 { return data_.size(); }

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

Friends And Related Function Documentation

◆ boost::serialization::access

template<typename Item>
friend class boost::serialization::access
friend

Definition at line 63 of file HcalItemColl.h.

Member Data Documentation

◆ data_

template<typename Item>
std::vector<std::shared_ptr<Item> > HcalItemColl< Item >::data_
private
mps_fire.i
i
Definition: mps_fire.py:355
HcalItemColl::get
const Item * get(const unsigned index) const
Definition: HcalItemColl.h:37
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
HcalItemColl::data_
std::vector< std::shared_ptr< Item > > data_
Definition: HcalItemColl.h:61
alignCSCRings.r
r
Definition: alignCSCRings.py:93
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46