CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
34  CaloTSamplesBase<Ttype> &operator+=(Ttype value);
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
unique_ptr< ClusterSequence > cs
virtual uint32_t capacity() const =0
virtual const Ttype * cdata(uint32_t i) const =0
uint32_t pre() const
DetId id() const
CaloTSamplesBase< Ttype > & operator=(const CaloTSamplesBase< Ttype > &cs)
CaloTSamplesBase< Ttype > & operator*=(Ttype value)
Definition: DetId.h:17
Ttype & operator[](uint32_t i)
uint32_t size() const
CaloTSamplesBase< Ttype > & operator+=(Ttype value)
virtual Ttype * data(uint32_t i)=0
bool zero() const