CMS 3D CMS Logo

CaloTSamplesBase.h
Go to the documentation of this file.
1 #ifndef CALOTSAMPLESBASE_H
2 #define CALOTSAMPLESBASE_H 1
3 
5 #include <cassert>
6 #include <ostream>
7 
8 template <class Ttype>
10 public:
11  CaloTSamplesBase<Ttype>(Ttype *mydata, uint32_t size);
12 
14 
15  CaloTSamplesBase<Ttype>(Ttype *mydata, uint32_t length, const DetId &id, uint32_t size, uint32_t pre);
16 
17  virtual ~CaloTSamplesBase<Ttype>();
18 
19  void setZero();
20 
21  DetId id() const;
22  uint32_t size() const;
23  uint32_t pre() const;
24  bool zero() const;
25 
26  Ttype &operator[](uint32_t i);
27 
28  const Ttype &operator[](uint32_t i) const;
29 
31 
33 
35 
37 
38  virtual uint32_t capacity() const = 0;
39 
40 private:
41  virtual Ttype *data(uint32_t i) = 0;
42  virtual const Ttype *cdata(uint32_t i) const = 0;
43 
45  uint32_t m_size;
46  uint32_t m_pre;
47 };
48 
49 template <class Ttype>
50 std::ostream &operator<<(std::ostream &s, const CaloTSamplesBase<Ttype> &sam);
51 
52 #endif
CaloTSamplesBase::m_pre
uint32_t m_pre
Definition: CaloTSamplesBase.h:46
mps_fire.i
i
Definition: mps_fire.py:355
CaloTSamplesBase::id
DetId id() const
CaloTSamplesBase::operator[]
Ttype & operator[](uint32_t i)
fwrapper::cs
unique_ptr< ClusterSequence > cs
Definition: fastjetfortran_madfks.cc:45
CaloTSamplesBase
Definition: CaloTSamplesBase.h:9
operator<<
std::ostream & operator<<(std::ostream &s, const CaloTSamplesBase< Ttype > &sam)
CaloTSamplesBase::zero
bool zero() const
CaloTSamplesBase::size
uint32_t size() const
CaloTSamplesBase::operator*=
CaloTSamplesBase< Ttype > & operator*=(Ttype value)
CaloTSamplesBase::m_id
DetId m_id
Definition: CaloTSamplesBase.h:44
DetId
Definition: DetId.h:17
alignCSCRings.s
s
Definition: alignCSCRings.py:92
CaloTSamplesBase::capacity
virtual uint32_t capacity() const =0
CaloTSamplesBase::cdata
virtual const Ttype * cdata(uint32_t i) const =0
CaloTSamplesBase::pre
uint32_t pre() const
CaloTSamplesBase::operator+=
CaloTSamplesBase< Ttype > & operator+=(Ttype value)
value
Definition: value.py:1
CaloTSamplesBase::setZero
void setZero()
CaloTSamplesBase::data
virtual Ttype * data(uint32_t i)=0
DetId.h
CaloTSamplesBase::operator=
CaloTSamplesBase< Ttype > & operator=(const CaloTSamplesBase< Ttype > &cs)
CaloTSamplesBase::m_size
uint32_t m_size
Definition: CaloTSamplesBase.h:45