The Gaudi Framework  v36r16 (ea80daf8)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
TupleDecorator.cpp
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifdef __ICC
12 // disable icc remark #1572: floating-point equality and inequality comparisons are unreliable
13 // Coming from ROOT GenVector
14 # pragma warning( disable : 1572 )
15 #endif
16 // ============================================================================
17 // Include files
18 // ============================================================================
19 // CLHEP
20 // ============================================================================/
21 #include "CLHEP/Matrix/GenMatrix.h"
22 #include "CLHEP/Matrix/Matrix.h"
23 #include "CLHEP/Matrix/Vector.h"
24 // Handle CLHEP 2.0.x move to CLHEP namespace
25 namespace CLHEP {}
26 using namespace CLHEP;
27 // CLHEP is just #()$)*#)*@#)$@ Not even the git master (as of Aug 2015) has HepVector::begin and HepVector::end
28 // defined!!!
29 // fortunately, ADL comes to the rescue...
30 namespace CLHEP {
31  class HepVector;
32  double* begin( CLHEP::HepVector& v ) { return &v[0]; }
33  const double* begin( const CLHEP::HepVector& v ) { return &v[0]; }
34 } // namespace CLHEP
35 
36 // ============================================================================/
37 // GaudiAlg
38 // ============================================================================
39 #include "GaudiAlg/Tuple.h"
40 #include "GaudiAlg/TupleObj.h"
41 // ============================================================================
42 // GaudiPython
43 // ============================================================================
45 #include "GaudiPython/Vector.h"
46 // ===========================================================================
52 // ============================================================================
53 namespace {
54  // ==========================================================================
55  template <class TYPE>
56  inline StatusCode _fill( const Tuples::Tuple& tuple, const std::string& name, const TYPE& value ) {
57  return tuple.valid() ? tuple->column( name, value ) : StatusCode::FAILURE;
58  }
59  // ==========================================================================
60 } // namespace
61 // ============================================================================
63  if ( !tuple.valid() ) { return 0; }
64  return tuple->tuple();
65 }
66 // ============================================================================
68  if ( !tuple.valid() ) { return 0; }
69  return tuple->tuple();
70 }
71 // ============================================================================
72 bool GaudiPython::TupleDecorator::valid( const Tuples::Tuple& tuple ) { return tuple.valid(); }
73 // ============================================================================
75  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
76  return tuple->write();
77 }
78 // ============================================================================
80  return _fill( tuple, name, value );
81 }
82 // ============================================================================
84  const int minv, const int maxv ) {
85  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
86  return tuple->column( name, value, minv, maxv );
87 }
88 // ============================================================================
90  const double value ) {
91  return _fill( tuple, name, value );
92 }
93 // ============================================================================
95  const long long value ) {
96  return _fill( tuple, name, value );
97 }
98 // ============================================================================
100  const unsigned long long value ) {
101  return _fill( tuple, name, value );
102 }
103 // ============================================================================
105  const bool value ) {
106  return _fill( tuple, name, value );
107 }
108 // ============================================================================
110  IOpaqueAddress* value ) {
111  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
112  return tuple->column( name, value );
113 }
114 // ============================================================================
116  return column( tuple, "Address", value );
117 }
118 // ============================================================================
120  const Gaudi::LorentzVector& value ) {
121  return _fill( tuple, name, value );
122 }
123 // ============================================================================
125  const Gaudi::XYZVector& value ) {
126  return _fill( tuple, name, value );
127 }
128 // ============================================================================
130  const Gaudi::XYZPoint& value ) {
131  return _fill( tuple, name, value );
132 }
133 // ============================================================================
135  const std::vector<double>& data, const std::string& length,
136  const size_t maxv ) {
137  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
138  return tuple->farray( name, data.begin(), data.end(), length, maxv );
139 }
140 // ============================================================================
142  const GaudiPython::Matrix& data,
143  const Tuples::TupleObj::MIndex cols, // fixed !!!
144  const std::string& length, const size_t maxv ) {
145  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
146  if ( !data.empty() && cols != data.front().size() ) {
147  return tuple->Error( "GP:fmatrix(1): mismatch in matrix dimensions!" );
148  }
149  return tuple->fmatrix( name, data, data.size(), cols, length, maxv );
150 }
151 // ============================================================================
154  const std::string& length, const size_t maxv ) {
155  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
156  return tuple->fmatrix( name, info, length, maxv );
157 }
158 // ============================================================================
160  const std::vector<double>& data ) {
161  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
162  return tuple->array( name, data.begin(), data.end() );
163 }
164 // ============================================================================
166  const Gaudi::Vector1& data ) {
167  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
168  return tuple->array( name, data );
169 }
170 // ============================================================================
172  const Gaudi::Vector2& data ) {
173  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
174  return tuple->array( name, data );
175 }
176 // ============================================================================
178  const Gaudi::Vector3& data ) {
179  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
180  return tuple->array( name, data.begin(), data.begin() + 3 );
181 }
182 // ============================================================================
184  const Gaudi::Vector4& data ) {
185  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
186  // return tuple->array( name , data ) ;
187  return tuple->array( name, data.begin(), data.begin() + 4 );
188 }
189 // ============================================================================
191  const Gaudi::Vector5& data ) {
192  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
193  return tuple->array( name, data );
194 }
195 // ============================================================================
197  const Gaudi::Vector6& data ) {
198  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
199  return tuple->array( name, data );
200 }
201 // ============================================================================
203  const Gaudi::Vector7& data ) {
204  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
205  return tuple->array( name, data );
206 }
207 // ============================================================================
209  const Gaudi::Vector8& data ) {
210  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
211  return tuple->array( name, data );
212 }
213 // ============================================================================
215  const Gaudi::Vector9& data ) {
216  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
217  return tuple->array( name, data );
218 }
219 // ============================================================================
221  const GaudiPython::Matrix& data,
222  const Tuples::TupleObj::MIndex cols ) // fixed !!!
223 {
224  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
225  if ( data.empty() ) { return tuple->Warning( "GP:matrix(1): empty fixed matrix, skip matrix " ); }
226  if ( cols != data.front().size() ) { return tuple->Error( "GP:matrix(1): mismatch in fixed matrix dimensions!" ); }
227  return tuple->matrix( name, data, data.size(), cols );
228 }
229 // ============================================================================
231  const Gaudi::Matrix1x1& data ) {
232  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
233  return tuple->matrix( name, data );
234 }
235 // ============================================================================
237  const Gaudi::Matrix2x2& data ) {
238  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
239  return tuple->matrix( name, data );
240 }
241 // ============================================================================
243  const Gaudi::Matrix3x3& data ) {
244  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
245  return tuple->matrix( name, data );
246 }
247 // ============================================================================
249  const Gaudi::Matrix4x4& data ) {
250  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
251  return tuple->matrix( name, data );
252 }
253 // ============================================================================
255  const Gaudi::Matrix5x5& data ) {
256  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
257  return tuple->matrix( name, data );
258 }
259 // ============================================================================
261  const Gaudi::Matrix6x6& data ) {
262  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
263  return tuple->matrix( name, data );
264 }
265 // ============================================================================
267  const Gaudi::Matrix7x7& data ) {
268  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
269  return tuple->matrix( name, data );
270 }
271 // ============================================================================
273  const Gaudi::Matrix8x8& data ) {
274  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
275  return tuple->matrix( name, data );
276 }
277 // ============================================================================
279  const Gaudi::Matrix9x9& data ) {
280  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
281  return tuple->matrix( name, data );
282 }
283 // ============================================================================
285  const Gaudi::Matrix1x3& data ) {
286  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
287  return tuple->matrix( name, data );
288 }
289 // ============================================================================
291  const Gaudi::Matrix1x5& data ) {
292  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
293  return tuple->matrix( name, data );
294 }
295 // ============================================================================
297  const Gaudi::Matrix1x6& data ) {
298  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
299  return tuple->matrix( name, data );
300 }
301 // ============================================================================
303  const Gaudi::Matrix4x3& data ) {
304  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
305  return tuple->matrix( name, data );
306 }
307 // ============================================================================
309  const Gaudi::Matrix3x4& data ) {
310  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
311  return tuple->matrix( name, data );
312 }
313 // ============================================================================
315  const Gaudi::Matrix3x5& data ) {
316  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
317  return tuple->matrix( name, data );
318 }
319 // ============================================================================
321  const Gaudi::Matrix3x6& data ) {
322  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
323  return tuple->matrix( name, data );
324 }
325 // ============================================================================
327  const Gaudi::Matrix2x3& data ) {
328  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
329  return tuple->matrix( name, data );
330 }
331 // ============================================================================
333  const Gaudi::Matrix3x2& data ) {
334  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
335  return tuple->matrix( name, data );
336 }
337 // ============================================================================
339  const Gaudi::SymMatrix1x1& data ) {
340  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
341  return tuple->matrix( name, data );
342 }
343 // ============================================================================
345  const Gaudi::SymMatrix2x2& data ) {
346  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
347  return tuple->matrix( name, data );
348 }
349 // ============================================================================
351  const Gaudi::SymMatrix3x3& data ) {
352  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
353  return tuple->matrix( name, data );
354 }
355 // ============================================================================
357  const Gaudi::SymMatrix4x4& data ) {
358  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
359  return tuple->matrix( name, data );
360 }
361 // ============================================================================
363  const Gaudi::SymMatrix5x5& data ) {
364  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
365  return tuple->matrix( name, data );
366 }
367 // ============================================================================
369  const Gaudi::SymMatrix6x6& data ) {
370  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
371  return tuple->matrix( name, data );
372 }
373 // ============================================================================
375  const Gaudi::SymMatrix7x7& data ) {
376  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
377  return tuple->matrix( name, data );
378 }
379 // ============================================================================
381  const Gaudi::SymMatrix8x8& data ) {
382  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
383  return tuple->matrix( name, data );
384 }
385 // ============================================================================
387  const Gaudi::SymMatrix9x9& data ) {
388  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
389  return tuple->matrix( name, data );
390 }
391 // ============================================================================
392 // advanced column: time
393 // ============================================================================
395  return column( tuple, "", value );
396 }
397 // ============================================================================
398 // advanced column: time
399 // ============================================================================
401  const Gaudi::Time& value ) {
402  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
404  //
405  sc = tuple->column( name + "year", value.year( true ), 1970, 2070 );
406  if ( sc.isFailure() ) { return sc; }
407  sc = tuple->column( name + "month", value.month( true ) + 1, 1, 16 );
408  if ( sc.isFailure() ) { return sc; }
409  sc = tuple->column( name + "day", value.day( true ), 0, 32 );
410  if ( sc.isFailure() ) { return sc; }
411  sc = tuple->column( name + "hour", value.hour( true ), 0, 25 );
412  if ( sc.isFailure() ) { return sc; }
413  sc = tuple->column( name + "minute", value.minute( true ), 0, 61 );
414  if ( sc.isFailure() ) { return sc; }
415  sc = tuple->column( name + "second", value.second( true ), 0, 61 );
416  if ( sc.isFailure() ) { return sc; }
417  sc = tuple->column( name + "nsecond", value.nsecond() );
418  //
419  return sc;
420 }
421 // ============================================================================
422 
423 // ============================================================================
424 // Legacy:
425 // ============================================================================
427  const CLHEP::HepVector& data ) {
428  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
429  return tuple->array( name, data, data.num_row() );
430 }
431 // ============================================================================
433  const CLHEP::HepVector& data, const std::string& length,
434  const size_t maxv ) {
435  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
436  // use the trick!
437  const double* begin = &( data[0] );
438  const double* end = begin + data.num_row();
439  return tuple->farray( name, begin, end, length, maxv );
440 }
441 // ============================================================================
443  const CLHEP::HepGenMatrix& data ) {
444  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
445  if ( 1 > data.num_col() ) { return tuple->Error( "GP:matrix(2): illegal fixed matrix num_col" ); }
446  if ( 1 > data.num_row() ) { return tuple->Error( "GP:matrix(2): illegal fixed matrix num_row" ); }
447  return tuple->matrix( name, data, data.num_row(), data.num_col() );
448 }
449 // ============================================================================
451  const CLHEP::HepGenMatrix& data,
452  const Tuples::TupleObj::MIndex cols, // fixed !!!
453  const std::string& length, const size_t maxv ) {
454  if ( !tuple.valid() ) { return StatusCode::FAILURE; }
455  if ( cols != data.num_col() ) { return tuple->Error( "GP:fmatrix(2): mismatch in matrix dimensions!" ); }
456  return tuple->fmatrix( name, data, data.num_row(), cols, length, maxv );
457 }
458 // ============================================================================
459 
460 // ============================================================================
461 // Tuple-Alg-decorator
462 // ============================================================================
464  const CLID& clid ) {
465  return algo.nTuple( title, clid );
466 }
467 // ============================================================================
469  const std::string& title, const CLID& clid ) {
470  return algo.nTuple( ID, title, clid );
471 }
472 // ============================================================================
474  const CLID& clid ) {
475  return algo.nTuple( ID, title, clid );
476 }
477 // ============================================================================
479  const std::string& title, const CLID& clid ) {
480  return algo.nTuple( ID, title, clid );
481 }
482 // ============================================================================
484  const CLID& clid ) {
485  return algo.evtCol( title, clid );
486 }
487 // ============================================================================
489  const std::string& title, const CLID& clid ) {
490  return algo.evtCol( ID, title, clid );
491 }
492 // ============================================================================
494  const CLID& clid ) {
495  return algo.evtCol( ID, title, clid );
496 }
497 // ============================================================================
499  const std::string& title, const CLID& clid ) {
500  return algo.evtCol( ID, title, clid );
501 }
502 // ============================================================================
503 // The END
504 // ============================================================================
Gaudi::Matrix4x3
ROOT::Math::SMatrix< double, 4, 3 > Matrix4x3
Generic 4x3 matrix (double)
Definition: GenericMatrixTypes.h:58
GaudiPython::TupleDecorator::nTuple
static INTuple * nTuple(const Tuples::Tuple &tuple)
accessors to internal
Definition: TupleDecorator.cpp:62
Tuple.h
Gaudi::Vector5
ROOT::Math::SVector< double, 5 > Vector5
5D Vector (double)
Definition: GenericVectorTypes.h:43
Gaudi::Matrix7x7
ROOT::Math::SMatrix< double, 7, 7 > Matrix7x7
Generic 7x7 matrix (double)
Definition: GenericMatrixTypes.h:45
std::string
STL class.
Gaudi::Matrix5x5
ROOT::Math::SMatrix< double, 5, 5 > Matrix5x5
Generic 5x5 matrix (double)
Definition: GenericMatrixTypes.h:43
GaudiAlg::ID
Definition: GaudiHistoID.h:53
Gaudi::Time::year
int year(bool local) const
Get the year.
Definition: Time.cpp:176
Tuples::TupleObj::column
StatusCode column(std::string_view name, float value)
Set the value for selected tuple column.
Definition: TupleObj.cpp:267
Tuples::TupleObj::tuple
const NTuple::Tuple * tuple() const
provide the access to underlying Gaudi N-tuple
Definition: TupleObj.h:1862
Tuples::TupleObj::matrix
StatusCode matrix(std::string_view name, const MATRIX &data, const MIndex &rows, const MIndex &cols)
fill N-Tuple with fixed-size matrix
Definition: TupleObj.h:1699
Gaudi::SymMatrix1x1
ROOT::Math::SMatrix< double, 1, 1, ROOT::Math::MatRepSym< double, 1 > > SymMatrix1x1
Symmetrix 1x1 matrix (double)
Definition: SymmetricMatrixTypes.h:37
Tuples::TupleObj::Error
virtual StatusCode Error(const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const =0
Gaudi::Time::second
int second(bool local) const
Get the seconds, numbered [0,61] (allowing one or two leap seconds, years with leap seconds can have ...
Definition: Time.cpp:193
IOpaqueAddress
Definition: IOpaqueAddress.h:33
Gaudi::XYZVector
ROOT::Math::XYZVector XYZVector
Cartesian 3D vector (double)
Definition: Vector3DTypes.h:39
Gaudi::Matrix1x5
ROOT::Math::SMatrix< double, 1, 5 > Matrix1x5
Generic 1x5 matrix (double)
Definition: GenericMatrixTypes.h:50
std::vector< double >
GaudiPython::TupleDecorator::matrix
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.
Definition: TupleDecorator.cpp:220
std::vector::size
T size(T... args)
GaudiPython.GaudiAlgs.column
column
Definition: GaudiAlgs.py:1213
GaudiUtils::VectorMap
Definition: VectorMap.h:112
Gaudi::SymMatrix5x5
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > SymMatrix5x5
Symmetrix 5x5 matrix (double)
Definition: SymmetricMatrixTypes.h:45
GaudiTupleAlg
Definition: GaudiTupleAlg.h:51
Gaudi::Matrix3x2
ROOT::Math::SMatrix< double, 3, 2 > Matrix3x2
Generic 3x2 matrix (double)
Definition: GenericMatrixTypes.h:54
Gaudi::Matrix1x3
ROOT::Math::SMatrix< double, 1, 3 > Matrix1x3
Generic 1x3 matrix (double)
Definition: GenericMatrixTypes.h:49
Gaudi::Vector9
ROOT::Math::SVector< double, 9 > Vector9
9D Vector (double)
Definition: GenericVectorTypes.h:47
Tuples::TupleObj::array
StatusCode array(std::string_view name, DATA first, DATA last)
fill N-Tuple with fixed-size array
Definition: TupleObj.h:1544
GaudiPython::TupleDecorator::farray
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.
Definition: TupleDecorator.cpp:134
Gaudi::SymMatrix4x4
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > SymMatrix4x4
Symmetrix 4x4 matrix (double)
Definition: SymmetricMatrixTypes.h:43
std::vector::front
T front(T... args)
Gaudi::Matrix3x4
ROOT::Math::SMatrix< double, 3, 4 > Matrix3x4
Generic 3x4 matrix (double)
Definition: GenericMatrixTypes.h:55
Gaudi::Time
Definition: Time.h:241
GaudiPython::TupleDecorator::fmatrix
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.
Definition: TupleDecorator.cpp:141
Gaudi::Matrix2x3
ROOT::Math::SMatrix< double, 2, 3 > Matrix2x3
Generic 2x3 matrix (double)
Definition: GenericMatrixTypes.h:52
Vector.h
Gaudi::Vector2
ROOT::Math::SVector< double, 2 > Vector2
2D Vector (double)
Definition: GenericVectorTypes.h:40
Gaudi::Time::minute
int minute(bool local) const
Get the minute, numbered [0, 59].
Definition: Time.cpp:188
TimingHistograms.name
name
Definition: TimingHistograms.py:25
StatusCode
Definition: StatusCode.h:65
Gaudi::Matrix8x8
ROOT::Math::SMatrix< double, 8, 8 > Matrix8x8
Generic 8x8 matrix (double)
Definition: GenericMatrixTypes.h:46
Gaudi::Vector1
ROOT::Math::SVector< double, 1 > Vector1
1D Vector (double)
Definition: GenericVectorTypes.h:39
CLHEP::begin
double * begin(CLHEP::HepVector &v)
Definition: TupleAlg.cpp:45
TupleObj.h
Gaudi::Matrix3x5
ROOT::Math::SMatrix< double, 3, 5 > Matrix3x5
Generic 3x5 matrix (double)
Definition: GenericMatrixTypes.h:56
GaudiPython::TupleDecorator::ntuple
static NTuple::Tuple * ntuple(const Tuples::Tuple &tuple)
accessors to internal
Definition: TupleDecorator.cpp:67
Tuples::TupleObj::fmatrix
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.
Definition: TupleObj.h:1303
Gaudi::Time::hour
int hour(bool local) const
Get the hour, numbered [0, 23].
Definition: Time.cpp:185
Gaudi::Matrix4x4
ROOT::Math::SMatrix< double, 4, 4 > Matrix4x4
Generic 4x4 matrix (double)
Definition: GenericMatrixTypes.h:42
Tuples::Tuple
A simple wrapper class over standard Gaudi NTuple::Tuple facility.
Definition: Tuple.h:126
GaudiPython::TupleAlgDecorator::evtCol
static Tuples::Tuple evtCol(const GaudiTupleAlg &algo, const std::string &title, const CLID &clid=CLID_ColumnWiseTuple)
get n-tuple (book-on-demand)
Definition: TupleDecorator.cpp:483
INTuple
Definition: INTuple.h:91
Gaudi::Vector6
ROOT::Math::SVector< double, 6 > Vector6
6D Vector (double)
Definition: GenericVectorTypes.h:44
GaudiTuples::evtCol
Tuple evtCol(const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const
Access an Event Tag Collection object (book on-demand) with unique identifier.
Definition: GaudiTuples.icpp:134
Gaudi::Matrix1x6
ROOT::Math::SMatrix< double, 1, 6 > Matrix1x6
Generic 1x6 matrix (double)
Definition: GenericMatrixTypes.h:51
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:18
Gaudi::SymMatrix2x2
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepSym< double, 2 > > SymMatrix2x2
Symmetrix 2x2 matrix (double)
Definition: SymmetricMatrixTypes.h:39
GaudiPython::TupleDecorator::write
static StatusCode write(const Tuples::Tuple &tuple)
commit the row
Definition: TupleDecorator.cpp:74
Gaudi::SymMatrix8x8
ROOT::Math::SMatrix< double, 8, 8, ROOT::Math::MatRepSym< double, 8 > > SymMatrix8x8
Symmetrix 8x8 matrix (double)
Definition: SymmetricMatrixTypes.h:51
CLHEP
Definition: TupleAlg.cpp:37
TupleDecorator.h
HistoDumpEx.v
v
Definition: HistoDumpEx.py:27
Gaudi::SymMatrix9x9
ROOT::Math::SMatrix< double, 9, 9, ROOT::Math::MatRepSym< double, 9 > > SymMatrix9x9
Symmetrix 9x9 matrix (double)
Definition: SymmetricMatrixTypes.h:53
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:129
GaudiPython::TupleDecorator::column_ll
static StatusCode column_ll(const Tuples::Tuple &tuple, const std::string &name, const long long value)
more or less simple columns: long long
Definition: TupleDecorator.cpp:94
Gaudi::Vector7
ROOT::Math::SVector< double, 7 > Vector7
7D Vector (double)
Definition: GenericVectorTypes.h:45
Tuples::TupleObj::Warning
virtual StatusCode Warning(const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const =0
Tuples::Tuple::valid
bool valid() const
check the validity of the tuple object
Definition: Tuple.h:142
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
GaudiPython::TupleDecorator::column_ull
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
Definition: TupleDecorator.cpp:99
NTuple::Tuple
Abstract base class which allows the user to interact with the actual N tuple implementation.
Definition: NTuple.h:387
GaudiPython::TupleDecorator::valid
static bool valid(const Tuples::Tuple &tuple)
status of the tuple
Definition: TupleDecorator.cpp:72
std::vector::begin
T begin(T... args)
GaudiTuples::nTuple
Tuple nTuple(const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const
Access an N-Tuple object (book on-demand) with unique identifier.
Definition: GaudiTuples.icpp:101
Gaudi::Vector3
ROOT::Math::SVector< double, 3 > Vector3
3D Vector (double)
Definition: GenericVectorTypes.h:41
Tuples::TupleObj::MIndex
unsigned short MIndex
Definition: TupleObj.h:231
Gaudi::SymMatrix3x3
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > SymMatrix3x3
Symmetrix 3x3 matrix (double)
Definition: SymmetricMatrixTypes.h:41
Gaudi::Matrix2x2
ROOT::Math::SMatrix< double, 2, 2 > Matrix2x2
Generic 2x2 matrix (double)
Definition: GenericMatrixTypes.h:40
Gaudi::SymMatrix7x7
ROOT::Math::SMatrix< double, 7, 7, ROOT::Math::MatRepSym< double, 7 > > SymMatrix7x7
Symmetrix 7x7 matrix (double)
Definition: SymmetricMatrixTypes.h:49
Gaudi::Matrix9x9
ROOT::Math::SMatrix< double, 9, 9 > Matrix9x9
Generic 9x9 matrix (double)
Definition: GenericMatrixTypes.h:47
Gaudi::Vector4
ROOT::Math::SVector< double, 4 > Vector4
4D Vector (double)
Definition: GenericVectorTypes.h:42
Gaudi::Matrix3x3
ROOT::Math::SMatrix< double, 3, 3 > Matrix3x3
Generic 3x3 matrix (double)
Definition: GenericMatrixTypes.h:41
std::vector::empty
T empty(T... args)
Gaudi::Time::month
int month(bool local) const
Get the month, numbered [0,11].
Definition: Time.cpp:179
Tuples::TupleObj::write
StatusCode write()
write a record to NTuple
Definition: TupleObj.cpp:245
Gaudi::Matrix1x1
ROOT::Math::SMatrix< double, 1, 1 > Matrix1x1
Generic 1x1 matrix (double)
Definition: GenericMatrixTypes.h:39
Tuples::TupleObj::farray
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.
Definition: TupleObj.h:886
std::vector::end
T end(T... args)
Gaudi::Time::nsecond
int nsecond() const
Get the nanoseconds.
Definition: Time.cpp:198
Gaudi::Time::day
int day(bool local) const
Get the day of month, numbered [1,31].
Definition: Time.cpp:182
IOTest.end
end
Definition: IOTest.py:123
Gaudi::Matrix3x6
ROOT::Math::SMatrix< double, 3, 6 > Matrix3x6
Generic 3x6 matrix (double)
Definition: GenericMatrixTypes.h:57
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:101
GaudiPython::TupleDecorator::column
static StatusCode column(const Tuples::Tuple &tuple, const std::string &name, const int value)
more or less simple columns: long
Definition: TupleDecorator.cpp:79
Gaudi::LorentzVector
ROOT::Math::PxPyPzEVector LorentzVector
Cartesian 4 Vector.
Definition: Vector4DTypes.h:40
GaudiPython::TupleAlgDecorator::nTuple
static Tuples::Tuple nTuple(const GaudiTupleAlg &algo, const std::string &title, const CLID &clid=CLID_ColumnWiseTuple)
get n-tuple (book-on-demand)
Definition: TupleDecorator.cpp:463
Gaudi::SymMatrix6x6
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > SymMatrix6x6
Symmetrix 6x6 matrix (double)
Definition: SymmetricMatrixTypes.h:47
Gaudi::Matrix6x6
ROOT::Math::SMatrix< double, 6, 6 > Matrix6x6
Generic 6x6 matrix (double)
Definition: GenericMatrixTypes.h:44
GaudiPython::TupleDecorator::array
static StatusCode array(const Tuples::Tuple &tuple, const std::string &name, const std::vector< double > &data)
Advanced columns: fixed size arrays.
Definition: TupleDecorator.cpp:159
Gaudi::Vector8
ROOT::Math::SVector< double, 8 > Vector8
8D Vector (double)
Definition: GenericVectorTypes.h:46
Gaudi::XYZPoint
ROOT::Math::XYZPoint XYZPoint
3D cartesian point (double)
Definition: Point3DTypes.h:39