Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:47:19

0001 #ifndef CALOTSAMPLES_ICC
0002 #define CALOTSAMPLES_ICC 1
0003 
0004 #include "CalibFormats/CaloObjects/interface/CaloTSamples.h"
0005 
0006 template <class Ttype, uint32_t Tsize>
0007 CaloTSamples<Ttype, Tsize>::CaloTSamples() : CaloTSamplesBase<Ttype>(m_data, Tsize) {}
0008 
0009 template <class Ttype, uint32_t Tsize>
0010 CaloTSamples<Ttype, Tsize>::CaloTSamples(const CaloTSamples<Ttype, Tsize> &cs) : CaloTSamplesBase<Ttype>(cs) {
0011   if (&cs != this) {
0012     for (uint32_t i(0); i != Tsize; ++i) {
0013       m_data[i] = cs.m_data[i];
0014     }
0015   }
0016 }
0017 
0018 template <class Ttype, uint32_t Tsize>
0019 CaloTSamples<Ttype, Tsize>::CaloTSamples(const DetId &id, uint32_t size, uint32_t pre)
0020     : CaloTSamplesBase<Ttype>(m_data, Tsize, id, size, pre) {}
0021 
0022 template <class Ttype, uint32_t Tsize>
0023 CaloTSamples<Ttype, Tsize>::~CaloTSamples() {}
0024 
0025 template <class Ttype, uint32_t Tsize>
0026 CaloTSamples<Ttype, Tsize> &CaloTSamples<Ttype, Tsize>::operator=(const CaloTSamples<Ttype, Tsize> &cs) {
0027   CaloTSamplesBase<Ttype>::operator=(cs);
0028   std::copy(cs.m_data, cs.m_data + Tsize, m_data);
0029   return *this;
0030 }
0031 
0032 template <class Ttype, uint32_t Tsize>
0033 uint32_t CaloTSamples<Ttype, Tsize>::capacity() const {
0034   return Tsize;
0035 }
0036 
0037 template <class Ttype, uint32_t Tsize>
0038 Ttype *CaloTSamples<Ttype, Tsize>::data(uint32_t i) {
0039   return &(m_data[i]);
0040 }
0041 
0042 template <class Ttype, uint32_t Tsize>
0043 const Ttype *CaloTSamples<Ttype, Tsize>::cdata(uint32_t i) const {
0044   return &(m_data[i]);
0045 }
0046 
0047 #endif