The Gaudi Framework  v28r3 (cc1cf868)
Tuples::TupleObj Class Referenceabstract

A simple wrapper class over standard Gaudi NTuple::Tuple facility. More...

#include <GaudiAlg/TupleObj.h>

Inheritance diagram for Tuples::TupleObj:
Collaboration diagram for Tuples::TupleObj:

Public Types

typedef NTuple::Item< bool > Bool
 basic type for int items More...
 
typedef NTuple::Item< char > Char
 basic type for int items More...
 
typedef NTuple::Item< unsigned char > UChar
 basic type for unsigned int items More...
 
typedef NTuple::Item< short > Short
 basic type for int items More...
 
typedef NTuple::Item< unsigned short > UShort
 basic type for unsigned int items More...
 
typedef NTuple::Item< int > Int
 basic type for int items More...
 
typedef NTuple::Item< unsigned int > UInt
 basic type for unsigned int items More...
 
typedef NTuple::Item< long long > LongLong
 basic type for unsigned long long items More...
 
typedef NTuple::Item< unsigned long long > ULongLong
 basic type for unsigned long long items More...
 
typedef NTuple::Item< float > Float
 basic type for float items More...
 
typedef NTuple::Item< double > Double
 basic type for double items More...
 
typedef NTuple::Item< IOpaqueAddress * > Address
 basic type for address items More...
 
typedef NTuple::Array< float > FArray
 basic type for array of floats More...
 
typedef NTuple::Matrix< float > FMatrix
 basic type for matrix of floats More...
 
typedef unsigned short MIndex
 
typedef std::map< std::string, std::stringItemMap
 

Public Member Functions

StatusCode column (const std::string &name, float value)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, double value)
 Set the value for the selected tuple column If the column does not exist, it will be automatically created and appended to the tuple. More...
 
StatusCode column (const std::string &name, short value)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, short value, short minv, short maxv)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, unsigned short value)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, unsigned short value, unsigned short minv, unsigned short maxv)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, char value)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, char value, char minv, char maxv)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, unsigned char value)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, unsigned char value, unsigned char minv, unsigned char maxv)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, int value)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, int value, int minv, int maxv)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, unsigned int value)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, unsigned int value, unsigned int minv, unsigned int maxv)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, long value)
 Set the value for the selected tuple column. More...
 
StatusCode column (const std::string &name, long value, long minv, long maxv)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, unsigned long value)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, unsigned long value, unsigned long minv, unsigned long maxv)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, long long value)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, long long value, long long minv, long long maxv)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, unsigned long long value)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, unsigned long long value, unsigned long long minv, unsigned long long maxv)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, signed char value)
 Set the value for the selected tuple column. More...
 
StatusCode column (const std::string &name, bool value)
 Set the value for selected tuple column. More...
 
StatusCode column (const std::string &name, IOpaqueAddress *address)
 Put IOpaqueAddress in POOL-based NTuple. More...
 
StatusCode column (IOpaqueAddress *address)
 Put IOpaqueAddress in NTuple. More...
 
template<typename Value , typename... Args>
StatusCode columns (Value &&value, Args &&...args)
 
StatusCode fill (const char *format...)
 Set the values for several columns simultaneously. More...
 
template<typename ITERATOR1 , typename ITERATOR2 >
StatusCode farray (const std::string &name, ITERATOR1 &&first, ITERATOR2 &&last, const std::string &length, size_t maxv)
 Add an indexed array (of type float) to N-tuple. More...
 
template<class DATA >
StatusCode farray (const std::string &name, const DATA &data, const std::string &length, const size_t maxv)
 Add an indexed array (of type float) to N-tuple. More...
 
template<class FUNCTION , class ITERATOR >
StatusCode farray (const std::string &name, const FUNCTION &function, ITERATOR first, ITERATOR last, const std::string &length, size_t maxv)
 Put an indexed array into LoKi-style N-Tuple. More...
 
template<typename Iterator , template< typename, typename... > class Container = std::initializer_list, typename Fun = std::function<float(detail::const_ref_t<Iterator>)>, typename Item = std::pair<std::string,Fun>, typename = std::enable_if_t<!std::is_same<std::string,Container<Item>>::value >>
StatusCode farray (const Container< Item > &items, Iterator first, Iterator last, const std::string &length, size_t maxv)
 Put arbitrary number of functions from one data array into LoKi-style N-Tuple simultaneously (effective!) More...
 
template<class FUNC1 , class FUNC2 , class Iterator >
StatusCode farray (const std::string &name1, const FUNC1 &func1, const std::string &name2, const FUNC2 &func2, Iterator &&first, Iterator &&last, const std::string &length, size_t maxv)
 Put two functions from one data array into LoKi-style N-Tuple simultaneously (effective!) More...
 
template<class FUNC1 , class FUNC2 , class FUNC3 , class Iterator >
StatusCode farray (const std::string &name1, const FUNC1 &func1, const std::string &name2, const FUNC2 &func2, const std::string &name3, const FUNC3 &func3, Iterator &&first, Iterator &&last, const std::string &length, size_t maxv)
 Put three functions from one data array into LoKi-style N-Tuple simultaneously (effective!) More...
 
template<class FUNC1 , class FUNC2 , class FUNC3 , class FUNC4 , class Iterator >
StatusCode farray (const std::string &name1, const FUNC1 &func1, const std::string &name2, const FUNC2 &func2, const std::string &name3, const FUNC3 &func3, const std::string &name4, const FUNC4 &func4, Iterator &&first, Iterator &&last, const std::string &length, size_t maxv)
 Put four functions from one data array into LoKi-style N-Tuple simultaneously (effective!) More...
 
template<class MATRIX >
StatusCode fmatrix (const std::string &name, const MATRIX &data, size_t rows, const MIndex &cols, const std::string &length, size_t maxv)
 Fill N-Tuple with data from variable-size matrix. More...
 
template<class DATA >
StatusCode fmatrix (const std::string &name, DATA first, DATA last, const MIndex &cols, const std::string &length, size_t maxv)
 Fill N-Tuple with data from variable-size matrix. More...
 
template<class FUN , class DATA >
StatusCode fmatrix (const std::string &name, FUN funF, FUN funL, DATA first, DATA last, const std::string &length, size_t maxv)
 fill N-Tuple with matrix of "direct-product" of "data-vector" [first,last) and "function-vector" [funF, funL) More...
 
template<class DATA >
StatusCode array (const std::string &name, DATA first, DATA last)
 fill N-Tuple with fixed-size array More...
 
template<class ARRAY >
StatusCode array (const std::string &name, const ARRAY &data, const MIndex &length)
 fill N-Tuple with fixed-size array More...
 
template<class ARRAY >
StatusCode array (const std::string &name, const ARRAY &data)
 fill N-Tuple with fixed-size array More...
 
template<class MATRIX >
StatusCode matrix (const std::string &name, const MATRIX &data, const MIndex &rows, const MIndex &cols)
 fill N-Tuple with fixed-size matrix More...
 
template<class TYPE >
StatusCode column (const std::string &name, const ROOT::Math::LorentzVector< TYPE > &v)
 Useful shortcut to put LorentzVector directly into N-Tuple: More...
 
template<class TYPE , class TAG >
StatusCode column (const std::string &name, const ROOT::Math::DisplacementVector3D< TYPE, TAG > &v)
 Useful shortcut to put 3D-Vector directly into N-Tuple: More...
 
template<class TYPE , class TAG >
StatusCode column (const std::string &name, const ROOT::Math::PositionVector3D< TYPE, TAG > &v)
 Useful shortcut to put 3D-Vector directly into N-Tuple: More...
 
template<class TYPE , unsigned int D1, unsigned int D2, class REP >
StatusCode matrix (const std::string &name, const ROOT::Math::SMatrix< TYPE, D1, D2, REP > &mtrx)
 shortcut to put Smatrix into N-tuple: More...
 
template<class KEY , class VALUE >
StatusCode fmatrix (const std::string &name, const GaudiUtils::VectorMap< KEY, VALUE > &info, const std::string &length, const size_t maxv=100)
 shortcut to put "ExtraInfo" fields of major into N-Tuple More...
 
template<class TYPE >
StatusCode put (const std::string &name, const TYPE *obj)
 The function allows to add almost arbitrary object into N-tuple. More...
 
StatusCode write ()
 write a record to NTuple More...
 
const std::stringname () const
 get the name More...
 
const NTuple::Tupletuple () const
 provide the access to underlying Gaudi N-tuple More...
 
NTuple::Tupletuple ()
 provide the access to underlying Gaudi N-tuple More...
 
unsigned long refCount () const
 return the reference counter More...
 
unsigned long addRef ()
 add the reference to TupleObj More...
 
void release ()
 release the reference to TupleObj if reference counter becomes zero, object will be automatically deleted More...
 
const CLIDclid () const
 accessor to the N-Tuple CLID More...
 
Tuples::Type type () const
 accessor to the N-Tuple type More...
 
bool columnWise () const
 column wise NTuple ? More...
 
bool rowWise () const
 row wise NTuple ? More...
 
bool evtColType () const
 Event collection ? More...
 
bool valid () const
 valid pointer to tuple ? More...
 
bool invalid () const
 invalid pointer to tuple ? More...
 
bool addItem (std::string name, std::string type)
 add the item name into the list of known items More...
 
bool goodItem (const std::string &name) const
 check the uniqueness of the name More...
 
const ItemMapitems () const
 get the full list of booked items More...
 
virtual StatusCode Error (const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const =0
 
virtual StatusCode Warning (const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const =0
 

Protected Member Functions

 TupleObj (std::string name, NTuple::Tuple *tuple, const CLID &clid=CLID_ColumnWiseTuple, const Tuples::Type type=Tuples::NTUPLE)
 Standard constructor. More...
 
virtual ~TupleObj ()
 destructor is protected More...
 

Private Types

typedef GaudiUtils::HashMap< std::string, std::unique_ptr< Bool > > Bools
 the actual storage type for short columns More...
 
typedef GaudiUtils::HashMap< std::string, std::unique_ptr< Char > > Chars
 the actual storage type for short columns More...
 
typedef GaudiUtils::HashMap< std::string, std::unique_ptr< UChar > > UChars
 the actual storage type for unsigned short columns More...
 
typedef GaudiUtils::HashMap< std::string, std::unique_ptr< Short > > Shorts
 the actual storage type for short columns More...
 
typedef GaudiUtils::HashMap< std::string, std::unique_ptr< UShort > > UShorts
 the actual storage type for unsigned short columns More...
 
typedef GaudiUtils::HashMap< std::string, std::unique_ptr< Int > > Ints
 the actual storage type for integer columns More...
 
typedef GaudiUtils::HashMap< std::string, std::unique_ptr< UInt > > UInts
 the actual storage type for unsigned integer columns More...
 
typedef GaudiUtils::HashMap< std::string, std::unique_ptr< LongLong > > LongLongs
 the actual storage type for longlong columns More...
 
typedef GaudiUtils::HashMap< std::string, std::unique_ptr< ULongLong > > ULongLongs
 the actual storage type for ulonglong columns More...
 
typedef GaudiUtils::HashMap< std::string, std::unique_ptr< Float > > Floats
 the actual storage type for float columns More...
 
typedef GaudiUtils::HashMap< std::string, std::unique_ptr< Double > > Doubles
 the actual storage type for float columns More...
 
typedef GaudiUtils::HashMap< std::string, std::unique_ptr< Address > > Addresses
 the actual storage type for address columns More...
 
typedef GaudiUtils::HashMap< std::string, std::unique_ptr< FArray > > FArrays
 the actual storage type for array columns More...
 
typedef GaudiUtils::HashMap< std::string, std::unique_ptr< FMatrix > > FMatrices
 the actual storage type for matrix columns More...
 

Private Member Functions

template<typename Tuple , typename Value , std::size_t... I>
StatusCode columns_helper (const Value &value, const Tuple &tup, std::index_sequence< I... >)
 Set the values for several columns simultaneously, for the same object Non-existing columns will be automatically created and appended to the ntuple. More...
 
Intints (const std::string &name, int minv, int maxv)
 get the column More...
 
FArrayfArray (const std::string &name, Int *item)
 get the column More...
 
FArrayfArray (const std::string &name, const MIndex &rows)
 get the column More...
 
Addressaddresses (const std::string &name)
 get the column More...
 
FMatrixfMatrix (const std::string &name, Int *item, const MIndex &cols)
 get the column More...
 
FMatrixfMatrix (const std::string &name, const MIndex &rows, const MIndex &cols)
 get the column More...
 
 TupleObj ()=delete
 delete the default/copy constructor and assignment More...
 
 TupleObj (const TupleObj &)=delete
 
TupleObjoperator= (const TupleObj &)=delete
 

Private Attributes

std::string m_name
 name More...
 
NTuple::Tuplem_tuple
 tuple itself More...
 
CLID m_clid
 tuple CLID More...
 
Tuples::Type m_type
 tuple 'type' More...
 
size_t m_refCount = 0
 reference counter More...
 
Bools m_bools
 the actual storage of all 'bool' columns More...
 
Chars m_chars
 the actual storage of all 'Int' columns More...
 
UChars m_uchars
 the actual storage of all 'unsigned int' columns More...
 
Shorts m_shorts
 the actual storage of all 'Int' columns More...
 
UShorts m_ushorts
 the actual storage of all 'unsigned int' columns More...
 
Ints m_ints
 the actual storage of all 'Int' columns More...
 
UInts m_uints
 the actual storage of all 'unsigned int' columns More...
 
LongLongs m_longlongs
 the actual storage of all 'longlong' columns More...
 
ULongLongs m_ulonglongs
 the actual storage of all 'ulonglong' columns More...
 
Floats m_floats
 the actual storage of all 'Float' columns More...
 
Doubles m_doubles
 the actual storage of all 'Double' columns More...
 
Addresses m_addresses
 the actual storage of all 'Address' columns More...
 
FArrays m_farrays
 the actual storage of all 'FArray' columns More...
 
FArrays m_arraysf
 the actual storage of all 'FArray' columns (fixed) More...
 
FMatrices m_fmatrices
 the actual storage of all 'FArray' columns More...
 
FMatrices m_matricesf
 the actual storage of all 'FMatrix' columns (fixed) More...
 
ItemMap m_items
 all booked types: More...
 

Detailed Description

A simple wrapper class over standard Gaudi NTuple::Tuple facility.

The design and implementation are imported from LoKi package

One should not use lass TupleObj directly. The special handler Tuples::Tuple should be used instead, which is simultaneously 'proxy' an d'smart pointer' for real (and heavy!) TupleObj class.

The main advantages of local ntuples with respect to 'standard' Gaudi NTuples ( NTuple::Tuple ) is their "locality". For 'standard' ntuples one need

  1. Define all ntuple columns/items as data members of the algorithm
  2. Book the NTuple::Tuple object using INTupleSvc
  3. Add all defined columns/items to the booked ntuple
  4. Fill ntuple records

Usually the first step is done in the header file (separate file!) of the algorithm, the second and the third steps are done in initialize() method of the algorithm and the fourth step is done somewhere in execute() method of the same algorithm. Such approach requires to keep track of the tuple structure through different method and event through different files. And even minor modification of the structure of the ntuple will require the modification of at least 2 methods and 2 files.

The Tuples::Tuple wrapper over standard Gaudi NTuple::Tuple class solves all above listed problems with "non-local" nature of Gaudi NTuple::Tuple objects.

Tuples::Tuple object is booked and used 'locally'. One does not need to pre-book the ntuple or its columns/items somewhere in different compilation units or other methods different from the actual point of using the ntuple.

The simplest example of usage Tuples::Tuple object:

Tuple tuple = nTuple( "some more or less unique tuple title ");
for( Loop D0 = loop( "K- pi+", "D0" ) , D0 , ++D0 )
{
tuple -> column ( "mass" , M ( D0 ) / GeV ) ;
tuple -> column ( "pt" , PT ( D0 ) / GeV ) ;
tuple -> column ( "p" , P ( D0 ) / GeV ) ;
tuple -> write () ;
}

One could fill some Tuple variables in one go

Tuple tuple = nTuple( "some more or less unique tuple title ");
for( Loop D0 = loop( "K- pi+", "D0" ) , D0 , ++D0 )
{
tuple -> column ( "mass" , M ( D0 ) / GeV ) ;
tuple -> fill ( "pt , p " , PT ( D0 ) / GeV , P(D0) / GeV ) ;
tuple -> write () ;
}

Even ALL variables could be filled in one go:

Tuple tuple = nTuple( "some more or less unique tuple title ");
for( Loop D0 = loop( "K- pi+", "D0" ) , D0 , ++D0 )
{
tuple -> fill ( "mass pt , p ", M(D0)/GeV,PT(D0)/GeV,P(D0)/GeV ) ;
tuple -> write () ;
}

The 'array-like' columns are also supported ( see methods 'farray')

All these techniques could be easily combined in arbitrary ways

class TupleObj is an abstract class with 3 pure abstract functions Error and Warning , which need to be reimplemented in any 'concrete class. Helper classes TupleObjImp, ErrorHandler and functions createTupleObj and make_handler allows to create concrete objects 'on-flight'

Attention
long long and unsigned long long types are not supported. One needs to convert the data into some other representation (e.g. as 2 separate fields, or perform the explicitly cast to long)
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2004-01-23

Definition at line 197 of file TupleObj.h.

Member Typedef Documentation

basic type for address items

Definition at line 235 of file TupleObj.h.

the actual storage type for address columns

Definition at line 2137 of file TupleObj.h.

basic type for int items

Definition at line 202 of file TupleObj.h.

the actual storage type for short columns

Definition at line 2104 of file TupleObj.h.

basic type for int items

Definition at line 205 of file TupleObj.h.

the actual storage type for short columns

Definition at line 2107 of file TupleObj.h.

basic type for double items

Definition at line 232 of file TupleObj.h.

the actual storage type for float columns

Definition at line 2134 of file TupleObj.h.

basic type for array of floats

Definition at line 238 of file TupleObj.h.

the actual storage type for array columns

Definition at line 2140 of file TupleObj.h.

basic type for float items

Definition at line 229 of file TupleObj.h.

the actual storage type for float columns

Definition at line 2131 of file TupleObj.h.

the actual storage type for matrix columns

Definition at line 2143 of file TupleObj.h.

basic type for matrix of floats

Definition at line 241 of file TupleObj.h.

basic type for int items

Definition at line 217 of file TupleObj.h.

the actual storage type for integer columns

Definition at line 2119 of file TupleObj.h.

basic type for unsigned long long items

Definition at line 223 of file TupleObj.h.

the actual storage type for longlong columns

Definition at line 2125 of file TupleObj.h.

typedef unsigned short Tuples::TupleObj::MIndex

Definition at line 244 of file TupleObj.h.

basic type for int items

Definition at line 211 of file TupleObj.h.

the actual storage type for short columns

Definition at line 2113 of file TupleObj.h.

typedef NTuple::Item<unsigned char> Tuples::TupleObj::UChar

basic type for unsigned int items

Definition at line 208 of file TupleObj.h.

the actual storage type for unsigned short columns

Definition at line 2110 of file TupleObj.h.

typedef NTuple::Item<unsigned int> Tuples::TupleObj::UInt

basic type for unsigned int items

Definition at line 220 of file TupleObj.h.

the actual storage type for unsigned integer columns

Definition at line 2122 of file TupleObj.h.

typedef NTuple::Item<unsigned long long> Tuples::TupleObj::ULongLong

basic type for unsigned long long items

Definition at line 226 of file TupleObj.h.

the actual storage type for ulonglong columns

Definition at line 2128 of file TupleObj.h.

typedef NTuple::Item<unsigned short> Tuples::TupleObj::UShort

basic type for unsigned int items

Definition at line 214 of file TupleObj.h.

the actual storage type for unsigned short columns

Definition at line 2116 of file TupleObj.h.

Constructor & Destructor Documentation

Tuples::TupleObj::TupleObj ( std::string  name,
NTuple::Tuple tuple,
const CLID clid = CLID_ColumnWiseTuple,
const Tuples::Type  type = Tuples::NTUPLE 
)
protected

Standard constructor.

See also
NTuple:Tuple
Parameters
namename of the object
tuplepointer to standard Gaudi NTuple::Tuple object
clidCLID_ColumnWiseTuple or CLID_RowWiseTuple
typethe type of the tuple

Definition at line 166 of file TupleObj.cpp.

171  : m_name ( std::move(name) )
172  , m_tuple ( tuple )
173  , m_clid ( clid )
174  , m_type ( type )
175 {
176  // make counts
177  Tuples::Local::s_InstanceCounter.increment ( m_name ) ;
178 }
CLID m_clid
tuple CLID
Definition: TupleObj.h:2155
Tuples::Type m_type
tuple &#39;type&#39;
Definition: TupleObj.h:2158
std::string m_name
name
Definition: TupleObj.h:2149
T move(T...args)
NTuple::Tuple * m_tuple
tuple itself
Definition: TupleObj.h:2152
Tuples::Type type() const
accessor to the N-Tuple type
Definition: TupleObj.h:2018
const CLID & clid() const
accessor to the N-Tuple CLID
Definition: TupleObj.h:2015
long increment(const std::string &object)
Definition: TupleObj.cpp:131
Tuples::TupleObj::~TupleObj ( )
protectedvirtual

destructor is protected

Definition at line 182 of file TupleObj.cpp.

183 {
184  // make counts
185  Tuples::Local::s_InstanceCounter.decrement ( m_name ) ;
186 }
long decrement(const std::string &object)
Definition: TupleObj.cpp:133
std::string m_name
name
Definition: TupleObj.h:2149
Tuples::TupleObj::TupleObj ( )
privatedelete

delete the default/copy constructor and assignment

Tuples::TupleObj::TupleObj ( const TupleObj )
privatedelete

Member Function Documentation

bool Tuples::TupleObj::addItem ( std::string  name,
std::string  type 
)
inline

add the item name into the list of known items

Parameters
namethe name of the item
typethe type of the item
Returns
true if the name is indeed added

Definition at line 2042 of file TupleObj.h.

2044  { return m_items.emplace ( std::move(name) , std::move(type) ).second ; }
ItemMap m_items
all booked types:
Definition: TupleObj.h:2212
T move(T...args)
T emplace(T...args)
unsigned long Tuples::TupleObj::addRef ( )
inline

add the reference to TupleObj

Returns
current reference counter

Definition at line 2006 of file TupleObj.h.

2006 { return ++m_refCount ; }
size_t m_refCount
reference counter
Definition: TupleObj.h:2161
Address* Tuples::TupleObj::addresses ( const std::string name)
private

get the column

template<class DATA >
StatusCode Tuples::TupleObj::array ( const std::string name,
DATA  first,
DATA  last 
)
inline

fill N-Tuple with fixed-size array

SEQUENCE data( 10 ) ;
...
tuple -> array("data" ,
data.begin () ,
data.end () ) ;

Sequence may be of any objects, implicitly convertible into "float"

Parameters
nameN-Tuple entry name
firstbegin-iterator for data sequence
lastend-iterator for data sequence
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@l.nosp@m.app..nosp@m.in2p3.nosp@m..fr
Date
2005-05-01

fill the array

Definition at line 1640 of file TupleObj.h.

1644  {
1645  if ( invalid () ) { return InvalidTuple ; }
1646  if ( rowWise () ) { return InvalidOperation ; }
1647 
1648  // get the length (fixed!)
1649  auto length = std::distance(first,last);
1650 
1651  // get the array itself
1652  FArray* var = fArray ( name , length ) ;
1653  if ( !var ) { return InvalidColumn ; }
1654 
1656  std::copy( first, last, std::begin(*var) );
1657 
1658  return StatusCode::SUCCESS ;
1659  }
T copy(T...args)
T distance(T...args)
bool rowWise() const
row wise NTuple ?
Definition: TupleObj.h:2024
FArray * fArray(const std::string &name, Int *item)
get the column
Definition: TupleObj.cpp:467
T begin(T...args)
bool invalid() const
invalid pointer to tuple ?
Definition: TupleObj.h:2033
NTuple::Array< float > FArray
basic type for array of floats
Definition: TupleObj.h:238
template<class ARRAY >
StatusCode Tuples::TupleObj::array ( const std::string name,
const ARRAY &  data,
const MIndex length 
)
inline

fill N-Tuple with fixed-size array

"ARRAY" must support indexing operations: e.g it coudl be of type:

  • std::vector<TYPE>
  • CLHEP::HepVector, ...
  • "TYPE"[n]

The content of array should be implicitly convertible to "float"

CLHEP::HepVector vct1(10) ;
...
tuple -> array ( "vct1" , vct1 , 10 ) ;
double vct2[40];
...
tuple -> array ( "vct2" , vct2 , 40 ) ;
long vct3[4];
...
tuple -> array ( "vct3" , vct4 , 4 ) ;
...
tuple -> array ( "vct4" , vct4 , 15 ) ;
Parameters
nameN-Tuple entry name
datadata sequence
lengthdata length (fixed!)
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@l.nosp@m.app..nosp@m.in2p3.nosp@m..fr
Date
2005-05-01

Definition at line 1700 of file TupleObj.h.

1703  {
1704  using std::begin; // allow data to be eg. CLHEP::HepVector (which does not define HepVector::begin()!,
1705  // in which case ADL prefers CLHEP::begin (yah! at least they (now) use a namespace)
1706  // so one just to insure double* CLHEP::begin(CLHEP::HepVector& v) { return &v[0]; }
1707  // is visible when this function gets instantiated for CLHEP::HepVector...
1708  auto first = begin(data);
1709  return array( name, first, std::next( first, length ) );
1710  }
auto begin(reverse_wrapper< T > &w)
Definition: reverse.h:48
T next(T...args)
StatusCode array(const std::string &name, DATA first, DATA last)
fill N-Tuple with fixed-size array
Definition: TupleObj.h:1640
T begin(T...args)
template<class ARRAY >
StatusCode Tuples::TupleObj::array ( const std::string name,
const ARRAY &  data 
)
inline

fill N-Tuple with fixed-size array

"ARRAY" is any sequence, which supports ARRAY::begin() and ARRAY::end() protocol, e.g.

  • std::vector<TYPE>
  • ROOT::Math::SVector<double,15>

The content of array should be implicitly convertible to "float"

typedef std::vector<double> Seq ;
Seq data( 10 ) ;
for ( int i = 0 ; i < 10 ; ++i )
{
data[i] = ... ;
}
tuple -> array( "data" , data ) ;
Parameters
nameN-Tupel entry name
datadata sequence
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@l.nosp@m.app..nosp@m.in2p3.nosp@m..fr
Date
2005-05-01

Definition at line 1743 of file TupleObj.h.

1745  {
1746  using std::begin; using std::end;
1747  return array ( name , begin(data) , end(data) ) ;
1748  }
T end(T...args)
auto begin(reverse_wrapper< T > &w)
Definition: reverse.h:48
auto end(reverse_wrapper< T > &w)
Definition: reverse.h:50
StatusCode array(const std::string &name, DATA first, DATA last)
fill N-Tuple with fixed-size array
Definition: TupleObj.h:1640
T begin(T...args)
const CLID& Tuples::TupleObj::clid ( ) const
inline

accessor to the N-Tuple CLID

Definition at line 2015 of file TupleObj.h.

2015 { return m_clid ; }
CLID m_clid
tuple CLID
Definition: TupleObj.h:2155
StatusCode Tuples::TupleObj::column ( const std::string name,
float  value 
)

Set the value for selected tuple column.

If column does not exist, it will be automatically created and appended to the tuple

//
const float mass = ... ;
tuple->column( "m", mass );
//
Parameters
namethe name of the column
valuethe value of the variable
Returns
status code

Definition at line 285 of file TupleObj.cpp.

287 {
288  return column_(this, m_floats,name,value);
289 }
Floats m_floats
the actual storage of all &#39;Float&#39; columns
Definition: TupleObj.h:2191
StatusCode Tuples::TupleObj::column ( const std::string name,
double  value 
)

Set the value for the selected tuple column If the column does not exist, it will be automatically created and appended to the tuple.

//
const double mass = ... ;
tuple->column( "m", mass );
//
Warning
the value is truncated to float
Parameters
namethe name of the column
valuethe value of the variable
Returns
status code

Definition at line 291 of file TupleObj.cpp.

293 {
294  return column_(this, m_doubles, name,value);
295 }
Doubles m_doubles
the actual storage of all &#39;Double&#39; columns
Definition: TupleObj.h:2194
StatusCode Tuples::TupleObj::column ( const std::string name,
short  value 
)

Set the value for selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

short number = ... ;
tuple -> column ( "num" , number );
Parameters
namethe name of the column
valuethe value of the variable
Returns
status code

Definition at line 325 of file TupleObj.cpp.

327 {
328  return column_(this, m_shorts, name,value);
329 }
Shorts m_shorts
the actual storage of all &#39;Int&#39; columns
Definition: TupleObj.h:2173
StatusCode Tuples::TupleObj::column ( const std::string name,
short  value,
short  minv,
short  maxv 
)

Set the value for selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

short number = ... ;
tuple->column( "num", number );
Parameters
namename of the column
valuevalue of the variable
minvminimum value of the variable
maxvmaximum value of the variable
Returns
status code

Definition at line 331 of file TupleObj.cpp.

335 {
336  return column_(this, m_shorts, name, value, minv, maxv);
337 }
Shorts m_shorts
the actual storage of all &#39;Int&#39; columns
Definition: TupleObj.h:2173
StatusCode Tuples::TupleObj::column ( const std::string name,
unsigned short  value 
)

Set the value for selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

unsigned short number = ... ;
tuple -> column ( "num" , number );
Parameters
namethe name of the column
valuethe value of the variable
Returns
status code

Definition at line 339 of file TupleObj.cpp.

341 {
342  return column_(this, m_ushorts, name, value );
343 }
UShorts m_ushorts
the actual storage of all &#39;unsigned int&#39; columns
Definition: TupleObj.h:2176
StatusCode Tuples::TupleObj::column ( const std::string name,
unsigned short  value,
unsigned short  minv,
unsigned short  maxv 
)

Set the value for selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

unsigned short number = ... ;
tuple->column( "num", number );
Parameters
namename of the column
valuevalue of the variable
minvminimum value of the variable
maxvmaximum value of the variable
Returns
status code

Definition at line 345 of file TupleObj.cpp.

349 {
350  return column_(this, m_ushorts, name, value, minv, maxv );
351 }
UShorts m_ushorts
the actual storage of all &#39;unsigned int&#39; columns
Definition: TupleObj.h:2176
StatusCode Tuples::TupleObj::column ( const std::string name,
char  value 
)

Set the value for selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

char number = ... ;
tuple -> column ( "num" , number );
Parameters
namethe name of the column
valuethe value of the variable
Returns
status code

Definition at line 297 of file TupleObj.cpp.

299 {
300  return column_(this, m_chars, name, value);
301 }
Chars m_chars
the actual storage of all &#39;Int&#39; columns
Definition: TupleObj.h:2167
StatusCode Tuples::TupleObj::column ( const std::string name,
char  value,
char  minv,
char  maxv 
)

Set the value for selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

char number = ... ;
tuple->column( "num", number );
Parameters
namename of the column
valuevalue of the variable
minvminimum value of the variable
maxvmaximum value of the variable
Returns
status code

Definition at line 303 of file TupleObj.cpp.

307 {
308  return column_(this, m_chars, name,value,minv,maxv);
309 }
Chars m_chars
the actual storage of all &#39;Int&#39; columns
Definition: TupleObj.h:2167
StatusCode Tuples::TupleObj::column ( const std::string name,
unsigned char  value 
)

Set the value for selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

unsigned char number = ... ;
tuple -> column ( "num" , number );
Parameters
namethe name of the column
valuethe value of the variable
Returns
status code

Definition at line 311 of file TupleObj.cpp.

313 {
314  return column_(this, m_uchars, name,value);
315 }
UChars m_uchars
the actual storage of all &#39;unsigned int&#39; columns
Definition: TupleObj.h:2170
StatusCode Tuples::TupleObj::column ( const std::string name,
unsigned char  value,
unsigned char  minv,
unsigned char  maxv 
)

Set the value for selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

unsigned char number = ... ;
tuple->column( "num", number );
Parameters
namename of the column
valuevalue of the variable
minvminimum value of the variable
maxvmaximum value of the variable
Returns
status code

Definition at line 317 of file TupleObj.cpp.

321 {
322  return column_(this, m_uchars, name,value,minv,maxv);
323 }
UChars m_uchars
the actual storage of all &#39;unsigned int&#39; columns
Definition: TupleObj.h:2170
StatusCode Tuples::TupleObj::column ( const std::string name,
int  value 
)

Set the value for selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

int number = ... ;
tuple->column("num", number );
Parameters
namename of the column
valuevalue of the variable
Returns
status code

Definition at line 353 of file TupleObj.cpp.

355 {
356  return column_(this, m_ints, name, value );
357 }
Ints m_ints
the actual storage of all &#39;Int&#39; columns
Definition: TupleObj.h:2179
StatusCode Tuples::TupleObj::column ( const std::string name,
int  value,
int  minv,
int  maxv 
)

Set the value for selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

int number = ... ;
tuple->column( "num", number );
Parameters
namename of the column
valuevalue of the variable
minvminimum value of the variable
maxvmaximum value of the variable
Returns
status code

Definition at line 359 of file TupleObj.cpp.

363 {
364  return column_(this, m_ints, name,value,minv,maxv);
365 }
Ints m_ints
the actual storage of all &#39;Int&#39; columns
Definition: TupleObj.h:2179
StatusCode Tuples::TupleObj::column ( const std::string name,
unsigned int  value 
)

Set the value for selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

unsigned int number = ... ;
tuple->column("num", number );
Parameters
namename of the column
valuevalue of the variable
Returns
status code

Definition at line 374 of file TupleObj.cpp.

376 {
377  return column_(this, m_uints, name,value);
378 }
UInts m_uints
the actual storage of all &#39;unsigned int&#39; columns
Definition: TupleObj.h:2182
StatusCode Tuples::TupleObj::column ( const std::string name,
unsigned int  value,
unsigned int  minv,
unsigned int  maxv 
)

Set the value for selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

unsigned int number = ... ;
tuple->column("num", number );
Parameters
namename of the column
valuevalue of the variable
minvminimum value of the variable
maxvmaximum value of the variable
Returns
status code

Definition at line 380 of file TupleObj.cpp.

384 {
385  return column_(this, m_uints, name,value,minv,maxv);
386 }
UInts m_uints
the actual storage of all &#39;unsigned int&#39; columns
Definition: TupleObj.h:2182
StatusCode Tuples::TupleObj::column ( const std::string name,
long  value 
)

Set the value for the selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

long number = ... ;
tuple -> column ( "num", number );
Warning
the value could be truncated to int
Parameters
namethe name of the column
valuethe value of the variable
Returns
status code

Definition at line 388 of file TupleObj.cpp.

390 {
391  Warning( "'long' has different sizes on 32/64 bit systems. Casting '" +
392  name + "' to 'long long'", StatusCode::SUCCESS ).ignore();
393  return column( name, static_cast<long long>(value) );
394 }
StatusCode column(const std::string &name, float value)
Set the value for selected tuple column.
Definition: TupleObj.cpp:285
virtual StatusCode Warning(const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const =0
void ignore() const
Definition: StatusCode.h:106
StatusCode Tuples::TupleObj::column ( const std::string name,
long  value,
long  minv,
long  maxv 
)

Set the value for selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

long number = ... ;
tuple->column("num", number );
Parameters
namename of the column
valuevalue of the variable
minvminimum value of the variable
maxvmaximum value of the variable
Returns
status code

Definition at line 396 of file TupleObj.cpp.

400 {
401  Warning( "'long' has different sizes on 32/64 bit systems. Casting '" +
402  name + "' to 'long long'", StatusCode::SUCCESS ).ignore();
403  return column( name,
404  static_cast<long long>(value),
405  static_cast<long long>(minv),
406  static_cast<long long>(maxv) );
407 }
StatusCode column(const std::string &name, float value)
Set the value for selected tuple column.
Definition: TupleObj.cpp:285
virtual StatusCode Warning(const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const =0
void ignore() const
Definition: StatusCode.h:106
StatusCode Tuples::TupleObj::column ( const std::string name,
unsigned long  value 
)

Set the value for selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

unsigned long number = ... ;
tuple -> column ( "num" , number );
Warning
the value could be truncated to int
Parameters
namethe name of the column
valuethe value of the variable
Returns
status code

Definition at line 409 of file TupleObj.cpp.

411 {
412  Warning( "'unsigned long' has different sizes on 32/64 bit systems. Casting '" +
413  name + "' to 'unsigned long long'", StatusCode::SUCCESS ).ignore();
414  return column( name, static_cast<unsigned long long>(value) );
415 }
StatusCode column(const std::string &name, float value)
Set the value for selected tuple column.
Definition: TupleObj.cpp:285
virtual StatusCode Warning(const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const =0
void ignore() const
Definition: StatusCode.h:106
StatusCode Tuples::TupleObj::column ( const std::string name,
unsigned long  value,
unsigned long  minv,
unsigned long  maxv 
)

Set the value for selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

unsigned long number = ... ;
tuple->column( "num", number );
Parameters
namename of the column
valuevalue of the variable
minvminimum value of the variable
maxvmaximum value of the variable
Returns
status code

Definition at line 417 of file TupleObj.cpp.

421 {
422  Warning( "'unsigned long' has different sizes on 32/64 bit systems. Casting '" +
423  name + "' to 'unsigned long long'", StatusCode::SUCCESS ).ignore();
424  return column( name,
425  static_cast<unsigned long long>(value),
426  static_cast<unsigned long long>(minv),
427  static_cast<unsigned long long>(maxv) );
428 }
StatusCode column(const std::string &name, float value)
Set the value for selected tuple column.
Definition: TupleObj.cpp:285
virtual StatusCode Warning(const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const =0
void ignore() const
Definition: StatusCode.h:106
StatusCode Tuples::TupleObj::column ( const std::string name,
long long  value 
)

Set the value for selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

long long number = ... ;
tuple->column( "num", number );
Parameters
namename of the column
valuevalue of the variable
Returns
status code

Definition at line 430 of file TupleObj.cpp.

432 {
433  return column_(this, m_longlongs, name,value);
434 }
LongLongs m_longlongs
the actual storage of all &#39;longlong&#39; columns
Definition: TupleObj.h:2185
StatusCode Tuples::TupleObj::column ( const std::string name,
long long  value,
long long  minv,
long long  maxv 
)

Set the value for selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

long long number = ... ;
tuple->column( "num", number );
Parameters
namename of the column
valuevalue of the variable
minvminimum value of the variable
maxvmaximum value of the variable
Returns
status code

Definition at line 436 of file TupleObj.cpp.

440 {
441  return column_(this, m_longlongs, name,value,minv,maxv);
442 }
LongLongs m_longlongs
the actual storage of all &#39;longlong&#39; columns
Definition: TupleObj.h:2185
StatusCode Tuples::TupleObj::column ( const std::string name,
unsigned long long  value 
)

Set the value for selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

unsigned long long number = ... ;
tuple->column( "num", number );
Parameters
namename of the column
valuevalue of the variable
Returns
status code

Definition at line 444 of file TupleObj.cpp.

446 {
447  return column_(this, m_ulonglongs, name,value);
448 }
ULongLongs m_ulonglongs
the actual storage of all &#39;ulonglong&#39; columns
Definition: TupleObj.h:2188
StatusCode Tuples::TupleObj::column ( const std::string name,
unsigned long long  value,
unsigned long long  minv,
unsigned long long  maxv 
)

Set the value for selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

unsigned long long number = ... ;
tuple->column( "num", number );
Parameters
namename of the column
valuevalue of the variable
minvminimum value of the variable
maxvmaximum value of the variable
Returns
status code

Definition at line 450 of file TupleObj.cpp.

454 {
455  return column_( this, m_ulonglongs, name,value,minv,maxv);
456 }
ULongLongs m_ulonglongs
the actual storage of all &#39;ulonglong&#39; columns
Definition: TupleObj.h:2188
StatusCode Tuples::TupleObj::column ( const std::string name,
signed char  value 
)
inline

Set the value for the selected tuple column.

If the column does not exist yet, it will be automatically created and appended to the tuple

signed char number = ... ;
tuple->column("num", number );
Parameters
namethe name of the column
valuethe value of tve variable
Returns
status code

Definition at line 736 of file TupleObj.h.

737  {
738  return column ( name , value ,
741  }
StatusCode column(const std::string &name, float value)
Set the value for selected tuple column.
Definition: TupleObj.cpp:285
StatusCode Tuples::TupleObj::column ( const std::string name,
bool  value 
)

Set the value for selected tuple column.

If the column does not exist yet, it will be automatically create and appended to the tuple

tuple->column( "empty" , v.empty() );
Parameters
namethe name of the column
valuethe value of the variable
Returns
status code

Definition at line 458 of file TupleObj.cpp.

460 {
461  return column_(this, m_bools, name,value);
462 }
Bools m_bools
the actual storage of all &#39;bool&#39; columns
Definition: TupleObj.h:2164
StatusCode Tuples::TupleObj::column ( const std::string name,
IOpaqueAddress address 
)

Put IOpaqueAddress in POOL-based NTuple.

If the column does not exist, it will be automatically created and appended to the tuple.

IOpaqueAddress* address = ... ;
tuple->column( "Address", address );
Warning
It has sense only for Event tag collection N-Tuples
Parameters
namename of the column ("Address" is a recommended convention!)
addressIOpaqueAddress
Returns
status code

Definition at line 265 of file TupleObj.cpp.

267 {
268  if ( !evtColType () ) { return InvalidOperation ; }
269  if ( !address )
270  { return Error ( "column('" + name +
271  "') IOpaqueAddress* is NULL!" , InvalidObject ) ; }
272  return column_(this, m_addresses, name, address);
273 }
bool evtColType() const
Event collection ?
Definition: TupleObj.h:2027
Addresses m_addresses
the actual storage of all &#39;Address&#39; columns
Definition: TupleObj.h:2197
virtual StatusCode Error(const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const =0
StatusCode Tuples::TupleObj::column ( IOpaqueAddress address)

Put IOpaqueAddress in NTuple.

If the column does not exist, it will be automatically created and appended to the tuple. The column name is set to be "Address"

IOpaqueAddress* address = ... ;
tuple->column ( address );
Warning
It has sense only for Event tag collection N-Tuples
Parameters
addressIOpaqueAddress
Returns
status code

Definition at line 279 of file TupleObj.cpp.

280 {
281  return column ( "Address" , address ) ;
282 }
StatusCode column(const std::string &name, float value)
Set the value for selected tuple column.
Definition: TupleObj.cpp:285
template<class TYPE >
StatusCode Tuples::TupleObj::column ( const std::string name,
const ROOT::Math::LorentzVector< TYPE > &  v 
)
inline

Useful shortcut to put LorentzVector directly into N-Tuple:

const LHCb::Particle* B = ...
Tuple tuple = nTuple("My N-Tuple") ;
// put 4-vector of B-candidate into N-tuple:
tuple -> column ("B" , B->momentum() ) ;
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-11-26

Definition at line 1841 of file TupleObj.h.

1842  {
1843  return columns( v, std::make_pair( name + "E", &ROOT::Math::LorentzVector<TYPE>::E ),
1844  std::make_pair( name + "X", &ROOT::Math::LorentzVector<TYPE>::Px),
1845  std::make_pair( name + "Y", &ROOT::Math::LorentzVector<TYPE>::Py),
1846  std::make_pair( name + "Z", &ROOT::Math::LorentzVector<TYPE>::Pz) );
1847  }
T make_pair(T...args)
StatusCode columns(Value &&value, Args &&...args)
Definition: TupleObj.h:841
template<class TYPE , class TAG >
StatusCode Tuples::TupleObj::column ( const std::string name,
const ROOT::Math::DisplacementVector3D< TYPE, TAG > &  v 
)
inline

Useful shortcut to put 3D-Vector directly into N-Tuple:

const LHCb::Vertex* V = ...
Tuple tuple = nTuple("My N-Tuple") ;
// put vertex position into N-tuple:
tuple -> column ("B" , B->position() ) ;
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-11-26

Definition at line 1866 of file TupleObj.h.

1868  {
1869  return this->columns( v, std::make_pair( name + "X", &ROOT::Math::DisplacementVector3D<TYPE,TAG>::X ),
1872  }
T make_pair(T...args)
StatusCode columns(Value &&value, Args &&...args)
Definition: TupleObj.h:841
template<class TYPE , class TAG >
StatusCode Tuples::TupleObj::column ( const std::string name,
const ROOT::Math::PositionVector3D< TYPE, TAG > &  v 
)
inline

Useful shortcut to put 3D-Vector directly into N-Tuple:

const LHCb::Vertex* V = ...
Tuple tuple = nTuple("My N-Tuple") ;
// put vertex position into N-tuple:
tuple -> column ("B" , B->position() ) ;
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-11-26

Definition at line 1892 of file TupleObj.h.

1894  {
1895  return this->columns( v,
1899  }
T make_pair(T...args)
StatusCode columns(Value &&value, Args &&...args)
Definition: TupleObj.h:841
template<typename Value , typename... Args>
StatusCode Tuples::TupleObj::columns ( Value &&  value,
Args &&...  args 
)
inline

Definition at line 841 of file TupleObj.h.

841  {
842  return columns_helper(std::forward<Value>(value),
843  std::forward_as_tuple(std::forward<Args>(args)...),
844  std::index_sequence_for<Args...>{});
845  }
T forward_as_tuple(T...args)
StatusCode columns_helper(const Value &value, const Tuple &tup, std::index_sequence< I... >)
Set the values for several columns simultaneously, for the same object Non-existing columns will be a...
Definition: TupleObj.h:825
template<typename Tuple , typename Value , std::size_t... I>
StatusCode Tuples::TupleObj::columns_helper ( const Value &  value,
const Tuple tup,
std::index_sequence< I... >   
)
inlineprivate

Set the values for several columns simultaneously, for the same object Non-existing columns will be automatically created and appended to the ntuple.

tuple->columns( p, std::make_pair( "X", &Gaudi::XYZPoint::X),
std::make_pair( "Y", &Gaudi::XYZPoint::Y),
std::make_pair( "Z", &Gaudi::XYZPoint::Z) );
Warning
the type of column is set (implicitly) by the type returned by the 'callable' for that column, i.e. in the above the return type of eg. Gaudi::XYZPoint::X()
Author
Gerhard Raven

Definition at line 825 of file TupleObj.h.

825  {
827  this->column(std::get<I>(tup).first, Gaudi::invoke(std::get<I>(tup).second,value))...
828  };
829  auto is_ok = [](const StatusCode& sc) -> bool { return sc; };
830  auto i = std::find_if_not(begin(scs), end(scs), is_ok );
831  if (i!=end(scs)) {
832  // avoid unchecked StatusCodes...
833  std::for_each(std::next(i),end(scs),is_ok);
834  return *i;
835  }
836  return StatusCode::SUCCESS;
837  }
StatusCode column(const std::string &name, float value)
Set the value for selected tuple column.
Definition: TupleObj.cpp:285
auto begin(reverse_wrapper< T > &w)
Definition: reverse.h:48
constexpr double second
T next(T...args)
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
auto end(reverse_wrapper< T > &w)
Definition: reverse.h:50
T find_if_not(T...args)
auto invoke(F &&f, ArgTypes &&...args) noexcept(noexcept(detail2::INVOKE(std::forward< F >(f), std::forward< ArgTypes >(args)...))) -> decltype(detail2::INVOKE(std::forward< F >(f), std::forward< ArgTypes >(args)...))
Definition: invoke.h:89
T for_each(T...args)
bool Tuples::TupleObj::columnWise ( ) const
inline

column wise NTuple ?

Definition at line 2021 of file TupleObj.h.

2021 { return CLID_ColumnWiseTuple == clid() ; }
const CLID & clid() const
accessor to the N-Tuple CLID
Definition: TupleObj.h:2015
virtual StatusCode Tuples::TupleObj::Error ( const std::string msg,
const StatusCode  sc = StatusCode::FAILURE 
) const
pure virtual
bool Tuples::TupleObj::evtColType ( ) const
inline

Event collection ?

Definition at line 2027 of file TupleObj.h.

2027 { return Tuples::EVTCOL == type() ; }
Tuples::Type type() const
accessor to the N-Tuple type
Definition: TupleObj.h:2018
template<typename ITERATOR1 , typename ITERATOR2 >
StatusCode Tuples::TupleObj::farray ( const std::string name,
ITERATOR1 &&  first,
ITERATOR2 &&  last,
const std::string length,
size_t  maxv 
)
inline

Add an indexed array (of type float) to N-tuple.

The method is not VERY efficient since it copies the data.

std::vector<double> values = ... ;
tuple->farray( "Values" , // item name
values.begin () , // begin of sequence
values.end () , // end of sequence
"Length" , // name of "length" item
10000 ) ;

The name of "length" item can be reused for several arrays. The last assignement "wins"

std::vector<double> val1 = ... ;
std::vector<double> val2 = ... ;
tuple->farray( "Val1" , // item name
val1.begin () , // begin of sequence
val1.end () , // end of sequence
"Length" , // name of "length" item
10000 ) ; // maximal length
tuple->farray( "Val2" , // item name
val2.begin () , // begin of sequence
val2.end () , // end of sequence
"Length" , // name of "length" item
10000 ) ; // maximal length

Any sequence [first:last[ of objects which can be converted to type float can be used as input data, e.g. std::vector<double>, std::vector<float>, plain C-array, or whatever else

Parameters
namename of N-tuple item
firstbegin of data sequence
lastend of data sequence
lengthname of "length" item
maxvmaximal length of array

Definition at line 925 of file TupleObj.h.

930  {
931  return farray( name, detail::to_float,
932  std::forward<ITERATOR1>(first), std::forward<ITERATOR2>(last),
933  length, maxv );
934  }
StatusCode farray(const std::string &name, ITERATOR1 &&first, ITERATOR2 &&last, const std::string &length, size_t maxv)
Add an indexed array (of type float) to N-tuple.
Definition: TupleObj.h:925
template<class DATA >
StatusCode Tuples::TupleObj::farray ( const std::string name,
const DATA &  data,
const std::string length,
const size_t  maxv 
)
inline

Add an indexed array (of type float) to N-tuple.

it is just a small adaptor for the previous method

std::vector<double> values = ... ;
tuple->farray( "Values" , // item name
values , // sequence
"Length" , // name of "length" item
10000 ) ;

The name of "length" item can be reused for several arrays. The last assignment "wins"

std::vector<double> val1 = ... ;
std::vector<double> val2 = ... ;
tuple->farray( "Val1" , // item name
val1 , // begin of sequence
"Length" , // name of "length" item
10000 ) ; // maximal length
tuple->farray( "Val2" , // item name
val2 , // begin of sequence
"Length" , // name of "length" item
10000 ) ; // maximal length

Any sequence which provides begin() and end() methods can be used.

Parameters
namename of N-tuple item
datadata sequence
lengthname of "length" item
maxvmaximal length of array

Definition at line 979 of file TupleObj.h.

983  { return farray ( name , std::begin(data) , std::end(data) , length , maxv ) ; }
T end(T...args)
StatusCode farray(const std::string &name, ITERATOR1 &&first, ITERATOR2 &&last, const std::string &length, size_t maxv)
Add an indexed array (of type float) to N-tuple.
Definition: TupleObj.h:925
T begin(T...args)
template<class FUNCTION , class ITERATOR >
StatusCode Tuples::TupleObj::farray ( const std::string name,
const FUNCTION &  function,
ITERATOR  first,
ITERATOR  last,
const std::string length,
size_t  maxv 
)
inline

Put an indexed array into LoKi-style N-Tuple.

std::vector<double> data = ... ;
Tuple tuple = ntuple( "My Ntuple" );
tuple->farray( "data" , // data item name
sqrt , // "function" to be applied
data.begin () , // begin of data sequence
data.end () , // end of data sequence
"length" , // name of "length" tuple item
10000 ) ; // maximal array length

Since the method is templated, one can use arbitrary combinations of "sequences" and "functions", e.g. one can directly manipulate with complex objects. The only one thing is required - the result of FUNCTION(*DATA) formal operation MUST be convertible to type float

// some container of particles.
ParticleVector particles = ... ;
Tuple tuple = ntuple( "My Ntuple" );
// put the transverse momentum of all particles into N-Tuple
tuple->farray( "pt" , // data item name
PT , // function object
particles.begin () , // begin of data sequence
particles.end () , // end of data sequence
"num" , // name of "length" tuple item
10000 ) ; // maximal array length
// create the appropriate function object
Fun fun = Q / P ;
// put Q/P of all particles into N-Tuple
tuple->farray( "qp" , // data item name
fun , // function object
particles.begin () , // begin of data sequence
particles.end () , // end of data sequence
"num" , // name of "length" tuple item
10000 ) ; // maximal array length
Parameters
nametuple item name
functionfunction to be applied
firstbegin of data sequence
lastend of data sequence
lengthname of "length" tuple name
maxvmaximal length of the array
Returns
status code

Definition at line 1048 of file TupleObj.h.

1054  {
1055  if ( invalid () ) { return InvalidTuple ; }
1056  if ( rowWise () ) { return InvalidOperation ; }
1057 
1058  // adjust the length
1059  if( std::distance(first,last) > static_cast<std::ptrdiff_t>(maxv) ) {
1060  Warning("farray('"
1061  + name + "'): array is overflow, skip extra entries") ;
1062  last = std::next(first,maxv);
1063  }
1064 
1065  // get the length item
1066  Int* len = ints( length , 0 , maxv ) ;
1067  if( !len ) { return InvalidColumn ; }
1068 
1069  // adjust the length
1070  *len = std::distance(first,last);
1071 
1072  // get the array itself
1073  FArray* var = fArray ( name , len ) ;
1074  if( !var ) { return InvalidColumn ; }
1075 
1076  // fill the array
1077  std::transform( first, last, std::begin(*var), std::cref(function) );
1078 
1079  return StatusCode::SUCCESS ;
1080  }
Int * ints(const std::string &name, int minv, int maxv)
get the column
Definition: TupleObj.cpp:367
T distance(T...args)
virtual StatusCode Warning(const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const =0
T next(T...args)
bool rowWise() const
row wise NTuple ?
Definition: TupleObj.h:2024
FArray * fArray(const std::string &name, Int *item)
get the column
Definition: TupleObj.cpp:467
T cref(T...args)
T begin(T...args)
NTuple::Item< int > Int
basic type for int items
Definition: TupleObj.h:217
bool invalid() const
invalid pointer to tuple ?
Definition: TupleObj.h:2033
T transform(T...args)
NTuple::Array< float > FArray
basic type for array of floats
Definition: TupleObj.h:238
template<typename Iterator , template< typename, typename... > class Container = std::initializer_list, typename Fun = std::function<float(detail::const_ref_t<Iterator>)>, typename Item = std::pair<std::string,Fun>, typename = std::enable_if_t<!std::is_same<std::string,Container<Item>>::value >>
StatusCode Tuples::TupleObj::farray ( const Container< Item > &  items,
Iterator  first,
Iterator  last,
const std::string length,
size_t  maxv 
)
inline

Put arbitrary number of functions from one data array into LoKi-style N-Tuple simultaneously (effective!)

std::vector<double> data = ... ;
Tuple tuple = ntuple( "My Ntuple" );
tuple->farray( { { "sqrt", sqrt }, // name of 1st column, and function to use for it
{ "sinus", sin } }, // name of the 2nd column, and corresponding function
data.begin () , // begin of data sequence
data.end () , // end of data sequence
"length" , // name of "length" tuple item
10000 ) ; // maximal array length
Parameters
itemsvector of pairs { name, callable }
firstbegin of data sequence
lastend of data sequence
lengthname of "length" tuple name
maxvmaximal length of the array
Returns
status code

Definition at line 1112 of file TupleObj.h.

1117  {
1118  if ( invalid () ) { return InvalidTuple ; }
1119  if ( rowWise () ) { return InvalidOperation ; }
1120 
1121  // adjust the lenfth
1122  if( std::distance(first,last) > static_cast<std::ptrdiff_t>(maxv) ) {
1124  std::ostringstream os;
1125  ostream_joiner( os, items, ",",
1126  [](std::ostream& os, const auto& i) -> std::ostream&
1127  { return os << i.first; } );
1128  Warning( "farray('" + os.str()
1129  + "'): array overflow, skipping extra entries").ignore() ;
1130  last = std::next(first, maxv) ;
1131  }
1132 
1133  // get the length item
1134  Int* len = ints ( length , 0 , maxv ) ;
1135  if ( !len ) { return InvalidColumn ; }
1136 
1137  // adjust the length
1138  *len = std::distance(first,last);
1139 
1140  // get the arrays themselves
1141  std::vector<FArray*> vars; vars.reserve(items.size());
1143  [&](const auto& item) { return this->fArray(item.first,len); } );
1144  if ( std::any_of( vars.begin(), vars.end(), [](const FArray* f) { return !f; } ) ) {
1145  return InvalidColumn ;
1146  }
1147 
1148  // fill the array
1149  for(size_t index = 0; first != last; ++first,++index ) {
1150  auto item = items.begin();
1151  for( auto& var : vars ) {
1152  (*var)[index] = (item++)->second(*first);
1153  }
1154  }
1155 
1156  return StatusCode::SUCCESS ;
1157  }
Int * ints(const std::string &name, int minv, int maxv)
get the column
Definition: TupleObj.cpp:367
T distance(T...args)
T end(T...args)
constexpr double second
virtual StatusCode Warning(const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const =0
T next(T...args)
bool rowWise() const
row wise NTuple ?
Definition: TupleObj.h:2024
Stream & ostream_joiner(Stream &os, Iterator first, Iterator last, Separator sep, OutputElement output=OutputElement{})
Definition: SerializeSTL.h:35
FArray * fArray(const std::string &name, Int *item)
get the column
Definition: TupleObj.cpp:467
T size(T...args)
STL class.
T begin(T...args)
T back_inserter(T...args)
T any_of(T...args)
NTuple::Item< int > Int
basic type for int items
Definition: TupleObj.h:217
bool invalid() const
invalid pointer to tuple ?
Definition: TupleObj.h:2033
T transform(T...args)
const ItemMap & items() const
get the full list of booked items
Definition: TupleObj.h:2054
NTuple::Array< float > FArray
basic type for array of floats
Definition: TupleObj.h:238
STL class.
T reserve(T...args)
template<class FUNC1 , class FUNC2 , class Iterator >
StatusCode Tuples::TupleObj::farray ( const std::string name1,
const FUNC1 &  func1,
const std::string name2,
const FUNC2 &  func2,
Iterator &&  first,
Iterator &&  last,
const std::string length,
size_t  maxv 
)
inline

Put two functions from one data array into LoKi-style N-Tuple simultaneously (effective!)

std::vector<double> data = ... ;
Tuple tuple = ntuple( "My Ntuple" );
tuple->farray( "square_root" , // the first data item name
sqrt , // "func1" to be used
"sinus" , // the second data item name
sin , // "func2" to be used
data.begin () , // begin of data sequence
data.end () , // end of data sequence
"length" , // name of "length" tuple item
10000 ) ; // maximal array length
Parameters
name1the first tuple item name
func1the first function to be applied
name2the second tuple item name
func2the second function to be applied
firstbegin of data sequence
lastend of data sequence
lengthname of "length" tuple name
maxvmaximal length of the array
Returns
status code

Definition at line 1191 of file TupleObj.h.

1199  {
1200  return farray( { { name1, std::cref(func1) },
1201  { name2, std::cref(func2) } },
1202  std::forward<Iterator>(first), std::forward<Iterator>(last),
1203  length, maxv );
1204  }
StatusCode farray(const std::string &name, ITERATOR1 &&first, ITERATOR2 &&last, const std::string &length, size_t maxv)
Add an indexed array (of type float) to N-tuple.
Definition: TupleObj.h:925
T cref(T...args)
template<class FUNC1 , class FUNC2 , class FUNC3 , class Iterator >
StatusCode Tuples::TupleObj::farray ( const std::string name1,
const FUNC1 &  func1,
const std::string name2,
const FUNC2 &  func2,
const std::string name3,
const FUNC3 &  func3,
Iterator &&  first,
Iterator &&  last,
const std::string length,
size_t  maxv 
)
inline

Put three functions from one data array into LoKi-style N-Tuple simultaneously (effective!)

std::vector<double> data = ... ;
Tuple tuple = ntuple( "My Ntuple" );
tuple->farray( "square_root" , // the first data item name
sqrt , // "func1" to be used
"sinus" , // the second data item name
sin , // "func2" to be used
"tan" , // the third data item name
tan , // "func3" to be used
data.begin () , // begin of data sequence
data.end () , // end of data sequence
"length" , // name of "length" tuple item
10000 ) ; // maximal array length
Parameters
name1the first tuple item name
func1the first function to be applied
name2the second tuple item name
func2the second function to be applied
name3the third tuple item name
func3the third function to be applied
firstbegin of data sequence
lastend of data sequence
lengthname of "length" tuple name
maxvmaximal length of the array
Returns
status code

Definition at line 1243 of file TupleObj.h.

1253  {
1254  return farray( {{name1,std::cref(func1)},
1255  {name2,std::cref(func2)},
1256  {name3,std::cref(func3)}},
1257  std::forward<Iterator>(first), std::forward<Iterator>(last),
1258  length, maxv );
1259  }
StatusCode farray(const std::string &name, ITERATOR1 &&first, ITERATOR2 &&last, const std::string &length, size_t maxv)
Add an indexed array (of type float) to N-tuple.
Definition: TupleObj.h:925
T cref(T...args)
template<class FUNC1 , class FUNC2 , class FUNC3 , class FUNC4 , class Iterator >
StatusCode Tuples::TupleObj::farray ( const std::string name1,
const FUNC1 &  func1,
const std::string name2,
const FUNC2 &  func2,
const std::string name3,
const FUNC3 &  func3,
const std::string name4,
const FUNC4 &  func4,
Iterator &&  first,
Iterator &&  last,
const std::string length,
size_t  maxv 
)
inline

Put four functions from one data array into LoKi-style N-Tuple simultaneously (effective!)

std::vector<double> data = ... ;
Tuple tuple = ntuple( "My Ntuple" );
tuple->farray( "square_root" , // the first data item name
sqrt , // "func1" to be used
"sinus" , // the second data item name
sin , // "func2" to be used
"tan" , // the third data item name
tan , // "func3" to be used
"tanh" , //
tanh , //
data.begin () , // begin of data sequence
data.end () , // end of data sequence
"length" , // name of "length" tuple item
10000 ) ; // maximal array length
Parameters
name1the first tuple item name
func1the first function to be applied
name2the second tuple item name
func2the second function to be applied
name3the third tuple item name
func3the third function to be applied
name4the fourth tuple item name
func4the fourth function to be applied
firstbegin of data sequence
lastend of data sequence
lengthname of "length" tuple name
maxvmaximal length of the array
Returns
status code

Definition at line 1301 of file TupleObj.h.

1313  {
1314  return farray( {{name1,std::cref(func1)},
1315  {name2,std::cref(func2)},
1316  {name3,std::cref(func3)},
1317  {name4,std::cref(func4)}},
1318  std::forward<Iterator>(first), std::forward<Iterator>(last),
1319  length, maxv );
1320  }
StatusCode farray(const std::string &name, ITERATOR1 &&first, ITERATOR2 &&last, const std::string &length, size_t maxv)
Add an indexed array (of type float) to N-tuple.
Definition: TupleObj.h:925
T cref(T...args)
Tuples::TupleObj::FArray * Tuples::TupleObj::fArray ( const std::string name,
Int item 
)
private

get the column

Definition at line 467 of file TupleObj.cpp.

469 {
470  // existing array ?
471  auto found = m_farrays.find( name ) ;
472  if( m_farrays.end() != found ) { return found->second.get() ; }
473  return create_(this, m_farrays, name,
474  [&](const std::string& n, FArray& i)
475  { return this->tuple()->addIndexedItem(n,*length,i); });
476 }
const NTuple::Tuple * tuple() const
provide the access to underlying Gaudi N-tuple
Definition: TupleObj.h:1991
FArrays m_farrays
the actual storage of all &#39;FArray&#39; columns
Definition: TupleObj.h:2200
StatusCode addIndexedItem(const std::string &name, Item< INDEX > &index, Array< TYPE > &array, const RANGE low, const RANGE high)
Add an indexed Array of data to a column wise N tuple with a range.
Definition: NTuple.h:743
STL class.
iterator end()
Definition: Map.h:132
iterator find(const key_type &key)
Definition: Map.h:149
NTuple::Array< float > FArray
basic type for array of floats
Definition: TupleObj.h:238
Tuples::TupleObj::FArray * Tuples::TupleObj::fArray ( const std::string name,
const MIndex rows 
)
private

get the column

Definition at line 481 of file TupleObj.cpp.

483 {
484  // existing array ?
485  auto found = m_arraysf.find( name ) ;
486  if( m_arraysf.end() != found ) { return found->second.get() ; }
487  return create_(this, m_arraysf, name,
488  [&](const std::string& n, FArray& i)
489  { return this->tuple()->addItem(n,rows,i); });
490 }
const NTuple::Tuple * tuple() const
provide the access to underlying Gaudi N-tuple
Definition: TupleObj.h:1991
FArrays m_arraysf
the actual storage of all &#39;FArray&#39; columns (fixed)
Definition: TupleObj.h:2203
STL class.
iterator end()
Definition: Map.h:132
iterator find(const key_type &key)
Definition: Map.h:149
StatusCode addItem(const std::string &name, Item< TYPE > &itm)
Add a scalar data item a N tuple.
Definition: NTuple.h:554
NTuple::Array< float > FArray
basic type for array of floats
Definition: TupleObj.h:238
StatusCode Tuples::TupleObj::fill ( const char *  format...)

Set the values for several columns simultaneously.

Number of columns is arbitrary, but it should not be less than number of blank or comma separated tags in format string. Non-existing columns will be automatically created and appended to the ntuple.

double r1 , r2 , r3 , r4 , mass , length ;
tuple->fill( "var1 var2, radius rad4 mass len" ,
r1, r2, r3, r4, mass, length);
Warning
ALL columns are assumed to be of type double
Parameters
formatblank-separated list of variables, followed by variable number of arguments.
Attention
All variables are assumed to be double numbers
Author
Vanya Belyaev Ivan..nosp@m.Bely.nosp@m.aev@i.nosp@m.tep..nosp@m.ru
Date
2002-10-30

decode arguments

Definition at line 236 of file TupleObj.cpp.

237 {
238  // check the underlying tuple
239  if ( invalid() ) { return InvalidTuple ; }
240  // decode format string into tokens
241  auto tokens = tokenize( format , " ,;" );
243  va_list valist ;
244  va_start( valist , format ) ;
245  // loop over all tokens
247  for( auto token = tokens.cbegin() ;
248  tokens.cend() != token && status.isSuccess() ; ++token )
249  {
250  double val = va_arg( valist , double );
251  status = column( *token , val );
252  if( status.isFailure() )
253  { Error ( "fill(): Can not add column '" + *token + "' " ) ; }
254  }
255  // mandatory !!!
256  va_end( valist );
257  //
258  return status ;
259 }
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:121
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:74
StatusCode column(const std::string &name, float value)
Set the value for selected tuple column.
Definition: TupleObj.cpp:285
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:84
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
virtual StatusCode Error(const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const =0
bool invalid() const
invalid pointer to tuple ?
Definition: TupleObj.h:2033
template<class MATRIX >
StatusCode Tuples::TupleObj::fmatrix ( const std::string name,
const MATRIX &  data,
size_t  rows,
const MIndex cols,
const std::string length,
size_t  maxv 
)
inline

Fill N-Tuple with data from variable-size matrix.

"Matrix" could be of any type, which supports data[iRow][iCol] indexing, e.g.

  • std::vector<std::vector<TYPE> >
  • CLHEP::HepMatrix, etc...
typedef std::vector<Row> Mtrx ;
// number of columns (fixed!)
const size_t numCols = 5 ;
// maximal number of rows
const size_t maxRows = 300 ;
// number of rows (variable)
size_t numRows = .... ;
...
tuple -> fMatrix ( "mtrx" , // "column" name
mtrx , // matrix
numRows , // number of rows (variable!)
numCols , // number of columns (fixed)
"Length" , // name for "length" column
maxRows ) ; // maximal number of columns
CLHEP::HepMatrix mtrx = ... ;
...
tuple -> fMatrix ( "mtrx" , // "column" name
mtrx , // matrix
mtrx.num_row() , // number of rows (variable!)
mtrx.num_col() , // number of columns (fixed)
"Length" , // name for "length" column
maxRows ) ; // maximal number of columns
Parameters
nameentry name in N-Tuple
datamatrix itself
rowsnumber of rows of matrix (variable)
colsnumber of columns of matrix (fixed)
lengthentry name in NTuple for number of matrix column
maxvmaximal number of rows in matrix
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@l.nosp@m.app..nosp@m.in2p3.nosp@m..fr
Date
2005-05-01

fill the matrix

Definition at line 1375 of file TupleObj.h.

1381  {
1382  if ( invalid () ) { return InvalidTuple ; }
1383  if ( rowWise () ) { return InvalidOperation ; }
1384 
1385  // adjust the length
1386  if ( rows >= maxv )
1387  {
1388  Warning ( "fmatrix('"+name+"'): matrix is overflow, skip extra items").ignore() ;
1389  rows = ( 0 < maxv ) ? ( maxv - 1 ) : 0 ;
1390  }
1391 
1392  // get the length item
1393  Int* len = ints( length , 0 , maxv ) ;
1394  if ( !len ) { return InvalidColumn; }
1395 
1396  // adjust the length item
1397  *len = rows ;
1398 
1399  // get the array itself
1400  FMatrix* var = fMatrix ( name , len , cols ) ;
1401  if ( !var ) { return InvalidColumn ; }
1402 
1404  for ( size_t iCol = 0 ; iCol < cols ; ++iCol )
1405  {
1406  for ( MIndex iRow = 0 ; iRow < rows ; ++iRow )
1407  { (*var)[ iRow ] [ iCol ] = data[ iRow ][ iCol ] ; }
1408  }
1409 
1410  return StatusCode::SUCCESS ;
1411  }
Int * ints(const std::string &name, int minv, int maxv)
get the column
Definition: TupleObj.cpp:367
unsigned short MIndex
Definition: TupleObj.h:244
virtual StatusCode Warning(const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const =0
NTuple::Matrix< float > FMatrix
basic type for matrix of floats
Definition: TupleObj.h:241
bool rowWise() const
row wise NTuple ?
Definition: TupleObj.h:2024
NTuple::Item< int > Int
basic type for int items
Definition: TupleObj.h:217
FMatrix * fMatrix(const std::string &name, Int *item, const MIndex &cols)
get the column
Definition: TupleObj.cpp:496
bool invalid() const
invalid pointer to tuple ?
Definition: TupleObj.h:2033
void ignore() const
Definition: StatusCode.h:106
template<class DATA >
StatusCode Tuples::TupleObj::fmatrix ( const std::string name,
DATA  first,
DATA  last,
const MIndex cols,
const std::string length,
size_t  maxv 
)
inline

Fill N-Tuple with data from variable-size matrix.

"Matrix" could be of any type, which supports iteration from the first column to the last column and for each iterating column supports the indexing: (*first)[iCol]

typedef std::vector<Row> Mtrx ;
// number of rows (fixed!)
const size_t numRows = 5 ;
// maximal number of columns
const size_t maxCols = 300 ;
// number of columns (variable)
size_t numCols = .... ;
...
tuple -> fMatrix ( "mtrx" , // entry name
mtrx.begin() , // first row of matrix
mtrx.end () , // last row of matrix
numCols , // number of columns (fixed!)
"Length" , // name for "length" column
maxRows ) ; // maximal number of rows
Parameters
nameentry name in N-Tuple
firstiterator for the first row of matrix
lastiterator for the last row of matrix
colsnumber of columns for matrix (fixed!)
lengthentry name in NTuple for number of matrix column
maxvmaximal number of rows in matrix
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@l.nosp@m.app..nosp@m.in2p3.nosp@m..fr
Date
2005-05-01

fill the matrix

Definition at line 1450 of file TupleObj.h.

1456  {
1457  if ( invalid () ) { return InvalidTuple ; }
1458  if ( rowWise () ) { return InvalidOperation ; }
1459 
1460  // adjust the length
1461  if ( first + maxv < last )
1462  {
1463  Warning("fmatrix('"+name+"'): matrix is overflow, skip extra items").ignore() ;
1464  last = first + maxv ;
1465  }
1466 
1467  // get the length item
1468  Int* len = ints( length , 0 , maxv ) ;
1469  if ( !len ) { return InvalidColumn; }
1470 
1471  // adjust the length item
1472  *len = last - first ;
1473 
1474  // get the array itself
1475  FMatrix* var = fMatrix ( name , len , cols ) ;
1476  if ( !var ) { return InvalidColumn ; }
1477 
1479  size_t iRow = 0 ;
1480  for ( ; first != last ; ++first )
1481  {
1482  //
1483  for ( MIndex iCol = 0 ; iCol < cols ; ++iCol )
1484  { (*var)[ iRow ] [ iCol ] = (float)((*first)[ iCol ]) ; }
1485  //
1486  ++iRow ;
1487  }
1488 
1489  return StatusCode::SUCCESS ;
1490  }
Int * ints(const std::string &name, int minv, int maxv)
get the column
Definition: TupleObj.cpp:367
unsigned short MIndex
Definition: TupleObj.h:244
virtual StatusCode Warning(const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const =0
NTuple::Matrix< float > FMatrix
basic type for matrix of floats
Definition: TupleObj.h:241
bool rowWise() const
row wise NTuple ?
Definition: TupleObj.h:2024
NTuple::Item< int > Int
basic type for int items
Definition: TupleObj.h:217
FMatrix * fMatrix(const std::string &name, Int *item, const MIndex &cols)
get the column
Definition: TupleObj.cpp:496
bool invalid() const
invalid pointer to tuple ?
Definition: TupleObj.h:2033
void ignore() const
Definition: StatusCode.h:106
template<class FUN , class DATA >
StatusCode Tuples::TupleObj::fmatrix ( const std::string name,
FUN  funF,
FUN  funL,
DATA  first,
DATA  last,
const std::string length,
size_t  maxv 
)
inline

fill N-Tuple with matrix of "direct-product" of "data-vector" [first,last) and "function-vector" [funF, funL)

The elements of effective matrix are:

mtrx[iCol][iRow] = (*(funF+iRow))( *(first+iCol) )

Attention
The length of data-vector is variable, while the length of "function" vector is fixed!
Array array = ... ;
typedef double (*fun)( double ) ;
typedef std::vector<fun> Funs ;
Funs funs ;
funs.push_back( sin ) ;
funs.push_back( cos ) ;
funs.push_back( tan ) ;
funs.push_back( sinh ) ;
funs.push_back( cosh ) ;
funs.push_back( tanh ) ;
tuple->fmatrix ( "mtrx" , // N-Tuple entry name
funs.begin () , // begin of "function-vector"
funs.end () , // end of "function-vector"
array.begin () , // begin of "data-vector"
array.end () , // end of "data-vector"
"Length" ,
100 ) ;

This method is very convenient e.g. for using within LoKi:

typedef std::vector<Fun> VctFun ;
// sequence of Particles
Range particles = .... ;
// vector of functions:
VctFun funs ;
funs.push_back( E / GeV ) ;
funs.push_back( PX / GeV ) ;
funs.push_back( PY / GeV ) ;
funs.push_back( PZ / GeV ) ;
funs.push_back( PT / GeV ) ;
funs.push_back( M / GeV ) ;
funs.push_back( ID ) ;
// fill N-Tuple with information about each particle
tuple -> fmatrix ( "vars" ,
funs.begin () ,
funs.end () ,
particles.begin () ,
particles.end () ,
"nParts" ,
200 ) ;
Parameters
nameentry name in N-Tuple
funF"begin"-iterator for vector of functions
funL"end"-iterator for vector of functions
first"begin"-iterator for vector of data
last"end"-iterator for vector of data
lengthentry name in NTuple for number of matrix column
maxvmaximal number of rows in matrix
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@l.nosp@m.app..nosp@m.in2p3.nosp@m..fr
Date
2005-05-01

fill the matrix

Definition at line 1571 of file TupleObj.h.

1578  {
1579  if ( invalid () ) { return InvalidTuple ; }
1580  if ( rowWise () ) { return InvalidOperation ; }
1581 
1582  // adjust the length
1583  if ( std::distance(first,last) > static_cast<std::ptrdiff_t>(maxv) )
1584  {
1585  Warning("fmatrix('"+name+"'): matrix is overflow, skip extra items").ignore() ;
1586  last = std::next(first, maxv) ;
1587  }
1588 
1589  // get the length item
1590  Int* len = ints( length , 0 , maxv ) ;
1591  if ( !len ) { return InvalidColumn; }
1592 
1593  // adjust the length item
1594  *len = std::distance(first,last);
1595 
1596  // get the array itself
1597  auto cols = std::distance(funF,funL);
1598  FMatrix* var = fMatrix ( name , len , cols ) ;
1599  if ( !var ) { return InvalidColumn ; }
1600 
1602  size_t iRow = 0 ;
1603  for ( ; first != last ; ++first )
1604  {
1605  //
1606  for ( FUN fun = funF ; fun < funL ; ++fun )
1607  { (*var)[ iRow ] [ fun - funF ] = (*fun) ( *first ) ; }
1608  //
1609  ++iRow;
1610  }
1611 
1612  return StatusCode::SUCCESS ;
1613  }
Int * ints(const std::string &name, int minv, int maxv)
get the column
Definition: TupleObj.cpp:367
T distance(T...args)
virtual StatusCode Warning(const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const =0
T next(T...args)
NTuple::Matrix< float > FMatrix
basic type for matrix of floats
Definition: TupleObj.h:241
bool rowWise() const
row wise NTuple ?
Definition: TupleObj.h:2024
double fun(const std::vector< double > &x)
Definition: PFuncTest.cpp:26
NTuple::Item< int > Int
basic type for int items
Definition: TupleObj.h:217
FMatrix * fMatrix(const std::string &name, Int *item, const MIndex &cols)
get the column
Definition: TupleObj.cpp:496
bool invalid() const
invalid pointer to tuple ?
Definition: TupleObj.h:2033
void ignore() const
Definition: StatusCode.h:106
template<class KEY , class VALUE >
StatusCode Tuples::TupleObj::fmatrix ( const std::string name,
const GaudiUtils::VectorMap< KEY, VALUE > &  info,
const std::string length,
const size_t  maxv = 100 
)
inline

shortcut to put "ExtraInfo" fields of major into N-Tuple

const LHCb::Particle* B = ...
Tuple tuple = nTuple("My N-Tuple") ;
// put the vector into N-Tuple:
tuple -> fmatrix ( "Info" , B->extraInfo() , "nInfo" , 100 ) ;
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-11-26

Definition at line 1950 of file TupleObj.h.

1954  {
1955  using Info = std::pair<KEY,VALUE>;
1957  fns = { { [](const Info& i) { return i.first; } ,
1958  [](const Info& i) { return i.second; } } };
1959  return fmatrix( name,
1960  std::begin(fns), std::end(fns),
1961  std::begin(info), std::end(info),
1962  length,maxv );
1963  }
T end(T...args)
StatusCode fmatrix(const std::string &name, const MATRIX &data, size_t rows, const MIndex &cols, const std::string &length, size_t maxv)
Fill N-Tuple with data from variable-size matrix.
Definition: TupleObj.h:1375
T begin(T...args)
STL class.
Tuples::TupleObj::FMatrix * Tuples::TupleObj::fMatrix ( const std::string name,
Int item,
const MIndex cols 
)
private

get the column

Definition at line 496 of file TupleObj.cpp.

499 {
500  // existing array ?
501  auto found = m_fmatrices.find( name ) ;
502  if( m_fmatrices.end() != found ) { return found->second.get() ; }
503  return create_(this, m_fmatrices, name,
504  [&](const std::string& n, FMatrix& i)
505  { return this->tuple()->addIndexedItem(n,*length,cols,i); });
506 }
FMatrices m_fmatrices
the actual storage of all &#39;FArray&#39; columns
Definition: TupleObj.h:2206
const NTuple::Tuple * tuple() const
provide the access to underlying Gaudi N-tuple
Definition: TupleObj.h:1991
StatusCode addIndexedItem(const std::string &name, Item< INDEX > &index, Array< TYPE > &array, const RANGE low, const RANGE high)
Add an indexed Array of data to a column wise N tuple with a range.
Definition: NTuple.h:743
STL class.
iterator end()
Definition: Map.h:132
NTuple::Matrix< float > FMatrix
basic type for matrix of floats
Definition: TupleObj.h:241
iterator find(const key_type &key)
Definition: Map.h:149
Tuples::TupleObj::FMatrix * Tuples::TupleObj::fMatrix ( const std::string name,
const MIndex rows,
const MIndex cols 
)
private

get the column

Definition at line 512 of file TupleObj.cpp.

515 {
516  // existing array ?
517  auto found = m_matricesf.find( name ) ;
518  if( m_matricesf.end() != found ) { return found->second.get() ; }
519  return create_(this, m_matricesf, name,
520  [&](const std::string& n, FMatrix& i)
521  { return this->tuple()->addItem(n,rows,cols,i); });
522 }
const NTuple::Tuple * tuple() const
provide the access to underlying Gaudi N-tuple
Definition: TupleObj.h:1991
FMatrices m_matricesf
the actual storage of all &#39;FMatrix&#39; columns (fixed)
Definition: TupleObj.h:2209
STL class.
iterator end()
Definition: Map.h:132
NTuple::Matrix< float > FMatrix
basic type for matrix of floats
Definition: TupleObj.h:241
iterator find(const key_type &key)
Definition: Map.h:149
StatusCode addItem(const std::string &name, Item< TYPE > &itm)
Add a scalar data item a N tuple.
Definition: NTuple.h:554
bool Tuples::TupleObj::goodItem ( const std::string name) const
inline

check the uniqueness of the name

Parameters
namethe name of the item
Returns
true if the name is indeed unique

Definition at line 2050 of file TupleObj.h.

2051  { return m_items.end() == m_items.find ( name ) ; }
T end(T...args)
ItemMap m_items
all booked types:
Definition: TupleObj.h:2212
T find(T...args)
Tuples::TupleObj::Int * Tuples::TupleObj::ints ( const std::string name,
int  minv,
int  maxv 
)
private

get the column

Definition at line 367 of file TupleObj.cpp.

370 {
371  return find_or_create( this, name, m_ints, minv, maxv );
372 }
Ints m_ints
the actual storage of all &#39;Int&#39; columns
Definition: TupleObj.h:2179
bool Tuples::TupleObj::invalid ( ) const
inline

invalid pointer to tuple ?

Definition at line 2033 of file TupleObj.h.

2033 { return ! valid() ; }
bool valid() const
valid pointer to tuple ?
Definition: TupleObj.h:2030
const ItemMap& Tuples::TupleObj::items ( ) const
inline

get the full list of booked items

Definition at line 2054 of file TupleObj.h.

2054 { return m_items ; }
ItemMap m_items
all booked types:
Definition: TupleObj.h:2212
template<class MATRIX >
StatusCode Tuples::TupleObj::matrix ( const std::string name,
const MATRIX &  data,
const MIndex rows,
const MIndex cols 
)
inline

fill N-Tuple with fixed-size matrix

"MATRIX" must support indexing operations: data[iRow][iCol]

e.g it could be of type:

  • std::vector<std::vector<TYPE> >
  • CLHEP::HepMatrix , CLHEP::GenMatrix, etc ...
  • "TYPE"[n][m]

The content of MATRIX should be implicitly convertible to "float"

CLHEP::HepMatrix mtrx1(3,20) ;
...
tuple -> matrix ( "m1" ,
mtrx1 ,
mtrx1.num_row() ,
mtrx1.num_col() ) ;
typedef std:vector<Row> Mtrx ;
Mtrx mtrx2( 3 , Row(10) ) ;
...
tuple -> matrix ( "m2" ,
mtrx2 ,
3 ,
10 ) ;
float mtrx3[3][10] ;
...
tuple -> matrix ( "m3" ,
mtrx3 ,
3 ,
10 ) ;
Parameters
nameN-Tuple entry name
datadata source (matrix)
colsnumber of columns
rowsnumber of rows
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@l.nosp@m.app..nosp@m.in2p3.nosp@m..fr
Date
2005-05-01

fill the matrix

Definition at line 1801 of file TupleObj.h.

1805  {
1806  if ( invalid () ) { return InvalidTuple ; }
1807  if ( rowWise () ) { return InvalidOperation ; }
1808 
1809  // get the matrix itself
1810  FMatrix* var = fMatrix ( name , rows , cols ) ;
1811  if ( !var ) { return InvalidColumn ; }
1812 
1814  for ( size_t iCol = 0 ; iCol < cols ; ++iCol )
1815  {
1816  for ( size_t iRow = 0 ; iRow < rows ; ++iRow )
1817  { (*var)[iRow][iCol] = data[iRow][iCol]; }
1818  };
1819  return StatusCode::SUCCESS ;
1820  }
NTuple::Matrix< float > FMatrix
basic type for matrix of floats
Definition: TupleObj.h:241
bool rowWise() const
row wise NTuple ?
Definition: TupleObj.h:2024
FMatrix * fMatrix(const std::string &name, Int *item, const MIndex &cols)
get the column
Definition: TupleObj.cpp:496
bool invalid() const
invalid pointer to tuple ?
Definition: TupleObj.h:2033
template<class TYPE , unsigned int D1, unsigned int D2, class REP >
StatusCode Tuples::TupleObj::matrix ( const std::string name,
const ROOT::Math::SMatrix< TYPE, D1, D2, REP > &  mtrx 
)
inline

shortcut to put Smatrix into N-tuple:

Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-11-26

fill the matrix

Definition at line 1911 of file TupleObj.h.

1913  {
1914  if ( invalid () ) { return InvalidTuple ; }
1915  if ( rowWise () ) { return InvalidOperation ; }
1916 
1917  // get the matrix itself
1918  FMatrix* var = fMatrix ( name , (MIndex)D1 , (MIndex)D2 ) ;
1919  if ( !var ) { return InvalidColumn ; }
1920 
1922  for ( size_t iCol = 0 ; iCol < D2 ; ++iCol )
1923  {
1924  for ( size_t iRow = 0 ; iRow < D1 ; ++iRow )
1925  { (*var)[iRow][iCol] = mtrx(iRow,iCol) ; }
1926  };
1927 
1928  return StatusCode::SUCCESS ;
1929  }
unsigned short MIndex
Definition: TupleObj.h:244
NTuple::Matrix< float > FMatrix
basic type for matrix of floats
Definition: TupleObj.h:241
bool rowWise() const
row wise NTuple ?
Definition: TupleObj.h:2024
FMatrix * fMatrix(const std::string &name, Int *item, const MIndex &cols)
get the column
Definition: TupleObj.cpp:496
bool invalid() const
invalid pointer to tuple ?
Definition: TupleObj.h:2033
const std::string& Tuples::TupleObj::name ( ) const
inline

get the name

Definition at line 1986 of file TupleObj.h.

1986 { return m_name ; }
std::string m_name
name
Definition: TupleObj.h:2149
TupleObj& Tuples::TupleObj::operator= ( const TupleObj )
privatedelete
template<class TYPE >
StatusCode Tuples::TupleObj::put ( const std::string name,
const TYPE *  obj 
)
inline

The function allows to add almost arbitrary object into N-tuple.

Attention
it requires POOL persistency
Parameters
namecolumn name
objpointer to the object
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-04-08

Definition at line 124 of file TuplePut.h.

125 {
126  if ( invalid () ) { return InvalidTuple ; } // RETURN
127  if ( !evtColType () ) { return InvalidOperation ; } // RETURN
128 
129  // static block: The type description & the flag
130  static bool s_fail = false ; // STATIC
131  static TClass* s_type = nullptr; // STATIC
132  // check the status
133  if ( s_fail ) { return InvalidItem ; } // RETURN
134  else if ( !s_type )
135  {
136  s_type = TClass::GetClass(typeid(TYPE));
137  if ( !s_type )
138  {
139  s_fail = true ;
140  return Error ( " put('"+name+"'," + System::typeinfoName(typeid(TYPE)) +
141  ") :Invalid ROOT Type", InvalidItem ) ; // RETURN
142  }
143  }
144  // the local storage of items
145  static Tuples::ItemStore<TYPE*> s_map ;
146  // get the variable by name:
147  auto item = s_map.getItem ( name , this ) ;
148  if ( !item )
149  { return Error ( " put('" + name + "'): invalid item detected", InvalidItem ) ; }
150  // assign the item!
151  (*item) = const_cast<TYPE*> ( obj ) ; // THATS ALL!!
152  //
153  return StatusCode::SUCCESS ; // RETURN
154 }
bool evtColType() const
Event collection ?
Definition: TupleObj.h:2027
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:299
virtual StatusCode Error(const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const =0
bool invalid() const
invalid pointer to tuple ?
Definition: TupleObj.h:2033
Simple class, which represents the local storage of N-tuple items of the given type.
Definition: TuplePut.h:38
NTuple::Item< VALUE > * getItem(const std::string &key, Tuples::TupleObj *tuple)
the only one method:
Definition: TuplePut.h:49
unsigned long Tuples::TupleObj::refCount ( ) const
inline

return the reference counter

Returns
current reference counter

Definition at line 2001 of file TupleObj.h.

2001 { return m_refCount ; }
size_t m_refCount
reference counter
Definition: TupleObj.h:2161
void Tuples::TupleObj::release ( )

release the reference to TupleObj if reference counter becomes zero, object will be automatically deleted

Definition at line 192 of file TupleObj.cpp.

193 {
194  // decrease the reference counter
195  if( refCount() > 0 ) { --m_refCount; }
196  // check references -- delete if needed
197  if( 0 == refCount() ) delete this;
198 }
size_t m_refCount
reference counter
Definition: TupleObj.h:2161
unsigned long refCount() const
return the reference counter
Definition: TupleObj.h:2001
bool Tuples::TupleObj::rowWise ( ) const
inline

row wise NTuple ?

Definition at line 2024 of file TupleObj.h.

2024 { return CLID_RowWiseTuple == clid() ; }
const CLID & clid() const
accessor to the N-Tuple CLID
Definition: TupleObj.h:2015
const NTuple::Tuple* Tuples::TupleObj::tuple ( ) const
inline

provide the access to underlying Gaudi N-tuple

Returns
pointer to Gaudi N-tuple object

Definition at line 1991 of file TupleObj.h.

1991 { return m_tuple ; }
NTuple::Tuple * m_tuple
tuple itself
Definition: TupleObj.h:2152
NTuple::Tuple* Tuples::TupleObj::tuple ( )
inline

provide the access to underlying Gaudi N-tuple

Returns
pointer to Gaudi N-tuple object

Definition at line 1996 of file TupleObj.h.

1996 { return m_tuple ; }
NTuple::Tuple * m_tuple
tuple itself
Definition: TupleObj.h:2152
Tuples::Type Tuples::TupleObj::type ( ) const
inline

accessor to the N-Tuple type

Definition at line 2018 of file TupleObj.h.

2018 { return m_type ; }
Tuples::Type m_type
tuple &#39;type&#39;
Definition: TupleObj.h:2158
bool Tuples::TupleObj::valid ( ) const
inline

valid pointer to tuple ?

Definition at line 2030 of file TupleObj.h.

2030 { return 0 != tuple() ; }
const NTuple::Tuple * tuple() const
provide the access to underlying Gaudi N-tuple
Definition: TupleObj.h:1991
virtual StatusCode Tuples::TupleObj::Warning ( const std::string msg,
const StatusCode  sc = StatusCode::FAILURE 
) const
pure virtual
StatusCode Tuples::TupleObj::write ( )

write a record to NTuple

Returns
status code

Definition at line 202 of file TupleObj.cpp.

203 {
204  if ( invalid() ) { return InvalidTuple ; }
205  return tuple()->write() ;
206 }
virtual StatusCode write()=0
Write record of the NTuple (Shortcut of writeRecord)
const NTuple::Tuple * tuple() const
provide the access to underlying Gaudi N-tuple
Definition: TupleObj.h:1991
bool invalid() const
invalid pointer to tuple ?
Definition: TupleObj.h:2033

Member Data Documentation

Addresses Tuples::TupleObj::m_addresses
mutableprivate

the actual storage of all 'Address' columns

Definition at line 2197 of file TupleObj.h.

FArrays Tuples::TupleObj::m_arraysf
mutableprivate

the actual storage of all 'FArray' columns (fixed)

Definition at line 2203 of file TupleObj.h.

Bools Tuples::TupleObj::m_bools
mutableprivate

the actual storage of all 'bool' columns

Definition at line 2164 of file TupleObj.h.

Chars Tuples::TupleObj::m_chars
mutableprivate

the actual storage of all 'Int' columns

Definition at line 2167 of file TupleObj.h.

CLID Tuples::TupleObj::m_clid
private

tuple CLID

Definition at line 2155 of file TupleObj.h.

Doubles Tuples::TupleObj::m_doubles
mutableprivate

the actual storage of all 'Double' columns

Definition at line 2194 of file TupleObj.h.

FArrays Tuples::TupleObj::m_farrays
mutableprivate

the actual storage of all 'FArray' columns

Definition at line 2200 of file TupleObj.h.

Floats Tuples::TupleObj::m_floats
mutableprivate

the actual storage of all 'Float' columns

Definition at line 2191 of file TupleObj.h.

FMatrices Tuples::TupleObj::m_fmatrices
mutableprivate

the actual storage of all 'FArray' columns

Definition at line 2206 of file TupleObj.h.

Ints Tuples::TupleObj::m_ints
mutableprivate

the actual storage of all 'Int' columns

Definition at line 2179 of file TupleObj.h.

ItemMap Tuples::TupleObj::m_items
private

all booked types:

Definition at line 2212 of file TupleObj.h.

LongLongs Tuples::TupleObj::m_longlongs
mutableprivate

the actual storage of all 'longlong' columns

Definition at line 2185 of file TupleObj.h.

FMatrices Tuples::TupleObj::m_matricesf
mutableprivate

the actual storage of all 'FMatrix' columns (fixed)

Definition at line 2209 of file TupleObj.h.

std::string Tuples::TupleObj::m_name
private

name

Definition at line 2149 of file TupleObj.h.

size_t Tuples::TupleObj::m_refCount = 0
private

reference counter

Definition at line 2161 of file TupleObj.h.

Shorts Tuples::TupleObj::m_shorts
mutableprivate

the actual storage of all 'Int' columns

Definition at line 2173 of file TupleObj.h.

NTuple::Tuple* Tuples::TupleObj::m_tuple
private

tuple itself

Definition at line 2152 of file TupleObj.h.

Tuples::Type Tuples::TupleObj::m_type
private

tuple 'type'

Definition at line 2158 of file TupleObj.h.

UChars Tuples::TupleObj::m_uchars
mutableprivate

the actual storage of all 'unsigned int' columns

Definition at line 2170 of file TupleObj.h.

UInts Tuples::TupleObj::m_uints
mutableprivate

the actual storage of all 'unsigned int' columns

Definition at line 2182 of file TupleObj.h.

ULongLongs Tuples::TupleObj::m_ulonglongs
mutableprivate

the actual storage of all 'ulonglong' columns

Definition at line 2188 of file TupleObj.h.

UShorts Tuples::TupleObj::m_ushorts
mutableprivate

the actual storage of all 'unsigned int' columns

Definition at line 2176 of file TupleObj.h.


The documentation for this class was generated from the following files: