![]() |
The Gaudi Framework
v38r1p1 (ae26267b)
|
A simple wrapper class over standard Gaudi NTuple::Tuple facility. More...
#include <GaudiAlg/TupleObj.h>
Classes | |
class | ColumnStorage |
Public Types | |
using | Bool = NTuple::Item< bool > |
basics type for various items More... | |
using | Char = NTuple::Item< char > |
using | UChar = NTuple::Item< unsigned char > |
using | Short = NTuple::Item< short > |
using | UShort = NTuple::Item< unsigned short > |
using | Int = NTuple::Item< int > |
using | UInt = NTuple::Item< unsigned int > |
using | LongLong = NTuple::Item< long long > |
using | ULongLong = NTuple::Item< unsigned long long > |
using | Float = NTuple::Item< float > |
using | Double = NTuple::Item< double > |
using | Address = NTuple::Item< IOpaqueAddress * > |
using | FArray = NTuple::Array< float > |
using | FMatrix = NTuple::Matrix< float > |
typedef unsigned short | MIndex |
typedef std::map< std::string, std::string, std::less<> > | ItemMap |
Public Member Functions | |
virtual | ~TupleObj () |
StatusCode | column (std::string_view name, float value) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view 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 (std::string_view name, short value) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view name, short value, short minv, short maxv) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view name, unsigned short value) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view name, unsigned short value, unsigned short minv, unsigned short maxv) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view name, char value) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view name, char value, char minv, char maxv) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view name, unsigned char value) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view name, unsigned char value, unsigned char minv, unsigned char maxv) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view name, int value) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view name, int value, int minv, int maxv) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view name, unsigned int value) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view name, unsigned int value, unsigned int minv, unsigned int maxv) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view name, long value) |
Set the value for the selected tuple column. More... | |
StatusCode | column (std::string_view name, long value, long minv, long maxv) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view name, unsigned long value) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view name, unsigned long value, unsigned long minv, unsigned long maxv) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view name, long long value) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view name, long long value, long long minv, long long maxv) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view name, unsigned long long value) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view name, unsigned long long value, unsigned long long minv, unsigned long long maxv) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view name, signed char value) |
Set the value for the selected tuple column. More... | |
StatusCode | column (std::string_view name, bool value) |
Set the value for selected tuple column. More... | |
StatusCode | column (std::string_view 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) |
Set the values for several columns simultaneously, for the same object Non-existing columns will be automatically created and appended to the ntuple. More... | |
template<typename Arg , typename... Args> | |
StatusCode | fill (std::string_view fmt, Arg arg, Args... args) |
Set the values for several columns simultaneously. More... | |
template<typename ITERATOR1 , typename ITERATOR2 > | |
StatusCode | farray (std::string_view name, ITERATOR1 &&first, ITERATOR2 &&last, std::string_view length, size_t maxv) |
Add an indexed array (of type float) to N-tuple. More... | |
template<class DATA > | |
StatusCode | farray (std::string_view name, const DATA &data, std::string_view length, const size_t maxv) |
Add an indexed array (of type float) to N-tuple. More... | |
template<class FUNCTION , class ITERATOR > | |
StatusCode | farray (std::string_view name, const FUNCTION &function, ITERATOR first, ITERATOR last, std::string_view length, size_t maxv) |
Put an indexed array into LoKi-style N-Tuple. More... | |
template<typename FunIterator , typename DataIterator > | |
StatusCode | farray_impl (FunIterator first_item, FunIterator last_item, DataIterator first, DataIterator last, std::string_view length, size_t maxv) |
Put arbitrary number of functions from one data array into LoKi-style N-Tuple simultaneously (effective!) More... | |
template<typename DataIterator , template< typename, typename... > class Container = std::initializer_list, typename NamedFunction = std::pair<std::string_view, std::function<float( detail::const_ref_t<DataIterator> )>, typename = std::enable_if_t<!std::is_convertible_v<Container<NamedFunction>, std::string_view>>> | |
StatusCode | farray (const Container< NamedFunction > &funs, DataIterator first, DataIterator last, std::string_view length, size_t maxv) |
template<typename NamedFunctions , typename DataIterator , typename = std::enable_if_t<!std::is_convertible_v<NamedFunctions, std::string_view>>> | |
StatusCode | farray (const NamedFunctions &funs, DataIterator first, DataIterator last, std::string_view length, size_t maxv) |
template<class FUNC1 , class FUNC2 , class Iterator > | |
StatusCode | farray (std::string_view name1, const FUNC1 &func1, std::string_view name2, const FUNC2 &func2, Iterator &&first, Iterator &&last, std::string_view 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 (std::string_view name1, const FUNC1 &func1, std::string_view name2, const FUNC2 &func2, std::string_view name3, const FUNC3 &func3, Iterator &&first, Iterator &&last, std::string_view 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 (std::string_view name1, const FUNC1 &func1, std::string_view name2, const FUNC2 &func2, std::string_view name3, const FUNC3 &func3, std::string_view name4, const FUNC4 &func4, Iterator &&first, Iterator &&last, std::string_view length, size_t maxv) |
Put four functions from one data array into LoKi-style N-Tuple simultaneously (effective!) More... | |
template<class MATRIX > | |
StatusCode | fmatrix (std::string_view name, const MATRIX &data, size_t rows, const MIndex &cols, std::string_view length, size_t maxv) |
Fill N-Tuple with data from variable-size matrix. More... | |
template<class DATA > | |
StatusCode | fmatrix (std::string_view name, DATA first, DATA last, const MIndex &cols, std::string_view length, size_t maxv) |
Fill N-Tuple with data from variable-size matrix. More... | |
template<class FUN , class DATA > | |
StatusCode | fmatrix (std::string_view name, FUN funF, FUN funL, DATA first, DATA last, std::string_view 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 (std::string_view name, DATA first, DATA last) |
fill N-Tuple with fixed-size array More... | |
template<class ARRAY > | |
StatusCode | array (std::string_view name, const ARRAY &data, const MIndex &length) |
fill N-Tuple with fixed-size array More... | |
template<class ARRAY > | |
StatusCode | array (std::string_view name, const ARRAY &data) |
fill N-Tuple with fixed-size array More... | |
template<class MATRIX > | |
StatusCode | matrix (std::string_view name, const MATRIX &data, const MIndex &rows, const MIndex &cols) |
fill N-Tuple with fixed-size matrix More... | |
template<class TYPE > | |
StatusCode | column (std::string_view name, const ROOT::Math::LorentzVector< TYPE > &v) |
Useful shortcut to put LorentzVector directly into N-Tuple: More... | |
template<class TYPE , class TAG > | |
StatusCode | column (std::string_view 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 (std::string_view 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 (std::string_view 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 (std::string_view name, const GaudiUtils::VectorMap< KEY, VALUE > &info, std::string_view length, const size_t maxv=100) |
shortcut to put "ExtraInfo" fields of major into N-Tuple More... | |
template<class TYPE > | |
StatusCode | put (std::string_view 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::string & | name () const |
get the name More... | |
const NTuple::Tuple * | tuple () const |
provide the access to underlying Gaudi N-tuple More... | |
NTuple::Tuple * | tuple () |
provide the access to underlying Gaudi N-tuple More... | |
const CLID & | clid () 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 (std::string_view name) const |
check the uniqueness of the name More... | |
const ItemMap & | items () 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... | |
Private Member Functions | |
Int * | ints (std::string_view name, int minv, int maxv) |
get the column More... | |
FArray * | fArray (std::string_view name, Int *item) |
get the column More... | |
FArray * | fArray (std::string_view name, const MIndex &rows) |
get the column More... | |
Address * | addresses (std::string_view name) |
get the column More... | |
FMatrix * | fMatrix (std::string_view name, Int *item, const MIndex &cols) |
get the column More... | |
FMatrix * | fMatrix (std::string_view name, const MIndex &rows, const MIndex &cols) |
get the column More... | |
TupleObj (const TupleObj &)=delete | |
delete the copy constructor and assignment More... | |
TupleObj & | operator= (const TupleObj &)=delete |
Private Attributes | |
std::string | m_name |
name More... | |
NTuple::Tuple * | m_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... | |
ColumnStorage< Bool > | m_bools |
the actual storage of all 'bool' columns More... | |
ColumnStorage< Char > | m_chars |
the actual storage of all 'Int' columns More... | |
ColumnStorage< UChar > | m_uchars |
the actual storage of all 'unsigned int' columns More... | |
ColumnStorage< Short > | m_shorts |
the actual storage of all 'Int' columns More... | |
ColumnStorage< UShort > | m_ushorts |
the actual storage of all 'unsigned int' columns More... | |
ColumnStorage< Int > | m_ints |
the actual storage of all 'Int' columns More... | |
ColumnStorage< UInt > | m_uints |
the actual storage of all 'unsigned int' columns More... | |
ColumnStorage< LongLong > | m_longlongs |
the actual storage of all 'long long' columns More... | |
ColumnStorage< ULongLong > | m_ulonglongs |
the actual storage of all 'unsigned long long' columns More... | |
ColumnStorage< Float > | m_floats |
the actual storage of all 'Float' columns More... | |
ColumnStorage< Double > | m_doubles |
the actual storage of all 'Double' columns More... | |
ColumnStorage< Address > | m_addresses |
the actual storage of all 'Address' columns More... | |
ColumnStorage< FArray > | m_farrays |
the actual storage of all 'FArray' columns More... | |
ColumnStorage< FArray > | m_arraysf |
the actual storage of all 'FArray' columns (fixed) More... | |
ColumnStorage< FMatrix > | m_fmatrices |
the actual storage of all 'FArray' columns More... | |
ColumnStorage< FMatrix > | m_matricesf |
the actual storage of all 'FMatrix' columns (fixed) More... | |
ItemMap | m_items |
all booked types: More... | |
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
NTuple::Tuple
object using INTupleSvc
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:
One could fill some Tuple variables in one go
Even ALL variables could be filled in one go:
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'
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
)Definition at line 211 of file TupleObj.h.
Definition at line 226 of file TupleObj.h.
using Tuples::TupleObj::Bool = NTuple::Item<bool> |
basics type for various items
Definition at line 215 of file TupleObj.h.
using Tuples::TupleObj::Char = NTuple::Item<char> |
Definition at line 216 of file TupleObj.h.
using Tuples::TupleObj::Double = NTuple::Item<double> |
Definition at line 225 of file TupleObj.h.
using Tuples::TupleObj::FArray = NTuple::Array<float> |
Definition at line 227 of file TupleObj.h.
using Tuples::TupleObj::Float = NTuple::Item<float> |
Definition at line 224 of file TupleObj.h.
using Tuples::TupleObj::FMatrix = NTuple::Matrix<float> |
Definition at line 228 of file TupleObj.h.
using Tuples::TupleObj::Int = NTuple::Item<int> |
Definition at line 220 of file TupleObj.h.
typedef std::map<std::string, std::string, std::less<> > Tuples::TupleObj::ItemMap |
Definition at line 234 of file TupleObj.h.
using Tuples::TupleObj::LongLong = NTuple::Item<long long> |
Definition at line 222 of file TupleObj.h.
typedef unsigned short Tuples::TupleObj::MIndex |
Definition at line 231 of file TupleObj.h.
using Tuples::TupleObj::Short = NTuple::Item<short> |
Definition at line 218 of file TupleObj.h.
using Tuples::TupleObj::UChar = NTuple::Item<unsigned char> |
Definition at line 217 of file TupleObj.h.
using Tuples::TupleObj::UInt = NTuple::Item<unsigned int> |
Definition at line 221 of file TupleObj.h.
using Tuples::TupleObj::ULongLong = NTuple::Item<unsigned long long> |
Definition at line 223 of file TupleObj.h.
using Tuples::TupleObj::UShort = NTuple::Item<unsigned short> |
Definition at line 219 of file TupleObj.h.
|
protected |
Standard constructor.
name | name of the object |
tuple | pointer to standard Gaudi NTuple::Tuple object |
clid | CLID_ColumnWiseTuple or CLID_RowWiseTuple |
type | the type of the tuple |
Definition at line 229 of file TupleObj.cpp.
|
virtual |
Definition at line 238 of file TupleObj.cpp.
|
privatedelete |
delete the copy constructor and assignment
|
inline |
|
private |
get the column
|
inline |
fill N-Tuple with fixed-size array
"ARRAY" is any sequence, which supports ARRAY::begin() and ARRAY::end() protocol, e.g.
The content of array should be implicitly convertible to "float"
name | N-Tupel entry name |
data | data sequence |
Definition at line 1642 of file TupleObj.h.
|
inline |
fill N-Tuple with fixed-size array
"ARRAY" must support indexing operations: e.g it coudl be of type:
The content of array should be implicitly convertible to "float"
name | N-Tuple entry name |
data | data sequence |
length | data length (fixed!) |
Definition at line 1602 of file TupleObj.h.
|
inline |
fill N-Tuple with fixed-size array
Sequence may be of any objects, implicitly convertible into "float"
name | N-Tuple entry name |
first | begin-iterator for data sequence |
last | end-iterator for data sequence |
fill the array
Definition at line 1544 of file TupleObj.h.
|
inline |
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"
address | IOpaqueAddress |
Definition at line 264 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | the name of the column |
value | the value of the variable |
Definition at line 377 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | the name of the column |
value | the value of the variable |
Definition at line 275 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | name of the column |
value | value of the variable |
minv | minimum value of the variable |
maxv | maximum value of the variable |
Definition at line 279 of file TupleObj.cpp.
|
inline |
Useful shortcut to put 3D-Vector directly into N-Tuple:
Definition at line 1757 of file TupleObj.h.
|
inline |
Useful shortcut to put LorentzVector directly into N-Tuple:
Definition at line 1733 of file TupleObj.h.
|
inline |
Useful shortcut to put 3D-Vector directly into N-Tuple:
Definition at line 1780 of file TupleObj.h.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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.
name | the name of the column |
value | the value of the variable |
Definition at line 271 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | the name of the column |
value | the value of the variable |
Definition at line 267 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | name of the column |
value | value of the variable |
Definition at line 309 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | name of the column |
value | value of the variable |
minv | minimum value of the variable |
maxv | maximum value of the variable |
Definition at line 311 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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.
name | name of the column ("Address" is a recommended convention!) |
address | IOpaqueAddress |
Definition at line 254 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | name of the column |
value | value of the variable |
Definition at line 360 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | name of the column |
value | value of the variable |
minv | minimum value of the variable |
maxv | maximum value of the variable |
Definition at line 364 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | the name of the column |
value | the value of the variable |
Definition at line 327 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | name of the column |
value | value of the variable |
minv | minimum value of the variable |
maxv | maximum value of the variable |
Definition at line 334 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | the name of the column |
value | the value of the variable |
Definition at line 292 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | name of the column |
value | value of the variable |
minv | minimum value of the variable |
maxv | maximum value of the variable |
Definition at line 296 of file TupleObj.cpp.
|
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
name | the name of the column |
value | the value of tve variable |
Definition at line 689 of file TupleObj.h.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | the name of the column |
value | the value of the variable |
Definition at line 283 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | name of the column |
value | value of the variable |
minv | minimum value of the variable |
maxv | maximum value of the variable |
Definition at line 287 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | name of the column |
value | value of the variable |
Definition at line 319 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | name of the column |
value | value of the variable |
minv | minimum value of the variable |
maxv | maximum value of the variable |
Definition at line 323 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | name of the column |
value | value of the variable |
Definition at line 368 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | name of the column |
value | value of the variable |
minv | minimum value of the variable |
maxv | maximum value of the variable |
Definition at line 372 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | the name of the column |
value | the value of the variable |
Definition at line 342 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | name of the column |
value | value of the variable |
minv | minimum value of the variable |
maxv | maximum value of the variable |
Definition at line 350 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | the name of the column |
value | the value of the variable |
Definition at line 300 of file TupleObj.cpp.
StatusCode Tuples::TupleObj::column | ( | std::string_view | 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
name | name of the column |
value | value of the variable |
minv | minimum value of the variable |
maxv | maximum value of the variable |
Definition at line 304 of file TupleObj.cpp.
|
inline |
Set the values for several columns simultaneously, for the same object Non-existing columns will be automatically created and appended to the ntuple.
Gaudi::XYZPoint::X()
Definition at line 773 of file TupleObj.h.
|
inline |
|
pure virtual |
Implemented in Tuples::detail::TupleObjImp< HANDLER1, HANDLER2 >.
|
inline |
|
inline |
Definition at line 1104 of file TupleObj.h.
|
inline |
Definition at line 1112 of file TupleObj.h.
|
inline |
Add an indexed array (of type float) to N-tuple.
it is just a small adaptor for the previous method
The name of "length" item can be reused for several arrays. The last assignment "wins"
Any sequence which provides begin()
and end()
methods can be used.
name | name of N-tuple item |
data | data sequence |
length | name of "length" item |
maxv | maximal length of array |
Definition at line 935 of file TupleObj.h.
|
inline |
Put an indexed array into LoKi-style N-Tuple.
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
name | tuple item name |
function | function to be applied |
first | begin of data sequence |
last | end of data sequence |
length | name of "length" tuple name |
maxv | maximal length of the array |
Definition at line 1002 of file TupleObj.h.
|
private |
get the column
Definition at line 394 of file TupleObj.cpp.
|
private |
get the column
Definition at line 383 of file TupleObj.cpp.
|
inline |
Add an indexed array (of type float) to N-tuple.
The method is not VERY efficient since it copies the data.
The name of "length" item can be reused for several arrays. The last assignement "wins"
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
name | name of N-tuple item |
first | begin of data sequence |
last | end of data sequence |
length | name of "length" item |
maxv | maximal length of array |
Definition at line 886 of file TupleObj.h.
|
inline |
Put two functions from one data array into LoKi-style N-Tuple simultaneously (effective!)
name1 | the first tuple item name |
func1 | the first function to be applied |
name2 | the second tuple item name |
func2 | the second function to be applied |
first | begin of data sequence |
last | end of data sequence |
length | name of "length" tuple name |
maxv | maximal length of the array |
Definition at line 1150 of file TupleObj.h.
|
inline |
Put three functions from one data array into LoKi-style N-Tuple simultaneously (effective!)
name1 | the first tuple item name |
func1 | the first function to be applied |
name2 | the second tuple item name |
func2 | the second function to be applied |
name3 | the third tuple item name |
func3 | the third function to be applied |
first | begin of data sequence |
last | end of data sequence |
length | name of "length" tuple name |
maxv | maximal length of the array |
Definition at line 1193 of file TupleObj.h.
|
inline |
Put four functions from one data array into LoKi-style N-Tuple simultaneously (effective!)
name1 | the first tuple item name |
func1 | the first function to be applied |
name2 | the second tuple item name |
func2 | the second function to be applied |
name3 | the third tuple item name |
func3 | the third function to be applied |
name4 | the fourth tuple item name |
func4 | the fourth function to be applied |
first | begin of data sequence |
last | end of data sequence |
length | name of "length" tuple name |
maxv | maximal length of the array |
Definition at line 1240 of file TupleObj.h.
|
inline |
Put arbitrary number of functions from one data array into LoKi-style N-Tuple simultaneously (effective!)
items | vector of pairs { name, callable } |
first | begin of data sequence |
last | end of data sequence |
length | name of "length" tuple name |
maxv | maximal length of the array |
Definition at line 1060 of file TupleObj.h.
|
inline |
Set the values for several columns simultaneously.
Number of columns is arbitrary, but it should match the number of blank, or comma, or semi-column separated tags in format
string. Non-existing columns will be automatically created and appended to the ntuple.
format | blank-separated list of variables, followed by variable number of arguments. |
Definition at line 807 of file TupleObj.h.
|
inline |
shortcut to put "ExtraInfo" fields of major into N-Tuple
Definition at line 1829 of file TupleObj.h.
|
inline |
Fill N-Tuple with data from variable-size matrix.
"Matrix" could be of any type, which supports data[iRow][iCol] indexing, e.g.
name | entry name in N-Tuple |
data | matrix itself |
rows | number of rows of matrix (variable) |
cols | number of columns of matrix (fixed) |
length | entry name in NTuple for number of matrix column |
maxv | maximal number of rows in matrix |
fill the matrix
Definition at line 1303 of file TupleObj.h.
|
private |
|
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]
name | entry name in N-Tuple |
first | iterator for the first row of matrix |
last | iterator for the last row of matrix |
cols | number of columns for matrix (fixed!) |
length | entry name in NTuple for number of matrix column |
maxv | maximal number of rows in matrix |
fill the matrix
Definition at line 1370 of file TupleObj.h.
|
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) )
This method is very convenient e.g. for using within LoKi:
name | entry 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 |
length | entry name in NTuple for number of matrix column |
maxv | maximal number of rows in matrix |
fill the matrix
Definition at line 1483 of file TupleObj.h.
|
private |
|
inline |
|
private |
get the column
Definition at line 315 of file TupleObj.cpp.
|
inline |
|
inline |
|
inline |
fill N-Tuple with fixed-size matrix
"MATRIX" must support indexing operations: data[iRow][iCol]
e.g it could be of type:
The content of MATRIX should be implicitly convertible to "float"
name | N-Tuple entry name |
data | data source (matrix) |
cols | number of columns |
rows | number of rows |
fill the matrix
Definition at line 1699 of file TupleObj.h.
|
inline |
shortcut to put Smatrix into N-tuple:
fill the matrix
Definition at line 1795 of file TupleObj.h.
|
inline |
StatusCode Tuples::TupleObj::put | ( | std::string_view | name, |
const TYPE * | obj | ||
) |
The function allows to add almost arbitrary object into N-tuple.
name | column name |
obj | pointer to the object |
Definition at line 117 of file TuplePut.h.
|
inline |
|
inline |
provide the access to underlying Gaudi N-tuple
Definition at line 1867 of file TupleObj.h.
|
inline |
provide the access to underlying Gaudi N-tuple
Definition at line 1862 of file TupleObj.h.
|
inline |
|
inline |
|
pure virtual |
Implemented in Tuples::detail::TupleObjImp< HANDLER1, HANDLER2 >.
StatusCode Tuples::TupleObj::write | ( | ) |
|
mutableprivate |
the actual storage of all 'Address' columns
Definition at line 2016 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'FArray' columns (fixed)
Definition at line 2022 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'bool' columns
Definition at line 1983 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'Int' columns
Definition at line 1986 of file TupleObj.h.
|
private |
tuple CLID
Definition at line 1949 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'Double' columns
Definition at line 2013 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'FArray' columns
Definition at line 2019 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'Float' columns
Definition at line 2010 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'FArray' columns
Definition at line 2025 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'Int' columns
Definition at line 1998 of file TupleObj.h.
|
private |
all booked types:
Definition at line 2031 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'long long' columns
Definition at line 2004 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'FMatrix' columns (fixed)
Definition at line 2028 of file TupleObj.h.
|
private |
name
Definition at line 1943 of file TupleObj.h.
|
private |
reference counter
Definition at line 1955 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'Int' columns
Definition at line 1992 of file TupleObj.h.
|
private |
tuple itself
Definition at line 1946 of file TupleObj.h.
|
private |
tuple 'type'
Definition at line 1952 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'unsigned int' columns
Definition at line 1989 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'unsigned int' columns
Definition at line 2001 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'unsigned long long' columns
Definition at line 2007 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'unsigned int' columns
Definition at line 1995 of file TupleObj.h.