The Gaudi Framework  master (37c0b60a)
NTupleItems.cpp
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 //====================================================================
12 // NTuple name space implementation
13 //--------------------------------------------------------------------
14 //
15 // Package : Gaudi/NTupleSvc ( The LHCb Offline System)
16 // Author : M.Frank
17 //
18 // +---------+----------------------------------------------+--------+
19 // | Date | Comment | Who |
20 // +---------+----------------------------------------------+--------+
21 // | 21/10/99| Initial version. | MF |
22 // +---------+----------------------------------------------+--------+
23 //====================================================================
24 #define GAUDI_NTUPLEITEMS_CPP 1
25 
26 // Framework include files
28 #include <GaudiKernel/DataObject.h>
30 
31 typedef const std::string& CSTR;
32 typedef const std::type_info& CTYPE;
33 
35 template <class TYP>
37  TYP min, TYP max, TYP def ) {
38  return new _ItemImp<TYP>( tup, name, info, min, max, def );
39 }
40 
42 template <class TYP>
44  const std::string& idx, long len, TYP min, TYP max, TYP def ) {
45  return new _ArrayImp<TYP>( tup, name, info, idx, len, min, max, def );
46 }
47 
49 template <class TYP>
51  const std::string& idx, long ncol, long nrow, TYP min, TYP max,
52  TYP def ) {
53  return new _MatrixImp<TYP>( tup, name, info, idx, ncol, nrow, min, max, def );
54 }
55 
56 #define INSTANTIATE( TYP ) \
57  template class NTuple::_Item<TYP>; \
58  template class NTuple::_Array<TYP>; \
59  template class NTuple::_Matrix<TYP>;
60 // This makes the stuff accessible from outside
61 // (instruct the compiler to explicitly instantiate specific instances....)
62 INSTANTIATE( bool )
63 INSTANTIATE( char )
64 INSTANTIATE( unsigned char )
65 INSTANTIATE( short )
66 INSTANTIATE( unsigned short )
67 INSTANTIATE( int )
68 INSTANTIATE( unsigned int )
69 INSTANTIATE( long )
70 INSTANTIATE( long long )
71 INSTANTIATE( unsigned long )
72 INSTANTIATE( unsigned long long )
73 INSTANTIATE( float )
74 INSTANTIATE( double )
75 INSTANTIATE( void* )
78 
79 #undef INSTANTIATE
std::string
STL class.
IOpaqueAddress
Definition: IOpaqueAddress.h:33
std::type_info
NTupleItems.h
CTYPE
const std::type_info & CTYPE
Definition: NTupleItems.cpp:32
CSTR
const std::string & CSTR
Definition: NTupleItems.cpp:31
NTuple::_Item
Abstract class describing a column in a N tuple.
Definition: NTuple.h:50
NTuple::_Item::create
static _Item * create(INTuple *tup, const std::string &name, const std::type_info &info, TYP min, TYP max, TYP def)
Create instance.
Definition: NTupleItems.cpp:36
INSTANTIATE
#define INSTANTIATE(TYP)
Definition: NTupleItems.cpp:56
NTuple::_ArrayImp
Concrete class discribing a column-array in a N tuple.
Definition: NTupleItems.h:50
INTuple
Definition: INTuple.h:91
NTuple::_Matrix::create
static _Matrix * create(INTuple *tup, const std::string &name, const std::type_info &info, const std::string &index, long ncol, long nrow, TYP min, TYP max, TYP def)
Create instance.
Definition: NTupleItems.cpp:50
NTuple::_Array
Abstract class describing a column-array in a N tuple.
Definition: NTuple.h:52
ConditionsStallTest.name
name
Definition: ConditionsStallTest.py:77
NTuple::_MatrixImp
Concrete class discribing a matrix column in a N tuple.
Definition: NTupleItems.h:52
NTuple::_Matrix
Abstract class describing a matrix column in a N tuple.
Definition: NTuple.h:54
DataObject.h
NTuple::_Array::create
static _Array * create(INTuple *tup, const std::string &name, const std::type_info &info, const std::string &index, long len, TYP min, TYP max, TYP def)
Create instance.
Definition: NTupleItems.cpp:43
ContainedObject.h
NTuple::_ItemImp
Concrete class discribing a column in a N tuple.
Definition: NTupleItems.h:48