ATLAS Offline Software
Classes | Functions
DataModelAthenaPool Namespace Reference

Classes

class  CLHEPConverters
 Register all CLHEP converters. More...
 
class  DataVectorConvert
 Provide backwards compatibility for reading DataVector classes. More...
 
class  PackedContainerConverter
 Converter from std::vector<T,ALLOC> to SG::PackedContainer<U,ALLOC>. More...
 
class  PointConverter
 Converter for Hep3Vector to Point3D<double>. More...
 

Functions

void installPackedContainerConverters ()
 Install converters for supported instantiations. More...
 
template<class T , class ALLOC >
void vectorMove (std::vector< T, ALLOC > &src, std::vector< T, ALLOC > &dst)
 Move from one vector to another. More...
 
template<class T , class U , class ALLOC >
void vectorMove (std::vector< T, ALLOC > &src, std::vector< U, ALLOC > &dst)
 

Function Documentation

◆ installPackedContainerConverters()

void DataModelAthenaPool::installPackedContainerConverters ( )

Install converters for supported instantiations.

Definition at line 136 of file PackedContainerConverter.cxx.

137 {
138 #define CONVERTER(SRC, DST) \
139  do { \
140  TConverterRegistry::Instance()->AddStreamerConverter \
141  ("vector<" #SRC ">", \
142  "SG::PackedContainer<" #DST ",allocator<" #DST "> >", \
143  new PackedContainerConverter<SRC, DST> ( #SRC)); \
144  } while (0)
145 
146 #define CONVERTER1(T) CONVERTER(T,T)
147 
148 #define CONVERTER2(T, ALLOC) \
149  do { \
150  TConverterRegistry::Instance()->AddStreamerConverter \
151  ("vector<" #T "," #ALLOC "<" #T "> >", \
152  "SG::PackedContainer<" #T "," #ALLOC "<" #T "> >", \
153  new PackedContainerConverter<T, T, ALLOC<T> > ( #T, #ALLOC "<" #T ">" )); \
154  } while (0)
155 
156 
157  CONVERTER1(char);
158  CONVERTER1(unsigned char);
159  CONVERTER1(short);
160  CONVERTER1(unsigned short);
161  CONVERTER1(int);
162  CONVERTER1(unsigned int);
163  CONVERTER1(float);
164  CONVERTER1(double);
165 
166  CONVERTER1(std::vector<char>);
167  CONVERTER1(std::vector<unsigned char>);
168  CONVERTER1(std::vector<short>);
169  CONVERTER1(std::vector<unsigned short>);
170  CONVERTER1(std::vector<int>);
171  CONVERTER1(std::vector<unsigned int>);
172  CONVERTER1(std::vector<float>);
173  CONVERTER1(std::vector<double>);
174 
175  CONVERTER1(std::vector<std::vector<char> >);
176  CONVERTER1(std::vector<std::vector<unsigned char> >);
177  CONVERTER1(std::vector<std::vector<short> >);
178  CONVERTER1(std::vector<std::vector<unsigned short> >);
179  CONVERTER1(std::vector<std::vector<int> >);
180  CONVERTER1(std::vector<std::vector<unsigned int> >);
181  CONVERTER1(std::vector<std::vector<float> >);
182  CONVERTER1(std::vector<std::vector<double> >);
183 }

◆ vectorMove() [1/2]

template<class T , class ALLOC >
void DataModelAthenaPool::vectorMove ( std::vector< T, ALLOC > &  src,
std::vector< T, ALLOC > &  dst 
)

Move from one vector to another.

Parameters
srcSource vector. Destroyed by the move.
dstDestination vector.

If the types of src and dst are the same, then just do a move. Otherwise, copy.

Definition at line 35 of file PackedContainerConverter.cxx.

36 {
37  dst.swap (src);
38 }

◆ vectorMove() [2/2]

template<class T , class U , class ALLOC >
void DataModelAthenaPool::vectorMove ( std::vector< T, ALLOC > &  src,
std::vector< U, ALLOC > &  dst 
)

Definition at line 40 of file PackedContainerConverter.cxx.

41 {
42  dst.assign (src.begin(), src.end());
43 }
WriteCellNoiseToCool.src
src
Definition: WriteCellNoiseToCool.py:513
CONVERTER1
#define CONVERTER1(T)