00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef ATLFAST_TYPEDCOLLECTION_H
00033 #define ATLFAST_TYPEDCOLLECTION_H
00034
00035
00036
00037
00038 #include "GaudiKernel/ObjectVector.h"
00039
00040
00041
00042
00043 static const CLID CLID_ATLFAST_TypedCollection=2312 ;
00044
00045
00046 namespace Atlfast {
00054 template<class T, class C> class TypedCollection: public DataObject
00055 {
00056
00057 public:
00058
00059
00060
00061
00062 TypedCollection(C* collection): DataObject(),m_collection(collection){}
00063 TypedCollection(): DataObject(),m_collection(0){}
00064 virtual ~TypedCollection() {}
00065
00066 virtual const CLID& clID() const{return TypedCollection<T, C>::classID();}
00067 static const CLID& classID() {
00068 static CLID clid = C::classID()+CLID_ATLFAST_TypedCollection;
00069 return clid;
00070 }
00071 operator C*() const {return m_collection;}
00072
00073 private:
00074
00075 TypedCollection(const TypedCollection<T, C>&): DataObject(){};
00076 C* m_collection;
00077
00078
00079 };
00080
00081 template<class T, class C> class TypedCollectionFactory{
00082 public:
00083 TypedCollection<T, C>* make(C* collection){
00084 TypedCollection<T, C>* tcptr =new TypedCollection<T, C>(collection);
00085 return tcptr;
00086 }
00087 };
00088 }
00089 #endif
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100