00001 //-------------------------------------------------------------------------- 00002 // File and Version Information: 00003 // $Id: DataT.cpp 2470 2011-10-05 00:01:27Z salnikov@SLAC.STANFORD.EDU $ 00004 // 00005 // Description: 00006 // Class DataT... 00007 // 00008 // Author List: 00009 // Andy Salnikov 00010 // 00011 //------------------------------------------------------------------------ 00012 00013 //----------------------- 00014 // This Class's Header -- 00015 //----------------------- 00016 #include "cspad_mod/DataT.h" 00017 00018 //----------------- 00019 // C/C++ Headers -- 00020 //----------------- 00021 00022 //------------------------------- 00023 // Collaborating Class Headers -- 00024 //------------------------------- 00025 00026 //----------------------------------------------------------------------- 00027 // Local Macros, Typedefs, Structures, Unions and Forward Declarations -- 00028 //----------------------------------------------------------------------- 00029 00030 // ---------------------------------------- 00031 // -- Public Function Member Definitions -- 00032 // ---------------------------------------- 00033 00034 namespace cspad_mod { 00035 00036 //---------------- 00037 // Constructors -- 00038 //---------------- 00039 template <typename DataType, typename ElemType> 00040 DataT<DataType, ElemType>::DataT () 00041 : DataType() 00042 , m_elements() 00043 { 00044 } 00045 00046 //-------------- 00047 // Destructor -- 00048 //-------------- 00049 template <typename DataType, typename ElemType> 00050 DataT<DataType, ElemType>::~DataT () 00051 { 00052 for (typename std::vector<ElemType*>::iterator it = m_elements.begin(); it != m_elements.end(); ++ it) { 00053 delete *it; 00054 } 00055 } 00056 00057 // explicit instatiation 00058 template class DataT<Psana::CsPad::DataV1, Psana::CsPad::ElementV1>; 00059 template class DataT<Psana::CsPad::DataV2, Psana::CsPad::ElementV2>; 00060 00061 } // namespace cspad_mod