All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TupleDecorator.cpp
Go to the documentation of this file.
1 // $Id: TupleDecorator.cpp,v 1.7 2007/08/07 14:05:33 marcocle Exp $
2 #ifdef __ICC
3 // disable icc remark #1572: floating-point equality and inequality comparisons are unreliable
4 // Coming from ROOT GenVector
5 #pragma warning(disable:1572)
6 #endif
7 // ============================================================================
8 // Include files
9 // ============================================================================
10 // CLHEP
11 // ============================================================================/
12 #include "CLHEP/Matrix/GenMatrix.h"
13 #include "CLHEP/Matrix/Matrix.h"
14 #include "CLHEP/Matrix/Vector.h"
15 // Handle CLHEP 2.0.x move to CLHEP namespace
16 namespace CLHEP { }
17 using namespace CLHEP;
18 // ============================================================================/
19 // GaudiAlg
20 // ============================================================================
21 #include "GaudiAlg/TupleObj.h"
22 #include "GaudiAlg/Tuple.h"
23 // ============================================================================
24 // GaudiPython
25 // ============================================================================
26 #include "GaudiPython/Vector.h"
28 // ===========================================================================
34 // ============================================================================
35 namespace
36 {
37  // ==========================================================================
38  template <class TYPE>
39  inline StatusCode _fill ( const Tuples::Tuple& tuple ,
40  const std::string& name ,
41  const TYPE& value )
42  {
43  return tuple.valid() ? tuple->column(name,value) : StatusCode::FAILURE ;
44  }
45  // ==========================================================================
46 }
47 // ============================================================================
49 ( const Tuples::Tuple& tuple )
50 {
51  if ( !tuple.valid() ) { return 0 ; }
52  return tuple->tuple() ;
53 }
54 // ============================================================================
56 ( const Tuples::Tuple& tuple )
57 {
58  if ( !tuple.valid() ) { return 0 ; }
59  return tuple->tuple() ;
60 }
61 // ============================================================================
63 ( const Tuples::Tuple& tuple ) { return tuple.valid() ; }
64 // ============================================================================
66 ( const Tuples::Tuple& tuple )
67 {
68  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
69  return tuple->write();
70 }
71 // ============================================================================
73 ( const Tuples::Tuple& tuple ,
74  const std::string& name ,
75  const int value )
76 { return _fill ( tuple , name , value ) ; }
77 // ============================================================================
79 ( const Tuples::Tuple& tuple ,
80  const std::string& name ,
81  const int value ,
82  const int minv ,
83  const int maxv )
84 {
85  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
86  return tuple -> column ( name , value , minv , maxv ) ;
87 }
88 // ============================================================================
90 ( const Tuples::Tuple& tuple ,
91  const std::string& name ,
92  const double value )
93 { return _fill ( tuple , name , value ) ; }
94 // ============================================================================
96 ( const Tuples::Tuple& tuple ,
97  const std::string& name ,
98  const long long value )
99 { return _fill ( tuple , name , value ) ; }
100 // ============================================================================
102 ( const Tuples::Tuple& tuple ,
103  const std::string& name ,
104  const unsigned long long value )
105 { return _fill ( tuple , name , value ) ; }
106 // ============================================================================
108 ( const Tuples::Tuple& tuple ,
109  const std::string& name ,
110  const bool value )
111 { return _fill ( tuple , name , value ) ; }
112 // ============================================================================
114 ( const Tuples::Tuple& tuple ,
115  const std::string& name ,
116  IOpaqueAddress* value )
117 {
118  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
119  return tuple->column( name , value ) ;
120 }
121 // ============================================================================
123 ( const Tuples::Tuple& tuple ,
124  IOpaqueAddress* value )
125 { return column ( tuple , "Address" , value ) ; }
126 // ============================================================================
128 ( const Tuples::Tuple& tuple ,
129  const std::string& name ,
130  const Gaudi::LorentzVector& value )
131 { return _fill ( tuple , name , value ) ; }
132 // ============================================================================
134 ( const Tuples::Tuple& tuple ,
135  const std::string& name ,
136  const Gaudi::XYZVector& value )
137 { return _fill ( tuple , name , value ) ; }
138 // ============================================================================
140 ( const Tuples::Tuple& tuple ,
141  const std::string& name ,
142  const Gaudi::XYZPoint& value )
143 { return _fill ( tuple , name , value ) ; }
144 // ============================================================================
146 ( const Tuples::Tuple& tuple ,
147  const std::string& name ,
148  const std::vector<double>& data ,
149  const std::string& length ,
150  const size_t maxv )
151 {
152  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
153  return tuple->farray( name , data.begin() , data.end() , length , maxv ) ;
154 }
155 // ============================================================================
157 ( const Tuples::Tuple& tuple ,
158  const std::string& name ,
159  const GaudiPython::Matrix& data ,
160  const Tuples::TupleObj::MIndex cols , // fixed !!!
161  const std::string& length ,
162  const size_t maxv )
163 {
164  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
165  if ( !data.empty() && cols != data.front().size() )
166  { return tuple ->
167  Error ("GP:fmatrix(1): mismatch in matrix dimensions!" ) ; }
168  return tuple->fmatrix( name , data , data.size() , cols , length , maxv ) ;
169 }
170 // ============================================================================
172 ( const Tuples::Tuple& tuple ,
173  const std::string& name ,
175  const std::string& length ,
176  const size_t maxv )
177 {
178  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
179  return tuple->fmatrix ( name , info , length , maxv ) ;
180 }
181 // ============================================================================
183 ( const Tuples::Tuple& tuple ,
184  const std::string& name ,
185  const std::vector<double>& data )
186 {
187  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
188  return tuple->array ( name , data.begin() , data.end() ) ;
189 }
190 // ============================================================================
192 ( const Tuples::Tuple& tuple ,
193  const std::string& name ,
194  const Gaudi::Vector1& data )
195 {
196  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
197  return tuple->array( name , data ) ;
198 }
199 // ============================================================================
201 ( const Tuples::Tuple& tuple ,
202  const std::string& name ,
203  const Gaudi::Vector2& data )
204 {
205  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
206  return tuple->array( name , data ) ;
207 }
208 // ============================================================================
210 ( const Tuples::Tuple& tuple ,
211  const std::string& name ,
212  const Gaudi::Vector3& data )
213 {
214  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
215  return tuple->array( name , data.begin() , data.begin() + 3 ) ;
216 }
217 // ============================================================================
219 ( const Tuples::Tuple& tuple ,
220  const std::string& name ,
221  const Gaudi::Vector4& data )
222 {
223  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
224  // return tuple->array( name , data ) ;
225  return tuple->array( name , data.begin() , data.begin()+4 ) ;
226 }
227 // ============================================================================
229 ( const Tuples::Tuple& tuple ,
230  const std::string& name ,
231  const Gaudi::Vector5& data )
232 {
233  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
234  return tuple->array( name , data ) ;
235 }
236 // ============================================================================
238 ( const Tuples::Tuple& tuple ,
239  const std::string& name ,
240  const Gaudi::Vector6& data )
241 {
242  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
243  return tuple->array( name , data ) ;
244 }
245 // ============================================================================
247 ( const Tuples::Tuple& tuple ,
248  const std::string& name ,
249  const Gaudi::Vector7& data )
250 {
251  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
252  return tuple->array( name , data ) ;
253 }
254 // ============================================================================
256 ( const Tuples::Tuple& tuple ,
257  const std::string& name ,
258  const Gaudi::Vector8& data )
259 {
260  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
261  return tuple->array( name , data ) ;
262 }
263 // ============================================================================
265 ( const Tuples::Tuple& tuple ,
266  const std::string& name ,
267  const Gaudi::Vector9& data )
268 {
269  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
270  return tuple->array( name , data ) ;
271 }
272 // ============================================================================
274 ( const Tuples::Tuple& tuple ,
275  const std::string& name ,
276  const GaudiPython::Matrix& data ,
277  const Tuples::TupleObj::MIndex cols ) // fixed !!!
278 {
279  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
280  if ( data.empty() )
281  { return tuple ->
282  Warning ("GP:matrix(1): empty fixed matrix, skip matrix " ) ; }
283  if ( cols != data.front().size() )
284  { return tuple ->
285  Error ("GP:matrix(1): mismatch in fixed matrix dimensions!" ) ; }
286  return tuple -> matrix ( name , data , data.size() , cols ) ;
287 }
288 // ============================================================================
290 ( const Tuples::Tuple& tuple ,
291  const std::string& name ,
292  const Gaudi::Matrix1x1& data )
293 {
294  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
295  return tuple->matrix ( name , data ) ;
296 }
297 // ============================================================================
299 ( const Tuples::Tuple& tuple ,
300  const std::string& name ,
301  const Gaudi::Matrix2x2& data )
302 {
303  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
304  return tuple->matrix ( name , data ) ;
305 }
306 // ============================================================================
308 ( const Tuples::Tuple& tuple ,
309  const std::string& name ,
310  const Gaudi::Matrix3x3& data )
311 {
312  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
313  return tuple->matrix ( name , data ) ;
314 }
315 // ============================================================================
317 ( const Tuples::Tuple& tuple ,
318  const std::string& name ,
319  const Gaudi::Matrix4x4& data )
320 {
321  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
322  return tuple->matrix ( name , data ) ;
323 }
324 // ============================================================================
326 ( const Tuples::Tuple& tuple ,
327  const std::string& name ,
328  const Gaudi::Matrix5x5& data )
329 {
330  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
331  return tuple->matrix ( name , data ) ;
332 }
333 // ============================================================================
335 ( const Tuples::Tuple& tuple ,
336  const std::string& name ,
337  const Gaudi::Matrix6x6& data )
338 {
339  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
340  return tuple->matrix ( name , data ) ;
341 }
342 // ============================================================================
344 ( const Tuples::Tuple& tuple ,
345  const std::string& name ,
346  const Gaudi::Matrix7x7& data )
347 {
348  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
349  return tuple->matrix ( name , data ) ;
350 }
351 // ============================================================================
353 ( const Tuples::Tuple& tuple ,
354  const std::string& name ,
355  const Gaudi::Matrix8x8& data )
356 {
357  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
358  return tuple->matrix ( name , data ) ;
359 }
360 // ============================================================================
362 ( const Tuples::Tuple& tuple ,
363  const std::string& name ,
364  const Gaudi::Matrix9x9& data )
365 {
366  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
367  return tuple->matrix ( name , data ) ;
368 }
369 // ============================================================================
371 ( const Tuples::Tuple& tuple ,
372  const std::string& name ,
373  const Gaudi::Matrix1x3& data )
374 {
375  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
376  return tuple->matrix ( name , data ) ;
377 }
378 // ============================================================================
380 ( const Tuples::Tuple& tuple ,
381  const std::string& name ,
382  const Gaudi::Matrix1x5& data )
383 {
384  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
385  return tuple->matrix ( name , data ) ;
386 }
387 // ============================================================================
389 ( const Tuples::Tuple& tuple ,
390  const std::string& name ,
391  const Gaudi::Matrix1x6& data )
392 {
393  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
394  return tuple->matrix ( name , data ) ;
395 }
396 // ============================================================================
398 ( const Tuples::Tuple& tuple ,
399  const std::string& name ,
400  const Gaudi::Matrix4x3& data )
401 {
402  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
403  return tuple->matrix ( name , data ) ;
404 }
405 // ============================================================================
407 ( const Tuples::Tuple& tuple ,
408  const std::string& name ,
409  const Gaudi::Matrix3x4& data )
410 {
411  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
412  return tuple->matrix ( name , data ) ;
413 }
414 // ============================================================================
416 ( const Tuples::Tuple& tuple ,
417  const std::string& name ,
418  const Gaudi::Matrix3x5& data )
419 {
420  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
421  return tuple->matrix ( name , data ) ;
422 }
423 // ============================================================================
425 ( const Tuples::Tuple& tuple ,
426  const std::string& name ,
427  const Gaudi::Matrix3x6& data )
428 {
429  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
430  return tuple->matrix ( name , data ) ;
431 }
432 // ============================================================================
434 ( const Tuples::Tuple& tuple ,
435  const std::string& name ,
436  const Gaudi::Matrix2x3& data )
437 {
438  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
439  return tuple->matrix ( name , data ) ;
440 }
441 // ============================================================================
443 ( const Tuples::Tuple& tuple ,
444  const std::string& name ,
445  const Gaudi::Matrix3x2& data )
446 {
447  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
448  return tuple->matrix ( name , data ) ;
449 }
450 // ============================================================================
452 ( const Tuples::Tuple& tuple ,
453  const std::string& name ,
454  const Gaudi::SymMatrix1x1& data )
455 {
456  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
457  return tuple->matrix ( name , data ) ;
458 }
459 // ============================================================================
461 ( const Tuples::Tuple& tuple ,
462  const std::string& name ,
463  const Gaudi::SymMatrix2x2& data )
464 {
465  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
466  return tuple->matrix ( name , data ) ;
467 }
468 // ============================================================================
470 ( const Tuples::Tuple& tuple ,
471  const std::string& name ,
472  const Gaudi::SymMatrix3x3& data )
473 {
474  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
475  return tuple->matrix ( name , data ) ;
476 }
477 // ============================================================================
479 ( const Tuples::Tuple& tuple ,
480  const std::string& name ,
481  const Gaudi::SymMatrix4x4& data )
482 {
483  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
484  return tuple->matrix ( name , data ) ;
485 }
486 // ============================================================================
488 ( const Tuples::Tuple& tuple ,
489  const std::string& name ,
490  const Gaudi::SymMatrix5x5& data )
491 {
492  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
493  return tuple->matrix ( name , data ) ;
494 }
495 // ============================================================================
497 ( const Tuples::Tuple& tuple ,
498  const std::string& name ,
499  const Gaudi::SymMatrix6x6& data )
500 {
501  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
502  return tuple->matrix ( name , data ) ;
503 }
504 // ============================================================================
506 ( const Tuples::Tuple& tuple ,
507  const std::string& name ,
508  const Gaudi::SymMatrix7x7& data )
509 {
510  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
511  return tuple->matrix ( name , data ) ;
512 }
513 // ============================================================================
515 ( const Tuples::Tuple& tuple ,
516  const std::string& name ,
517  const Gaudi::SymMatrix8x8& data )
518 {
519  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
520  return tuple->matrix ( name , data ) ;
521 }
522 // ============================================================================
524 ( const Tuples::Tuple& tuple ,
525  const std::string& name ,
526  const Gaudi::SymMatrix9x9& data )
527 {
528  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
529  return tuple->matrix ( name , data ) ;
530 }
531 // ============================================================================
532 // advanced column: time
533 // ============================================================================
535 ( const Tuples::Tuple& tuple ,
536  const Gaudi::Time& value )
537 { return column ( tuple , "" , value ) ; }
538 // ============================================================================
539 // advanced column: time
540 // ============================================================================
542 ( const Tuples::Tuple& tuple ,
543  const std::string& name ,
544  const Gaudi::Time& value )
545 {
546  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
548  //
549  sc = tuple->column ( name + "year" , value.year ( true ) , 1970 , 2070 ) ;
550  if ( sc.isFailure() ) { return sc ; }
551  sc = tuple->column ( name + "month" , value.month ( true ) + 1 , 1 , 16 ) ;
552  if ( sc.isFailure() ) { return sc ; }
553  sc = tuple->column ( name + "day" , value.day ( true ) , 0 , 32 ) ;
554  if ( sc.isFailure() ) { return sc ; }
555  sc = tuple->column ( name + "hour" , value.hour ( true ) , 0 , 25 ) ;
556  if ( sc.isFailure() ) { return sc ; }
557  sc = tuple->column ( name + "minute" , value.minute ( true ) , 0 , 61 ) ;
558  if ( sc.isFailure() ) { return sc ; }
559  sc = tuple->column ( name + "second" , value.second ( true ) , 0 , 61 ) ;
560  if ( sc.isFailure() ) { return sc ; }
561  sc = tuple->column ( name + "nsecond" , value.nsecond () ) ;
562  //
563  return sc ;
564 }
565 // ============================================================================
566 
567 
568 // ============================================================================
569 // Legacy:
570 // ============================================================================
572 ( const Tuples::Tuple& tuple ,
573  const std::string& name ,
574  const CLHEP::HepVector& data )
575 {
576  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
577  return tuple->array( name , data , data.num_row() ) ;
578 }
579 // ============================================================================
581 ( const Tuples::Tuple& tuple ,
582  const std::string& name ,
583  const CLHEP::HepVector& data ,
584  const std::string& length ,
585  const size_t maxv )
586 {
587  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
588  // use the trick!
589  const double* begin = &(data[0]);
590  const double* end = begin + data.num_row() ;
591  return tuple->farray ( name , begin , end , length , maxv ) ;
592 }
593 // ============================================================================
595 ( const Tuples::Tuple& tuple ,
596  const std::string& name ,
597  const CLHEP::HepGenMatrix& data )
598 {
599  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
600  if ( 1 > data.num_col() )
601  { return tuple ->
602  Error ("GP:matrix(2): illegal fixed matrix num_col" ) ; }
603  if ( 1 > data.num_row() )
604  { return tuple ->
605  Error ("GP:matrix(2): illegal fixed matrix num_row" ) ; }
606  return tuple->matrix( name , data , data.num_row() , data.num_col() ) ;
607 }
608 // ============================================================================
610 ( const Tuples::Tuple& tuple ,
611  const std::string& name ,
612  const CLHEP::HepGenMatrix& data ,
613  const Tuples::TupleObj::MIndex cols , // fixed !!!
614  const std::string& length ,
615  const size_t maxv )
616 {
617  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
618  if ( cols != data.num_col() )
619  { return tuple ->
620  Error ("GP:fmatrix(2): mismatch in matrix dimensions!" ) ; }
621  return tuple->fmatrix( name , data , data.num_row() , cols , length , maxv ) ;
622 }
623 // ============================================================================
624 
625 
626 
627 
628 // ============================================================================
629 // Tuple-Alg-decorator
630 // ============================================================================
632 ( const GaudiTupleAlg& algo ,
633  const std::string& title ,
634  const CLID& clid )
635 {
636  return algo.nTuple ( title , clid ) ;
637 }
638 // ============================================================================
640 ( const GaudiTupleAlg& algo ,
641  const GaudiAlg::TupleID& ID ,
642  const std::string& title ,
643  const CLID& clid )
644 {
645  return algo.nTuple ( ID , title , clid ) ;
646 }
647 // ============================================================================
649 ( const GaudiTupleAlg& algo ,
650  const int ID ,
651  const std::string& title ,
652  const CLID& clid )
653 {
654  return algo.nTuple ( ID , title , clid ) ;
655 }
656 // ============================================================================
658 ( const GaudiTupleAlg& algo ,
659  const std::string& ID ,
660  const std::string& title ,
661  const CLID& clid )
662 {
663  return algo.nTuple ( ID , title , clid ) ;
664 }
665 // ============================================================================
667 ( const GaudiTupleAlg& algo ,
668  const std::string& title ,
669  const CLID& clid )
670 {
671  return algo.evtCol ( title , clid ) ;
672 }
673 // ============================================================================
675 ( const GaudiTupleAlg& algo ,
676  const GaudiAlg::TupleID& ID ,
677  const std::string& title ,
678  const CLID& clid )
679 {
680  return algo.evtCol ( ID , title , clid ) ;
681 }
682 // ============================================================================
684 ( const GaudiTupleAlg& algo ,
685  const int ID ,
686  const std::string& title ,
687  const CLID& clid )
688 {
689  return algo.evtCol ( ID , title , clid ) ;
690 }
691 // ============================================================================
693 ( const GaudiTupleAlg& algo ,
694  const std::string& ID ,
695  const std::string& title ,
696  const CLID& clid )
697 {
698  return algo.evtCol ( ID , title , clid ) ;
699 }
700 // ============================================================================
701 // The END
702 // ============================================================================
ROOT::Math::SMatrix< double, 8, 8 > Matrix8x8
Generic 8x8 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.
int hour(bool local) const
Get the hour, numbered [0, 23].
Definition: Time.cpp:191
ROOT::Math::SMatrix< double, 4, 4 > Matrix4x4
Generic 4x4 matrix (double)
A bit modified version of 'Loki::AssocVector' associative vector from Loki library by Andrei Alexandr...
Definition: VectorMap.h:110
ROOT::Math::SMatrix< double, 8, 8, ROOT::Math::MatRepSym< double, 8 > > SymMatrix8x8
Symmetrix 8x8 matrix (double)
StatusCode matrix(const std::string &name, const MATRIX &data, const MIndex &rows, const MIndex &cols)
fill N-Tuple with fixed-size matrix
Definition: TupleObj.h:1824
ROOT::Math::SMatrix< double, 3, 5 > Matrix3x5
Generic 3x5 matrix (double)
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > SymMatrix5x5
Symmetrix 5x5 matrix (double)
static INTuple * nTuple(const Tuples::Tuple &tuple)
accessors to internal
int day(bool local) const
Get the day of month, numbered [1,31].
Definition: Time.cpp:186
ROOT::Math::SVector< double, 7 > Vector7
7D Vector (double)
Header file for class TupleObj.
int month(bool local) const
Get the month, numbered [0,11].
Definition: Time.cpp:181
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > SymMatrix3x3
Symmetrix 3x3 matrix (double)
static bool valid(const Tuples::Tuple &tuple)
status of the tuple
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::SMatrix< double, 2, 2, ROOT::Math::MatRepSym< double, 2 > > SymMatrix2x2
Symmetrix 2x2 matrix (double)
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.
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, 9, 9 > Matrix9x9
Generic 9x9 matrix (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::SVector< double, 3 > Vector3
3D Vector (double)
ROOT::Math::SMatrix< double, 3, 3 > Matrix3x3
Generic 3x3 matrix (double)
unsigned short MIndex
Definition: TupleObj.h:227
ROOT::Math::SMatrix< double, 3, 2 > Matrix3x2
Generic 3x2 matrix (double)
ROOT::Math::SVector< double, 9 > Vector9
9D Vector (double)
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:203
ROOT::Math::SVector< double, 2 > Vector2
2D Vector (double)
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:85
ROOT::Math::SVector< double, 8 > Vector8
8D Vector (double)
ROOT::Math::SMatrix< double, 7, 7, ROOT::Math::MatRepSym< double, 7 > > SymMatrix7x7
Symmetrix 7x7 matrix (double)
NTuple::Tuple * tuple() const
provide the access to underlying Gaudi N-tuple
Definition: TupleObj.h:2088
ROOT::Math::SMatrix< double, 1, 1 > Matrix1x1
Generic 1x1 matrix (double)
NTuple interface class definition.
Definition: INTuple.h:80
A simple wrapper class over standard Gaudi NTuple::Tuple facility.
Definition: Tuple.h:115
ROOT::Math::SMatrix< double, 3, 6 > Matrix3x6
Generic 3x6 matrix (double)
ROOT::Math::SMatrix< double, 1, 1, ROOT::Math::MatRepSym< double, 1 > > SymMatrix1x1
Symmetrix 1x1 matrix (double)
ROOT::Math::SMatrix< double, 4, 3 > Matrix4x3
Generic 4x3 matrix (double)
ROOT::Math::SMatrix< double, 2, 3 > Matrix2x3
Generic 2x3 matrix (double)
ROOT::Math::SMatrix< double, 1, 6 > Matrix1x6
Generic 1x6 matrix (double)
ROOT::Math::SMatrix< double, 6, 6 > Matrix6x6
Generic 6x6 matrix (double)
static StatusCode column(const Tuples::Tuple &tuple, const std::string &name, const int value)
more or less simple columns: long
Based on seal::Time.
Definition: Time.h:214
static Tuples::Tuple nTuple(const GaudiTupleAlg &algo, const std::string &title, const CLID &clid=CLID_ColumnWiseTuple)
get n-tuple (book-on-demand)
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
static NTuple::Tuple * ntuple(const Tuples::Tuple &tuple)
accessors to internal
StatusCode column(const std::string &name, const float value)
Set the value for selected tuple column.
Definition: TupleObj.cpp:337
ROOT::Math::SMatrix< double, 5, 5 > Matrix5x5
Generic 5x5 matrix (double)
Tuple nTuple(const std::string &title, const CLID &clid=CLID_ColumnWiseTuple) const
Access an N-Tuple object (book on-demand) with unique identifier.
bool valid() const
check the validity of the tuple object
Definition: Tuple.h:143
ROOT::Math::SMatrix< double, 7, 7 > Matrix7x7
Generic 7x7 matrix (double)
StatusCode write()
write a record to NTuple
Definition: TupleObj.cpp:240
unsigned int CLID
Class ID definition.
Definition: ClassID.h:9
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > SymMatrix6x6
Symmetrix 6x6 matrix (double)
ROOT::Math::SVector< double, 6 > Vector6
6D Vector (double)
Abstract base class which allows the user to interact with the actual N tuple implementation.
Definition: NTuple.h:367
tuple end
Definition: IOTest.py:101
std::vector< Row > Matrix
Definition: Vector.h:23
ROOT::Math::SMatrix< double, 1, 5 > Matrix1x5
Generic 1x5 matrix (double)
ROOT::Math::SMatrix< double, 2, 2 > Matrix2x2
Generic 2x2 matrix (double)
StatusCode array(const std::string &name, DATA first, DATA last)
fill N-Tuple with fixed-size array
Definition: TupleObj.h:1659
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
static StatusCode write(const Tuples::Tuple &tuple)
commit the row
ROOT::Math::SVector< double, 4 > Vector4
4D Vector (double)
static Tuples::Tuple evtCol(const GaudiTupleAlg &algo, const std::string &title, const CLID &clid=CLID_ColumnWiseTuple)
get n-tuple (book-on-demand)
ROOT::Math::SMatrix< double, 1, 3 > Matrix1x3
Generic 1x3 matrix (double)
ROOT::Math::SMatrix< double, 9, 9, ROOT::Math::MatRepSym< double, 9 > > SymMatrix9x9
Symmetrix 9x9 matrix (double)
ROOT::Math::PxPyPzEVector LorentzVector
Cartesian 4 Vector.
Definition: Vector4DTypes.h:34
int nsecond(void) const
Get the nanoseconds.
Definition: Time.cpp:210
ROOT::Math::SMatrix< double, 3, 4 > Matrix3x4
Generic 3x4 matrix (double)
Opaque address interface definition.
Simple class to extend the functionality of class GaudiHistoAlg.
Definition: GaudiTupleAlg.h:42
int year(bool local) const
Get the year.
Definition: Time.cpp:176
static StatusCode array(const Tuples::Tuple &tuple, const std::string &name, const std::vector< double > &data)
Advanced columns: fixed size arrays.
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.
Definition: TupleObj.h:880
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.
Definition: TupleObj.h:1394
ROOT::Math::SVector< double, 5 > Vector5
5D Vector (double)
ID class for Histogram and Ntuples.
Definition: GaudiHistoID.h:46
Header file for class : Tuple.
ROOT::Math::SVector< double, 1 > Vector1
1D Vector (double)
int minute(bool local) const
Get the minute, numbered [0, 59].
Definition: Time.cpp:196
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > SymMatrix4x4
Symmetrix 4x4 matrix (double)