The Gaudi Framework  master (181af51f)
Loading...
Searching...
No Matches
NTupleItems.cpp
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 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\***********************************************************************************/
14
15typedef const std::string& CSTR;
16typedef const std::type_info& CTYPE;
17
19template <class TYP>
20NTuple::_Item<TYP>* NTuple::_Item<TYP>::create( INTuple* tup, const std::string& name, const std::type_info& info,
21 TYP min, TYP max, TYP def ) {
22 return new _ItemImp<TYP>( tup, name, info, min, max, def );
23}
24
26template <class TYP>
27NTuple::_Array<TYP>* NTuple::_Array<TYP>::create( INTuple* tup, const std::string& name, const std::type_info& info,
28 const std::string& idx, long len, TYP min, TYP max, TYP def ) {
29 return new _ArrayImp<TYP>( tup, name, info, idx, len, min, max, def );
30}
31
33template <class TYP>
34NTuple::_Matrix<TYP>* NTuple::_Matrix<TYP>::create( INTuple* tup, const std::string& name, const std::type_info& info,
35 const std::string& idx, long ncol, long nrow, TYP min, TYP max,
36 TYP def ) {
37 return new _MatrixImp<TYP>( tup, name, info, idx, ncol, nrow, min, max, def );
38}
39
40#define INSTANTIATE( TYP ) \
41 template class NTuple::_Item<TYP>; \
42 template class NTuple::_Array<TYP>; \
43 template class NTuple::_Matrix<TYP>;
44// This makes the stuff accessible from outside
45// (instruct the compiler to explicitly instantiate specific instances....)
46INSTANTIATE( bool )
47INSTANTIATE( char )
48INSTANTIATE( unsigned char )
49INSTANTIATE( short )
50INSTANTIATE( unsigned short )
51INSTANTIATE( int )
52INSTANTIATE( unsigned int )
53INSTANTIATE( long )
54INSTANTIATE( long long )
55INSTANTIATE( unsigned long )
56INSTANTIATE( unsigned long long )
57INSTANTIATE( float )
58INSTANTIATE( double )
59INSTANTIATE( void* )
61INSTANTIATE( std::string )
62
63#undef INSTANTIATE
const std::string CSTR
const std::type_info & CTYPE
#define INSTANTIATE(TYP)
NTuple interface class definition.
Definition INTuple.h:86
virtual const std::string & name() const =0
Access _Item name.
Opaque address interface definition.
Abstract class describing a column-array in a N tuple.
Definition NTuple.h:159
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.
Concrete class discribing a column-array in a N tuple.
Abstract class describing a column in a N tuple.
Definition NTuple.h:139
static _Item * create(INTuple *tup, const std::string &name, const std::type_info &info, TYP min, TYP max, TYP def)
Create instance.
Concrete class discribing a column in a N tuple.
Abstract class describing a matrix column in a N tuple.
Definition NTuple.h:188
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.
Concrete class discribing a matrix column in a N tuple.