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< boost::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 26 of file HcalItemArrayColl.h.

Member Typedef Documentation

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.

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

Definition at line 84 of file HcalItemArrayColl.h.

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

Definition at line 29 of file HcalItemArrayColl.h.

Member Function Documentation

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

Definition at line 31 of file HcalItemArrayColl.h.

References N.

31 {return N;}
#define N
Definition: blowfish.cc:9
template<typename Item, unsigned N>
Item& HcalItemArrayColl< Item, N >::at ( const unsigned  itemIndex,
const unsigned  arrayIndex 
) const
inline

Definition at line 64 of file HcalItemArrayColl.h.

References HcalItemArrayColl< Item, N >::data_.

65  {return *data_.at(itemIndex).at(arrayIndex);}
std::vector< StoredArray > data_
template<typename Item, unsigned N>
void HcalItemArrayColl< Item, N >::clear ( void  )
inline
template<typename Item, unsigned N>
bool HcalItemArrayColl< Item, N >::empty ( ) const
inline
template<typename Item, unsigned N>
const Item* HcalItemArrayColl< Item, N >::get ( const unsigned  itemIndex,
const unsigned  arrayIndex 
) const
inline
template<typename Item, unsigned N>
bool HcalItemArrayColl< Item, N >::operator!= ( const HcalItemArrayColl< Item, N > &  r) const
inline

Definition at line 80 of file HcalItemArrayColl.h.

References alignCSCRings::r.

81  {return !(*this == r);}
template<typename Item, unsigned N>
bool HcalItemArrayColl< Item, N >::operator== ( const HcalItemArrayColl< Item, N > &  r) const
inline

Definition at line 68 of file HcalItemArrayColl.h.

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

69  {
70  const std::size_t sz = data_.size();
71  if (sz != r.data_.size())
72  return false;
73  for (std::size_t i=0; i<sz; ++i)
74  for (unsigned j=0; j<N; ++j)
75  if (!(*data_[i][j] == *r.data_[i][j]))
76  return false;
77  return true;
78  }
std::vector< StoredArray > data_
#define N
Definition: blowfish.cc:9
template<typename Item, unsigned N>
void HcalItemArrayColl< Item, N >::push_back ( InputArray arr)
inline

Definition at line 35 of file HcalItemArrayColl.h.

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

36  {
37  StoredArray st;
38  for (unsigned i=0; i<N; ++i)
39  st[i] = boost::shared_ptr<Item>(arr[i].release());
40  data_.push_back(st);
41  }
std::vector< StoredArray > data_
#define N
Definition: blowfish.cc:9
boost::array< boost::shared_ptr< Item >, N > StoredArray
template<typename Item, unsigned N>
void HcalItemArrayColl< Item, N >::reserve ( const unsigned  n)
inline

Definition at line 45 of file HcalItemArrayColl.h.

References HcalItemArrayColl< Item, N >::data_.

45 {data_.reserve(n);}
std::vector< StoredArray > data_
template<typename Item, unsigned N>
template<class Archive >
void HcalItemArrayColl< Item, N >::serialize ( Archive &  ar,
unsigned   
)
inlineprivate

Definition at line 90 of file HcalItemArrayColl.h.

References HcalItemArrayColl< Item, N >::data_.

91  {
92  ar & data_;
93  }
std::vector< StoredArray > data_
template<typename Item, unsigned N>
std::size_t HcalItemArrayColl< Item, N >::size ( void  ) const
inline

Definition at line 48 of file HcalItemArrayColl.h.

References HcalItemArrayColl< Item, N >::data_.

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

48 {return data_.size();}
std::vector< StoredArray > data_

Friends And Related Function Documentation

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

Definition at line 87 of file HcalItemArrayColl.h.

Member Data Documentation

template<typename Item, unsigned N>
std::vector<StoredArray> HcalItemArrayColl< Item, N >::data_
private