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 21 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 25 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 79 of file HcalItemArrayColl.h.

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

Definition at line 24 of file HcalItemArrayColl.h.

Member Function Documentation

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

Definition at line 26 of file HcalItemArrayColl.h.

References N.

26 {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 59 of file HcalItemArrayColl.h.

References HcalItemArrayColl< Item, N >::data_.

60  {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 75 of file HcalItemArrayColl.h.

References alignCSCRings::r.

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

Definition at line 63 of file HcalItemArrayColl.h.

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

64  {
65  const std::size_t sz = data_.size();
66  if (sz != r.data_.size())
67  return false;
68  for (std::size_t i=0; i<sz; ++i)
69  for (unsigned j=0; j<N; ++j)
70  if (!(*data_[i][j] == *r.data_[i][j]))
71  return false;
72  return true;
73  }
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 30 of file HcalItemArrayColl.h.

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

31  {
32  StoredArray st;
33  for (unsigned i=0; i<N; ++i)
34  st[i] = boost::shared_ptr<Item>(arr[i].release());
35  data_.push_back(st);
36  }
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 40 of file HcalItemArrayColl.h.

References HcalItemArrayColl< Item, N >::data_.

40 {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 85 of file HcalItemArrayColl.h.

References HcalItemArrayColl< Item, N >::data_.

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

Definition at line 43 of file HcalItemArrayColl.h.

References HcalItemArrayColl< Item, N >::data_.

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

43 {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 82 of file HcalItemArrayColl.h.

Member Data Documentation

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