1 #ifndef ROOTHISTCNV_RCWNTCNV_H 2 #define ROOTHISTCNV_RCWNTCNV_H 1 42 size_t saveItem(
char* target,
const T* src,
size_t len )
44 long* tar = (
long*)target;
45 for (
size_t i = 0; i < len; i++ ) {
46 *( tar++ ) =
long( *( src++ ) );
48 return sizeof( long ) * len;
51 size_t saveItem(
char* target, T* src,
size_t len )
53 memcpy( target, src,
sizeof( T ) * len );
54 return sizeof( T ) * len;
58 size_t loadItem(
char* src, T* tar,
size_t len )
61 for (
size_t i = 0; i < len; i++ ) {
62 *( tar++ ) = T( *( s++ ) );
64 return sizeof( long ) * len;
66 size_t loadItem(
char* src,
bool* tar,
size_t len )
69 for (
size_t i = 0; i < len; i++ ) {
70 *( tar++ ) = ( *( s++ ) ) ?
true :
false;
72 return sizeof( long ) * len;
74 size_t loadItem(
char* src,
float* target,
size_t len )
76 memcpy( target, src,
sizeof(
float ) * len );
77 return sizeof( float ) * len;
79 size_t loadItem(
char* src,
double* target,
size_t len )
81 memcpy( target, src,
sizeof(
double ) * len );
82 return sizeof( double ) * len;
84 size_t loadItem(
char* src,
long* target,
size_t len )
86 memcpy( target, src,
sizeof(
long ) * len );
87 return sizeof( long ) * len;
89 size_t loadItem(
char* src,
unsigned long* target,
size_t len )
91 memcpy( target, src,
sizeof(
unsigned long ) * len );
92 return sizeof(
unsigned long ) * len;
97 #endif // ROOTHISTCNV_RCWNTCNV_H NTuple converter class definition.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Converter of Column-wise NTuple into ROOT format.
StatusCode book(const std::string &desc, INTuple *pObject, TTree *&tree) override
Book the N tuple.
RCWNTupleCnv(ISvcLocator *svc)
Standard constructor.
NTuple interface class definition.
size_t loadItem(char *src, bool *tar, size_t len)
This class is used for returning status codes from appropriate routines.
StatusCode load(TTree *tree, INTuple *&refpObject) override
Create the transient representation of an object.
unsigned int CLID
Class ID definition.
size_t loadItem(char *src, double *target, size_t len)
StatusCode readData(TTree *rtree, INTuple *pObject, long ievt) override
Read N tuple data.
size_t saveItem(char *target, const T *src, size_t len)
size_t loadItem(char *src, long *target, size_t len)
~RCWNTupleCnv() override
Standard destructor.
size_t loadItem(char *src, T *tar, size_t len)
static const CLID & classID()
Inquire class type.
size_t saveItem(char *target, T *src, size_t len)
size_t loadItem(char *src, unsigned long *target, size_t len)
size_t loadItem(char *src, float *target, size_t len)
StatusCode writeData(TTree *rtree, INTuple *pObject) override
Write N tuple data.