Loading [MathJax]/extensions/tex2jax.js
Go to the documentation of this file.
16 #include "CLHEP/Matrix/GenMatrix.h"
17 #include "CLHEP/Matrix/Matrix.h"
18 #include "CLHEP/Matrix/Vector.h"
21 using namespace CLHEP;
27 double*
begin( CLHEP::HepVector&
v ) {
return &
v[0]; }
28 const double*
begin(
const CLHEP::HepVector&
v ) {
return &
v[0]; }
58 if ( !tuple.
valid() ) {
return 0; }
59 return tuple->
tuple();
63 if ( !tuple.
valid() ) {
return 0; }
64 return tuple->
tuple();
71 return tuple->
write();
75 return _fill( tuple,
name, value );
79 const int minv,
const int maxv ) {
81 return tuple->
column(
name, value, minv, maxv );
85 const double value ) {
86 return _fill( tuple,
name, value );
90 const long long value ) {
91 return _fill( tuple,
name, value );
95 const unsigned long long value ) {
96 return _fill( tuple,
name, value );
101 return _fill( tuple,
name, value );
111 return column( tuple,
"Address", value );
116 return _fill( tuple,
name, value );
121 return _fill( tuple,
name, value );
126 return _fill( tuple,
name, value );
131 const size_t maxv ) {
141 if ( !data.
empty() && cols != data.
front().size() ) {
142 return tuple->
Error(
"GP:fmatrix(1): mismatch in matrix dimensions!" );
175 return tuple->
array(
name, data.begin(), data.begin() + 3 );
182 return tuple->
array(
name, data.begin(), data.begin() + 4 );
220 if ( data.
empty() ) {
return tuple->
Warning(
"GP:matrix(1): empty fixed matrix, skip matrix " ); }
221 if ( cols != data.
front().size() ) {
return tuple->
Error(
"GP:matrix(1): mismatch in fixed matrix dimensions!" ); }
390 return column( tuple,
"", value );
400 sc = tuple->
column(
name +
"year", value.
year(
true ), 1970, 2070 );
404 sc = tuple->
column(
name +
"day", value.
day(
true ), 0, 32 );
422 const CLHEP::HepVector& data ) {
424 return tuple->
array(
name, data, data.num_row() );
428 const CLHEP::HepVector& data,
const std::string& length,
429 const size_t maxv ) {
432 const double*
begin = &( data[0] );
433 const double*
end =
begin + data.num_row();
438 const CLHEP::HepGenMatrix& data ) {
440 if ( 1 > data.num_col() ) {
return tuple->
Error(
"GP:matrix(2): illegal fixed matrix num_col" ); }
441 if ( 1 > data.num_row() ) {
return tuple->
Error(
"GP:matrix(2): illegal fixed matrix num_row" ); }
442 return tuple->
matrix(
name, data, data.num_row(), data.num_col() );
446 const CLHEP::HepGenMatrix& data,
450 if ( cols != data.num_col() ) {
return tuple->
Error(
"GP:fmatrix(2): mismatch in matrix dimensions!" ); }
451 return tuple->
fmatrix(
name, data, data.num_row(), cols, length, maxv );
460 return algo.
nTuple( title, clid );
465 return algo.
nTuple( ID, title, clid );
470 return algo.
nTuple( ID, title, clid );
475 return algo.
nTuple( ID, title, clid );
480 return algo.
evtCol( title, clid );
485 return algo.
evtCol( ID, title, clid );
490 return algo.
evtCol( ID, title, clid );
495 return algo.
evtCol( ID, title, clid );
ROOT::Math::SMatrix< double, 4, 3 > Matrix4x3
Generic 4x3 matrix (double)
static INTuple * nTuple(const Tuples::Tuple &tuple)
accessors to internal
ROOT::Math::SVector< double, 5 > Vector5
5D Vector (double)
ROOT::Math::SMatrix< double, 7, 7 > Matrix7x7
Generic 7x7 matrix (double)
ROOT::Math::SMatrix< double, 5, 5 > Matrix5x5
Generic 5x5 matrix (double)
int year(bool local) const
Get the year.
StatusCode column(std::string_view name, float value)
Set the value for selected tuple column.
const NTuple::Tuple * tuple() const
provide the access to underlying Gaudi N-tuple
StatusCode matrix(std::string_view name, const MATRIX &data, const MIndex &rows, const MIndex &cols)
fill N-Tuple with fixed-size matrix
ROOT::Math::SMatrix< double, 1, 1, ROOT::Math::MatRepSym< double, 1 > > SymMatrix1x1
Symmetrix 1x1 matrix (double)
virtual StatusCode Error(const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const =0
int second(bool local) const
Get the seconds, numbered [0,61] (allowing one or two leap seconds, years with leap seconds can have ...
ROOT::Math::XYZVector XYZVector
Cartesian 3D vector (double)
ROOT::Math::SMatrix< double, 1, 5 > Matrix1x5
Generic 1x5 matrix (double)
static StatusCode matrix(const Tuples::Tuple &tuple, const std::string &name, const GaudiPython::Matrix &data, const Tuples::TupleObj::MIndex cols)
Advanced columns: fixed size matrices.
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > SymMatrix5x5
Symmetrix 5x5 matrix (double)
ROOT::Math::SMatrix< double, 3, 2 > Matrix3x2
Generic 3x2 matrix (double)
ROOT::Math::SMatrix< double, 1, 3 > Matrix1x3
Generic 1x3 matrix (double)
ROOT::Math::SVector< double, 9 > Vector9
9D Vector (double)
StatusCode array(std::string_view name, DATA first, DATA last)
fill N-Tuple with fixed-size array
static StatusCode farray(const Tuples::Tuple &tuple, const std::string &name, const std::vector< double > &data, const std::string &length, const size_t maxv)
Advanced columns: floating-size arrays.
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > SymMatrix4x4
Symmetrix 4x4 matrix (double)
ROOT::Math::SMatrix< double, 3, 4 > Matrix3x4
Generic 3x4 matrix (double)
static StatusCode fmatrix(const Tuples::Tuple &tuple, const std::string &name, const GaudiPython::Matrix &data, const Tuples::TupleObj::MIndex cols, const std::string &length, const size_t maxv)
Advanced columns: floating-size matrices.
ROOT::Math::SMatrix< double, 2, 3 > Matrix2x3
Generic 2x3 matrix (double)
ROOT::Math::SVector< double, 2 > Vector2
2D Vector (double)
int minute(bool local) const
Get the minute, numbered [0, 59].
ROOT::Math::SMatrix< double, 8, 8 > Matrix8x8
Generic 8x8 matrix (double)
ROOT::Math::SVector< double, 1 > Vector1
1D Vector (double)
double * begin(CLHEP::HepVector &v)
ROOT::Math::SMatrix< double, 3, 5 > Matrix3x5
Generic 3x5 matrix (double)
static NTuple::Tuple * ntuple(const Tuples::Tuple &tuple)
accessors to internal
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.
int hour(bool local) const
Get the hour, numbered [0, 23].
ROOT::Math::SMatrix< double, 4, 4 > Matrix4x4
Generic 4x4 matrix (double)
A simple wrapper class over standard Gaudi NTuple::Tuple facility.
static Tuples::Tuple evtCol(const GaudiTupleAlg &algo, const std::string &title, const CLID &clid=CLID_ColumnWiseTuple)
get n-tuple (book-on-demand)
ROOT::Math::SVector< double, 6 > Vector6
6D Vector (double)
Tuple evtCol(const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const
Access an Event Tag Collection object (book on-demand) with unique identifier.
ROOT::Math::SMatrix< double, 1, 6 > Matrix1x6
Generic 1x6 matrix (double)
unsigned int CLID
Class ID definition.
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepSym< double, 2 > > SymMatrix2x2
Symmetrix 2x2 matrix (double)
static StatusCode write(const Tuples::Tuple &tuple)
commit the row
ROOT::Math::SMatrix< double, 8, 8, ROOT::Math::MatRepSym< double, 8 > > SymMatrix8x8
Symmetrix 8x8 matrix (double)
ROOT::Math::SMatrix< double, 9, 9, ROOT::Math::MatRepSym< double, 9 > > SymMatrix9x9
Symmetrix 9x9 matrix (double)
static StatusCode column_ll(const Tuples::Tuple &tuple, const std::string &name, const long long value)
more or less simple columns: long long
ROOT::Math::SVector< double, 7 > Vector7
7D Vector (double)
virtual StatusCode Warning(const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const =0
bool valid() const
check the validity of the tuple object
constexpr static const auto SUCCESS
static StatusCode column_ull(const Tuples::Tuple &tuple, const std::string &name, const unsigned long long value)
more or less simple columns: unsigned long long
Abstract base class which allows the user to interact with the actual N tuple implementation.
static bool valid(const Tuples::Tuple &tuple)
status of the tuple
Tuple nTuple(const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const
Access an N-Tuple object (book on-demand) with unique identifier.
ROOT::Math::SVector< double, 3 > Vector3
3D Vector (double)
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > SymMatrix3x3
Symmetrix 3x3 matrix (double)
ROOT::Math::SMatrix< double, 2, 2 > Matrix2x2
Generic 2x2 matrix (double)
ROOT::Math::SMatrix< double, 7, 7, ROOT::Math::MatRepSym< double, 7 > > SymMatrix7x7
Symmetrix 7x7 matrix (double)
ROOT::Math::SMatrix< double, 9, 9 > Matrix9x9
Generic 9x9 matrix (double)
ROOT::Math::SVector< double, 4 > Vector4
4D Vector (double)
ROOT::Math::SMatrix< double, 3, 3 > Matrix3x3
Generic 3x3 matrix (double)
int month(bool local) const
Get the month, numbered [0,11].
StatusCode write()
write a record to NTuple
ROOT::Math::SMatrix< double, 1, 1 > Matrix1x1
Generic 1x1 matrix (double)
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.
int nsecond() const
Get the nanoseconds.
int day(bool local) const
Get the day of month, numbered [1,31].
ROOT::Math::SMatrix< double, 3, 6 > Matrix3x6
Generic 3x6 matrix (double)
constexpr static const auto FAILURE
static StatusCode column(const Tuples::Tuple &tuple, const std::string &name, const int value)
more or less simple columns: long
ROOT::Math::PxPyPzEVector LorentzVector
Cartesian 4 Vector.
static Tuples::Tuple nTuple(const GaudiTupleAlg &algo, const std::string &title, const CLID &clid=CLID_ColumnWiseTuple)
get n-tuple (book-on-demand)
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > SymMatrix6x6
Symmetrix 6x6 matrix (double)
ROOT::Math::SMatrix< double, 6, 6 > Matrix6x6
Generic 6x6 matrix (double)
static StatusCode array(const Tuples::Tuple &tuple, const std::string &name, const std::vector< double > &data)
Advanced columns: fixed size arrays.
ROOT::Math::SVector< double, 8 > Vector8
8D Vector (double)
ROOT::Math::XYZPoint XYZPoint
3D cartesian point (double)