|
Gaudi Framework, version v25r0 |
| Home | Generated: Mon Feb 17 2014 |
A simple wrapper class over standard Gaudi NTuple::Tuple facility. More...
#include <GaudiAlg/TupleObj.h>


Public Types | |
| typedef NTuple::Item< bool > | Bool |
| basic type for int items | |
| typedef NTuple::Item< char > | Char |
| basic type for int items | |
| typedef NTuple::Item< unsigned char > | UChar |
| basic type for unsigned int items | |
| typedef NTuple::Item< short > | Short |
| basic type for int items | |
| typedef NTuple::Item< unsigned short > | UShort |
| basic type for unsigned int items | |
| typedef NTuple::Item< int > | Int |
| basic type for int items | |
| typedef NTuple::Item< unsigned int > | UInt |
| basic type for unsigned int items | |
| typedef NTuple::Item< long long > | LongLong |
| basic type for unsigned long long items | |
| typedef NTuple::Item< unsigned long long > | ULongLong |
| basic type for unsigned long long items | |
| typedef NTuple::Item< float > | Float |
| basic type for float items | |
| typedef NTuple::Item< double > | Double |
| basic type for double items | |
| typedef NTuple::Item < IOpaqueAddress * > | Address |
| basic type for address items | |
| typedef NTuple::Array< float > | FArray |
| basic type for array of floats | |
| typedef NTuple::Matrix< float > | FMatrix |
| basic type for matrix of floats | |
| typedef unsigned short | MIndex |
| typedef std::map< std::string, std::string > | ItemMap |
Public Member Functions | |
| StatusCode | column (const std::string &name, const float value) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, const 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. | |
| StatusCode | column (const std::string &name, const short value) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, const short value, const short minv, const short maxv) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, const unsigned short value) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, const unsigned short value, const unsigned short minv, const unsigned short maxv) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, const char value) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, const char value, const char minv, const char maxv) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, const unsigned char value) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, const unsigned char value, const unsigned char minv, const unsigned char maxv) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, const int value) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, const int value, const int minv, const int maxv) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, const unsigned int value) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, const unsigned int value, const unsigned int minv, const unsigned int maxv) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, const long value) |
| Set the value for the selected tuple column. | |
| StatusCode | column (const std::string &name, const long value, const long minv, const long maxv) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, const unsigned long value) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, const unsigned long value, const unsigned long minv, const unsigned long maxv) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, const long long value) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, const long long value, const long long minv, const long long maxv) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, const unsigned long long value) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, const unsigned long long value, const unsigned long long minv, const unsigned long long maxv) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, const signed char value) |
| Set the value for the selected tuple column. | |
| StatusCode | column (const std::string &name, const bool value) |
| Set the value for selected tuple column. | |
| StatusCode | column (const std::string &name, IOpaqueAddress *address) |
| Put IOpaqueAddress in POOL-based NTuple. | |
| StatusCode | column (IOpaqueAddress *address) |
| Put IOpaqueAddress in NTuple. | |
| StatusCode | fill (const char *format...) |
| Set the values for several columns simultaneously. | |
| template<class DATA > | |
| StatusCode | farray (const std::string &name, DATA first, DATA last, const std::string &length, const size_t maxv) |
| Add an indexed array (of type float) to N-tuple. | |
| 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. | |
| template<class FUNCTION , class DATA > | |
| StatusCode | farray (const std::string &name, const FUNCTION &function, DATA first, DATA last, const std::string &length, const size_t maxv) |
| Put an indexed array into LoKi-style N-Tuple. | |
| template<class FUNC1 , class FUNC2 , class DATA > | |
| StatusCode | farray (const std::string &name1, const FUNC1 &func1, const std::string &name2, const FUNC2 &func2, DATA first, DATA last, const std::string &length, const size_t maxv) |
| Put two functions from one data array into LoKi-style N-Tuple simultaneously (effective!) | |
| template<class FUNC1 , class FUNC2 , class FUNC3 , class DATA > | |
| StatusCode | farray (const std::string &name1, const FUNC1 &func1, const std::string &name2, const FUNC2 &func2, const std::string &name3, const FUNC3 &func3, DATA first, DATA last, const std::string &length, const size_t maxv) |
| Put three functions from one data array into LoKi-style N-Tuple simultaneously (effective!) | |
| template<class FUNC1 , class FUNC2 , class FUNC3 , class FUNC4 , class DATA > | |
| 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, DATA first, DATA last, const std::string &length, const size_t maxv) |
| Put four functions from one data array into LoKi-style N-Tuple simultaneously (effective!) | |
| template<class MATRIX > | |
| StatusCode | fmatrix (const std::string &name, const MATRIX &data, size_t rows, const MIndex &cols, const std::string &length, const size_t maxv) |
| Fill N-Tuple with data from variable-size matrix. | |
| template<class DATA > | |
| StatusCode | fmatrix (const std::string &name, DATA first, DATA last, const MIndex &cols, const std::string &length, const size_t maxv) |
| Fill N-Tuple with data from variable-size matrix. | |
| template<class FUN , class DATA > | |
| StatusCode | fmatrix (const std::string &name, FUN funF, FUN funL, DATA first, DATA last, const std::string &length, const size_t maxv) |
| fill N-Tuple with matrix of "direct-product" of "data-vector" [first,last) and "function-vector" [funF, funL) | |
| template<class DATA > | |
| StatusCode | array (const std::string &name, DATA first, DATA last) |
| fill N-Tuple with fixed-size array | |
| template<class ARRAY > | |
| StatusCode | array (const std::string &name, const ARRAY &data, const MIndex &length) |
| fill N-Tuple with fixed-size array | |
| template<class ARRAY > | |
| StatusCode | array (const std::string &name, const ARRAY &data) |
| fill N-Tuple with fixed-size array | |
| 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 | |
| template<class TYPE > | |
| StatusCode | column (const std::string &name, const ROOT::Math::LorentzVector< TYPE > &v) |
| Useful shortcut to put LorentzVector directly into N-Tuple: | |
| 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: | |
| 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: | |
| template<class TYPE , unsigned int DIM> | |
| StatusCode | array (const std::string &name, const ROOT::Math::SVector< TYPE, DIM > &vect) |
| shortcut to put SVector into N-tuple: | |
| 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: | |
| 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 | |
| template<class TYPE > | |
| StatusCode | put (const std::string &name, const TYPE *obj) |
| The function allows to add almost arbitrary object into N-tuple. | |
| StatusCode | write () |
| write a record to NTuple | |
| const std::string & | name () const |
| get the name | |
| NTuple::Tuple * | tuple () const |
| provide the access to underlying Gaudi N-tuple | |
| unsigned long | refCount () const |
| return the reference counter | |
| unsigned long | addRef () |
| add the reference to TupleObj | |
| void | release () |
| release the reference to TupleObj if reference counter becomes zero, object will be automatically deleted | |
| const CLID & | clid () const |
| accessor to the N-Tuple CLID | |
| Tuples::Type | type () const |
| accessor to the N-Tuple type | |
| bool | columnWise () const |
| column wise NTuple ? | |
| bool | rowWise () const |
| row wise NTuple ? | |
| bool | evtColType () const |
| Event collection ? | |
| bool | valid () const |
| valid pointer to tuple ? | |
| bool | invalid () const |
| invalid pointer to tuple ? | |
| bool | addItem (const std::string &name, const std::string &type) |
| add the item name into the list of known items | |
| bool | goodItem (const std::string &name) const |
| check the uniqueness of the name | |
| const ItemMap & | items () const |
| get the full list of booked items | |
| 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 (const std::string &name, NTuple::Tuple *tuple, const CLID &clid=CLID_ColumnWiseTuple, const Tuples::Type type=Tuples::NTUPLE) | |
| Standard constructor. | |
| virtual | ~TupleObj () |
| destructor is protected | |
Private Types | |
| typedef GaudiUtils::HashMap < std::string, Bool * > | Bools |
| the actual storage type for short columns | |
| typedef GaudiUtils::HashMap < std::string, Char * > | Chars |
| the actual storage type for short columns | |
| typedef GaudiUtils::HashMap < std::string, UChar * > | UChars |
| the actual storage type for unsigned short columns | |
| typedef GaudiUtils::HashMap < std::string, Short * > | Shorts |
| the actual storage type for short columns | |
| typedef GaudiUtils::HashMap < std::string, UShort * > | UShorts |
| the actual storage type for unsigned short columns | |
| typedef GaudiUtils::HashMap < std::string, Int * > | Ints |
| the actual storage type for integer columns | |
| typedef GaudiUtils::HashMap < std::string, UInt * > | UInts |
| the actual storage type for unsigned integer columns | |
| typedef GaudiUtils::HashMap < std::string, LongLong * > | LongLongs |
| the actual storage type for longlong columns | |
| typedef GaudiUtils::HashMap < std::string, ULongLong * > | ULongLongs |
| the actual storage type for ulonglong columns | |
| typedef GaudiUtils::HashMap < std::string, Float * > | Floats |
| the actual storage type for float columns | |
| typedef GaudiUtils::HashMap < std::string, Double * > | Doubles |
| the actual storage type for float columns | |
| typedef GaudiUtils::HashMap < std::string, Address * > | Addresses |
| the actual storage type for address columns | |
| typedef GaudiUtils::HashMap < std::string, FArray * > | FArrays |
| the actual storage type for array columns | |
| typedef GaudiUtils::HashMap < std::string, FMatrix * > | FMatrices |
| the actual storage type for matrix columns | |
Private Member Functions | |
| Bool * | bools (const std::string &name) |
| get the column | |
| Float * | floats (const std::string &name) |
| get the column | |
| Double * | doubles (const std::string &name) |
| get the column | |
| Char * | chars (const std::string &name) |
| get the column | |
| Char * | chars (const std::string &name, const char minv, const char maxv) |
| get the column | |
| UChar * | uchars (const std::string &name) |
| get the column | |
| UChar * | uchars (const std::string &name, const unsigned char minv, const unsigned char maxv) |
| get the column | |
| Short * | shorts (const std::string &name) |
| get the column | |
| Short * | shorts (const std::string &name, const short minv, const short maxv) |
| get the column | |
| UShort * | ushorts (const std::string &name) |
| get the column | |
| UShort * | ushorts (const std::string &name, const unsigned short minv, const unsigned short maxv) |
| get the column | |
| Int * | ints (const std::string &name) |
| get the column | |
| Int * | ints (const std::string &name, const int minv, const int maxv) |
| get the column | |
| UInt * | uints (const std::string &name) |
| get the column | |
| UInt * | uints (const std::string &name, const unsigned int minv, const unsigned int maxv) |
| get the column | |
| LongLong * | longlongs (const std::string &name) |
| get the column | |
| LongLong * | longlongs (const std::string &name, const long long minv, const long long maxv) |
| get the column | |
| ULongLong * | ulonglongs (const std::string &name) |
| get the column | |
| ULongLong * | ulonglongs (const std::string &name, const unsigned long long minv, const unsigned long long maxv) |
| get the column | |
| FArray * | fArray (const std::string &name, Int *item) |
| get the column | |
| FArray * | fArray (const std::string &name, const MIndex &rows) |
| get the column | |
| Address * | addresses (const std::string &name) |
| get the column | |
| FMatrix * | fMatrix (const std::string &name, Int *item, const MIndex &cols) |
| get the column | |
| FMatrix * | fMatrix (const std::string &name, const MIndex &rows, const MIndex &cols) |
| get the column | |
| TupleObj () | |
| the default constructor is disabled | |
| TupleObj (const TupleObj &) | |
| copy constructor is disabled | |
| TupleObj & | operator= (const TupleObj &) |
| assignment is disabled | |
Private Attributes | |
| std::string | m_name |
| name | |
| NTuple::Tuple * | m_tuple |
| tuple itself | |
| CLID | m_clid |
| tuple CLID | |
| Tuples::Type | m_type |
| tuple 'type' | |
| size_t | m_refCount |
| reference counter | |
| Bools | m_bools |
| the actual storage of all 'bool' columns | |
| Chars | m_chars |
| the actual storage of all 'Int' columns | |
| UChars | m_uchars |
| the actual storage of all 'unsigned int' columns | |
| Shorts | m_shorts |
| the actual storage of all 'Int' columns | |
| UShorts | m_ushorts |
| the actual storage of all 'unsigned int' columns | |
| Ints | m_ints |
| the actual storage of all 'Int' columns | |
| UInts | m_uints |
| the actual storage of all 'unsigned int' columns | |
| LongLongs | m_longlongs |
| the actual storage of all 'longlong' columns | |
| ULongLongs | m_ulonglongs |
| the actual storage of all 'ulonglong' columns | |
| Floats | m_floats |
| the actual storage of all 'Float' columns | |
| Doubles | m_doubles |
| the actual storage of all 'Double' columns | |
| Addresses | m_addresses |
| the actual storage of all 'Address' columns | |
| FArrays | m_farrays |
| the actual storage of all 'FArray' columns | |
| FArrays | m_arraysf |
| the actual storage of all 'FArray' columns (fixed) | |
| FMatrices | m_fmatrices |
| the actual storage of all 'FArray' columns | |
| FMatrices | m_matricesf |
| the actual storage of all 'FMatrix' columns (fixed) | |
| ItemMap | m_items |
| all booked types: | |
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 180 of file TupleObj.h.
basic type for address items
Definition at line 218 of file TupleObj.h.
|
private |
the actual storage type for address columns
Definition at line 2301 of file TupleObj.h.
| typedef NTuple::Item<bool> Tuples::TupleObj::Bool |
basic type for int items
Definition at line 185 of file TupleObj.h.
|
private |
the actual storage type for short columns
Definition at line 2268 of file TupleObj.h.
| typedef NTuple::Item<char> Tuples::TupleObj::Char |
basic type for int items
Definition at line 188 of file TupleObj.h.
|
private |
the actual storage type for short columns
Definition at line 2271 of file TupleObj.h.
| typedef NTuple::Item<double> Tuples::TupleObj::Double |
basic type for double items
Definition at line 215 of file TupleObj.h.
|
private |
the actual storage type for float columns
Definition at line 2298 of file TupleObj.h.
| typedef NTuple::Array<float> Tuples::TupleObj::FArray |
basic type for array of floats
Definition at line 221 of file TupleObj.h.
|
private |
the actual storage type for array columns
Definition at line 2304 of file TupleObj.h.
| typedef NTuple::Item<float> Tuples::TupleObj::Float |
basic type for float items
Definition at line 212 of file TupleObj.h.
|
private |
the actual storage type for float columns
Definition at line 2295 of file TupleObj.h.
|
private |
the actual storage type for matrix columns
Definition at line 2307 of file TupleObj.h.
| typedef NTuple::Matrix<float> Tuples::TupleObj::FMatrix |
basic type for matrix of floats
Definition at line 224 of file TupleObj.h.
| typedef NTuple::Item<int> Tuples::TupleObj::Int |
basic type for int items
Definition at line 200 of file TupleObj.h.
|
private |
the actual storage type for integer columns
Definition at line 2283 of file TupleObj.h.
Definition at line 230 of file TupleObj.h.
| typedef NTuple::Item<long long> Tuples::TupleObj::LongLong |
basic type for unsigned long long items
Definition at line 206 of file TupleObj.h.
|
private |
the actual storage type for longlong columns
Definition at line 2289 of file TupleObj.h.
| typedef unsigned short Tuples::TupleObj::MIndex |
Definition at line 227 of file TupleObj.h.
| typedef NTuple::Item<short> Tuples::TupleObj::Short |
basic type for int items
Definition at line 194 of file TupleObj.h.
|
private |
the actual storage type for short columns
Definition at line 2277 of file TupleObj.h.
| typedef NTuple::Item<unsigned char> Tuples::TupleObj::UChar |
basic type for unsigned int items
Definition at line 191 of file TupleObj.h.
|
private |
the actual storage type for unsigned short columns
Definition at line 2274 of file TupleObj.h.
| typedef NTuple::Item<unsigned int> Tuples::TupleObj::UInt |
basic type for unsigned int items
Definition at line 203 of file TupleObj.h.
|
private |
the actual storage type for unsigned integer columns
Definition at line 2286 of file TupleObj.h.
| typedef NTuple::Item<unsigned long long> Tuples::TupleObj::ULongLong |
basic type for unsigned long long items
Definition at line 209 of file TupleObj.h.
|
private |
the actual storage type for ulonglong columns
Definition at line 2292 of file TupleObj.h.
| typedef NTuple::Item<unsigned short> Tuples::TupleObj::UShort |
basic type for unsigned int items
Definition at line 197 of file TupleObj.h.
|
private |
the actual storage type for unsigned short columns
Definition at line 2280 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 84 of file TupleObj.cpp.
|
protectedvirtual |
destructor is protected
Definition at line 121 of file TupleObj.cpp.
|
private |
the default constructor is disabled
|
private |
copy constructor is disabled
|
inline |
add the item name into the list of known items
| name | the name of the item |
| type | the type of the item |
Definition at line 2134 of file TupleObj.h.
|
inline |
add the reference to TupleObj
Definition at line 2098 of file TupleObj.h.
|
private |
|
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 1659 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!) |
fill the array
Definition at line 1721 of file TupleObj.h.
|
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 1769 of file TupleObj.h.
|
inline |
shortcut to put SVector into N-tuple:
Definition at line 1963 of file TupleObj.h.
|
private |
|
private |
|
private |
|
inline |
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const 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 337 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const 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 347 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const 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 401 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const short | value, | ||
| const short | minv, | ||
| const 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 411 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const 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 423 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const unsigned short | value, | ||
| const unsigned short | minv, | ||
| const 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 433 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const 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 357 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const char | value, | ||
| const char | minv, | ||
| const 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 367 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const 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 379 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const unsigned char | value, | ||
| const unsigned char | minv, | ||
| const 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 389 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const 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 445 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const int | value, | ||
| const int | minv, | ||
| const 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 455 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const 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 467 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const unsigned int | value, | ||
| const unsigned int | minv, | ||
| const 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 477 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const 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 489 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const long | value, | ||
| const long | minv, | ||
| const 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 497 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const 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 510 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const unsigned long | value, | ||
| const unsigned long | minv, | ||
| const 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 518 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const 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 531 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const long long | value, | ||
| const long long | minv, | ||
| const 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 541 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const 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 553 of file TupleObj.cpp.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const unsigned long long | value, | ||
| const unsigned long long | minv, | ||
| const 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 563 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 732 of file TupleObj.h.
| StatusCode Tuples::TupleObj::column | ( | const std::string & | name, |
| const 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 575 of file TupleObj.cpp.
| 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.
| name | name of the column ("Address" is a recommended convention!) |
| address | IOpaqueAddress |
Definition at line 313 of file TupleObj.cpp.
| 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 331 of file TupleObj.cpp.
|
inline |
Useful shortcut to put LorentzVector directly into N-Tuple:
Definition at line 1865 of file TupleObj.h.
|
inline |
Useful shortcut to put 3D-Vector directly into N-Tuple:
fill separate columns
Definition at line 1899 of file TupleObj.h.
|
inline |
Useful shortcut to put 3D-Vector directly into N-Tuple:
fill separate columns
Definition at line 1931 of file TupleObj.h.
|
inline |
|
private |
|
pure virtual |
Implemented in Tuples::detail::TupleObjImp< HANDLER1, HANDLER2 >.
|
inline |
|
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 |
fill the array
Definition at line 880 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 958 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 1027 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 1096 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 1182 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 1277 of file TupleObj.h.
|
private |
get the column
Definition at line 904 of file TupleObj.cpp.
|
private |
get the column
Definition at line 924 of file TupleObj.cpp.
| 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| format | blank-separated list of variables, followed by variable number of arguments. |
double numbers decode arguments
Definition at line 282 of file TupleObj.cpp.
|
private |
|
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 1394 of file TupleObj.h.
|
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 1469 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 1590 of file TupleObj.h.
|
inline |
shortcut to put "ExtraInfo" fields of major into N-Tuple
fill the matrix
Definition at line 2018 of file TupleObj.h.
|
private |
get the column
Definition at line 945 of file TupleObj.cpp.
|
private |
get the column
Definition at line 968 of file TupleObj.cpp.
|
inline |
|
private |
|
private |
|
inline |
|
inline |
|
private |
|
private |
|
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 1824 of file TupleObj.h.
|
inline |
shortcut to put Smatrix into N-tuple:
fill the matrix
Definition at line 1979 of file TupleObj.h.
|
inline |
|
inline |
The function allows to add almost arbitrary object into N-tuple.
| name | column name |
| obj | pointer to the object |
Definition at line 127 of file TuplePut.h.
|
inline |
return the reference counter
Definition at line 2093 of file TupleObj.h.
| void Tuples::TupleObj::release | ( | ) |
release the reference to TupleObj if reference counter becomes zero, object will be automatically deleted
Definition at line 228 of file TupleObj.cpp.
|
inline |
|
private |
|
private |
|
inline |
provide the access to underlying Gaudi N-tuple
Definition at line 2088 of file TupleObj.h.
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
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 2360 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'FArray' columns (fixed)
Definition at line 2366 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'bool' columns
Definition at line 2327 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'Int' columns
Definition at line 2330 of file TupleObj.h.
|
private |
tuple CLID
Definition at line 2318 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'Double' columns
Definition at line 2357 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'FArray' columns
Definition at line 2363 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'Float' columns
Definition at line 2354 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'FArray' columns
Definition at line 2369 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'Int' columns
Definition at line 2342 of file TupleObj.h.
|
private |
all booked types:
Definition at line 2375 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'longlong' columns
Definition at line 2348 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'FMatrix' columns (fixed)
Definition at line 2372 of file TupleObj.h.
|
private |
name
Definition at line 2312 of file TupleObj.h.
|
private |
reference counter
Definition at line 2324 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'Int' columns
Definition at line 2336 of file TupleObj.h.
|
private |
tuple itself
Definition at line 2315 of file TupleObj.h.
|
private |
tuple 'type'
Definition at line 2321 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'unsigned int' columns
Definition at line 2333 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'unsigned int' columns
Definition at line 2345 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'ulonglong' columns
Definition at line 2351 of file TupleObj.h.
|
mutableprivate |
the actual storage of all 'unsigned int' columns
Definition at line 2339 of file TupleObj.h.