CMS 3D CMS Logo

CaloTSamplesBase.h
Go to the documentation of this file.
1 #ifndef CALOTSAMPLESBASE_H
2 #define CALOTSAMPLESBASE_H 1
3 
4 #include <ostream>
6 #include <assert.h>
7 
8 template <class Ttype>
10 {
11  public:
12 
13  CaloTSamplesBase<Ttype>( Ttype* mydata,
14  uint32_t size ) ;
15 
17 
18  CaloTSamplesBase<Ttype>( Ttype* mydata ,
19  uint32_t length ,
20  const DetId& id ,
21  uint32_t size ,
22  uint32_t pre ) ;
23 
24  virtual ~CaloTSamplesBase<Ttype>() ;
25 
26  void setZero() ;
27 
28  DetId id() const ;
29  uint32_t size() const ;
30  uint32_t pre() const ;
31  bool zero() const ;
32 
33  Ttype& operator[]( uint32_t i ) ;
34 
35  const Ttype& operator[]( uint32_t i ) const ;
36 
38 
40 
41  CaloTSamplesBase<Ttype>& operator+=( Ttype value ) ;
42 
44 
45  virtual uint32_t capacity() const = 0 ;
46 
47  private:
48 
49  virtual Ttype* data( uint32_t i ) = 0 ;
50  virtual const Ttype* cdata( uint32_t i ) const = 0 ;
51 
53  uint32_t m_size ;
54  uint32_t m_pre ;
55 } ;
56 
57 template <class Ttype>
58 std::ostream& operator<<( std::ostream& s,
59  const CaloTSamplesBase<Ttype>& sam ) ;
60 
61 #endif
int i
Definition: DBlmapReader.cc:9
auto_ptr< ClusterSequence > cs
uint32_t pre() const
DetId id() const
virtual const Ttype * cdata(uint32_t i) const =0
CaloTSamplesBase< Ttype > & operator=(const CaloTSamplesBase< Ttype > &cs)
Definition: value.py:1
CaloTSamplesBase< Ttype > & operator*=(Ttype value)
Definition: DetId.h:18
Ttype & operator[](uint32_t i)
uint32_t size() const
virtual uint32_t capacity() const =0
CaloTSamplesBase< Ttype > & operator+=(Ttype value)
virtual Ttype * data(uint32_t i)=0
std::ostream & operator<<(std::ostream &s, const CaloTSamplesBase< Ttype > &sam)
bool zero() const