CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
HcalItemArrayColl< Item, N > Class Template Reference

#include <HcalItemArrayColl.h>

Public Types

typedef std::array< std::unique_ptr< Item >, NInputArray
 
typedef Item value_type
 

Public Member Functions

Item & at (const unsigned itemIndex, const unsigned arrayIndex) const
 
void clear ()
 
bool empty () const
 
const Item * get (const unsigned itemIndex, const unsigned arrayIndex) const
 
bool operator!= (const HcalItemArrayColl &r) const
 
bool operator== (const HcalItemArrayColl &r) const
 
void push_back (InputArray &arr)
 
void reserve (const unsigned n)
 
std::size_t size () const
 

Static Public Member Functions

static constexpr unsigned arraySize ()
 

Private Types

typedef boost::array< std::shared_ptr< Item >, NStoredArray
 

Private Member Functions

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

Private Attributes

std::vector< StoredArraydata_
 

Friends

class boost::serialization::access
 

Detailed Description

template<typename Item, unsigned N>
class HcalItemArrayColl< Item, N >

Definition at line 27 of file HcalItemArrayColl.h.

Member Typedef Documentation

◆ InputArray

template<typename Item, unsigned N>
typedef std::array<std::unique_ptr<Item>, N> HcalItemArrayColl< Item, N >::InputArray

Definition at line 30 of file HcalItemArrayColl.h.

◆ StoredArray

template<typename Item, unsigned N>
typedef boost::array<std::shared_ptr<Item>, N> HcalItemArrayColl< Item, N >::StoredArray
private

Definition at line 80 of file HcalItemArrayColl.h.

◆ value_type

template<typename Item, unsigned N>
typedef Item HcalItemArrayColl< Item, N >::value_type

Definition at line 29 of file HcalItemArrayColl.h.

Member Function Documentation

◆ arraySize()

template<typename Item, unsigned N>
static constexpr unsigned HcalItemArrayColl< Item, N >::arraySize ( )
inlinestaticconstexpr

Definition at line 31 of file HcalItemArrayColl.h.

31 { return N; }

References N.

◆ at()

template<typename Item, unsigned N>
Item& HcalItemArrayColl< Item, N >::at ( const unsigned  itemIndex,
const unsigned  arrayIndex 
) const
inline

Definition at line 61 of file HcalItemArrayColl.h.

61  {
62  return *data_.at(itemIndex).at(arrayIndex);
63  }

References HcalItemArrayColl< Item, N >::data_.

◆ clear()

template<typename Item, unsigned N>
void HcalItemArrayColl< Item, N >::clear ( void  )
inline

Definition at line 43 of file HcalItemArrayColl.h.

43 { data_.clear(); }

References HcalItemArrayColl< Item, N >::data_.

Referenced by BeautifulSoup.Tag::setString().

◆ empty()

template<typename Item, unsigned N>
bool HcalItemArrayColl< Item, N >::empty ( ) const
inline

Definition at line 48 of file HcalItemArrayColl.h.

48 { return data_.empty(); }

References HcalItemArrayColl< Item, N >::data_.

◆ get()

template<typename Item, unsigned N>
const Item* HcalItemArrayColl< Item, N >::get ( const unsigned  itemIndex,
const unsigned  arrayIndex 
) const
inline

◆ operator!=()

template<typename Item, unsigned N>
bool HcalItemArrayColl< Item, N >::operator!= ( const HcalItemArrayColl< Item, N > &  r) const
inline

Definition at line 77 of file HcalItemArrayColl.h.

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

References alignCSCRings::r.

◆ operator==()

template<typename Item, unsigned N>
bool HcalItemArrayColl< Item, N >::operator== ( const HcalItemArrayColl< Item, N > &  r) const
inline

Definition at line 66 of file HcalItemArrayColl.h.

66  {
67  const std::size_t sz = data_.size();
68  if (sz != r.data_.size())
69  return false;
70  for (std::size_t i = 0; i < sz; ++i)
71  for (unsigned j = 0; j < N; ++j)
72  if (!(*data_[i][j] == *r.data_[i][j]))
73  return false;
74  return true;
75  }

References HcalItemArrayColl< Item, N >::data_, mps_fire::i, dqmiolumiharvest::j, N, and alignCSCRings::r.

◆ push_back()

template<typename Item, unsigned N>
void HcalItemArrayColl< Item, N >::push_back ( InputArray arr)
inline

Definition at line 35 of file HcalItemArrayColl.h.

35  {
36  StoredArray st;
37  for (unsigned i = 0; i < N; ++i)
38  st[i] = std::shared_ptr<Item>(arr[i].release());
39  data_.push_back(st);
40  }

References HcalItemArrayColl< Item, N >::data_, mps_fire::i, N, and fetchall_from_DQM_v2::release.

◆ reserve()

template<typename Item, unsigned N>
void HcalItemArrayColl< Item, N >::reserve ( const unsigned  n)
inline

Definition at line 44 of file HcalItemArrayColl.h.

44 { data_.reserve(n); }

References HcalItemArrayColl< Item, N >::data_, and dqmiodumpmetadata::n.

◆ serialize()

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

Definition at line 86 of file HcalItemArrayColl.h.

86  {
87  ar& data_;
88  }

References HcalItemArrayColl< Item, N >::data_.

◆ size()

template<typename Item, unsigned N>
std::size_t HcalItemArrayColl< Item, N >::size ( void  ) const
inline

Friends And Related Function Documentation

◆ boost::serialization::access

template<typename Item, unsigned N>
friend class boost::serialization::access
friend

Definition at line 83 of file HcalItemArrayColl.h.

Member Data Documentation

◆ data_

template<typename Item, unsigned N>
std::vector<StoredArray> HcalItemArrayColl< Item, N >::data_
private
mps_fire.i
i
Definition: mps_fire.py:428
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
HcalItemArrayColl::get
const Item * get(const unsigned itemIndex, const unsigned arrayIndex) const
Definition: HcalItemArrayColl.h:52
HcalItemArrayColl::StoredArray
boost::array< std::shared_ptr< Item >, N > StoredArray
Definition: HcalItemArrayColl.h:80
N
#define N
Definition: blowfish.cc:9
fetchall_from_DQM_v2.release
release
Definition: fetchall_from_DQM_v2.py:92
HcalItemArrayColl::data_
std::vector< StoredArray > data_
Definition: HcalItemArrayColl.h:81
alignCSCRings.r
r
Definition: alignCSCRings.py:93
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66