File indexing completed on 2025-01-18 09:57:45
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #pragma once
0012
0013 #include <GaudiAlg/GaudiTupleAlg.h>
0014 #include <GaudiAlg/ITupleTool.h>
0015 #include <GaudiAlg/Tuple.h>
0016 #include <GaudiAlg/TupleID.h>
0017 #include <GaudiAlg/TupleObj.h>
0018 #include <GaudiAlg/Tuples.h>
0019 #include <GaudiKernel/GenericMatrixTypes.h>
0020 #include <GaudiKernel/GenericVectorTypes.h>
0021 #include <GaudiKernel/Point3DTypes.h>
0022 #include <GaudiKernel/Point4DTypes.h>
0023 #include <GaudiKernel/SymmetricMatrixTypes.h>
0024 #include <GaudiKernel/Time.h>
0025 #include <GaudiKernel/Vector3DTypes.h>
0026 #include <GaudiKernel/Vector4DTypes.h>
0027 #include <GaudiPython/Vector.h>
0028
0029 namespace CLHEP {
0030 class HepGenMatrix;
0031 class HepVector;
0032 }
0033
0034 namespace GaudiPython {
0035
0036
0037
0038
0039
0040
0041
0042 class GAUDI_API TupleDecorator {
0043 public:
0044
0045
0046 static INTuple* nTuple( const Tuples::Tuple& tuple );
0047
0048
0049 static NTuple::Tuple* ntuple( const Tuples::Tuple& tuple );
0050
0051
0052 static bool valid( const Tuples::Tuple& tuple );
0053
0054
0055 static StatusCode write( const Tuples::Tuple& tuple );
0056
0057 public:
0058
0059
0060 static StatusCode column( const Tuples::Tuple& tuple, const std::string& name, const int value );
0061
0062
0063 static StatusCode column( const Tuples::Tuple& tuple, const std::string& name, const int value, const int minv,
0064 const int maxv );
0065
0066
0067 static StatusCode column( const Tuples::Tuple& tuple, const std::string& name, const double value );
0068
0069
0070 static StatusCode column( const Tuples::Tuple& tuple, const std::string& name, const bool value );
0071
0072
0073 static StatusCode column_ll( const Tuples::Tuple& tuple, const std::string& name, const long long value );
0074
0075
0076 static StatusCode column_ull( const Tuples::Tuple& tuple, const std::string& name, const unsigned long long value );
0077
0078 public:
0079
0080
0081 static StatusCode column( const Tuples::Tuple& tuple, const std::string& name, IOpaqueAddress* value );
0082
0083
0084 static StatusCode column( const Tuples::Tuple& tuple, IOpaqueAddress* value );
0085
0086 public:
0087
0088
0089 static StatusCode column( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::LorentzVector& value );
0090
0091 public:
0092
0093
0094 static StatusCode column( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::XYZVector& value );
0095
0096
0097 static StatusCode column( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::XYZPoint& value );
0098
0099 public:
0100
0101
0102 static StatusCode farray( const Tuples::Tuple& tuple, const std::string& name, const std::vector<double>& data,
0103 const std::string& length, const size_t maxv );
0104
0105 public:
0106
0107
0108 static StatusCode fmatrix( const Tuples::Tuple& tuple, const std::string& name, const GaudiPython::Matrix& data,
0109 const Tuples::TupleObj::MIndex cols,
0110 const std::string& length, const size_t maxv );
0111
0112
0113 static StatusCode fmatrix( const Tuples::Tuple& tuple, const std::string& name,
0114 const GaudiUtils::VectorMap<int, double>& info, const std::string& length,
0115 const size_t maxv );
0116
0117 public:
0118
0119
0120 static StatusCode array( const Tuples::Tuple& tuple, const std::string& name, const std::vector<double>& data );
0121
0122
0123 static StatusCode array( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Vector1& data );
0124
0125
0126 static StatusCode array( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Vector2& data );
0127
0128
0129 static StatusCode array( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Vector3& data );
0130
0131
0132 static StatusCode array( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Vector4& data );
0133
0134
0135 static StatusCode array( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Vector5& data );
0136
0137 public:
0138
0139
0140 static StatusCode array( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Vector6& data );
0141
0142
0143 static StatusCode array( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Vector7& data );
0144
0145
0146 static StatusCode array( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Vector8& data );
0147
0148
0149 static StatusCode array( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Vector9& data );
0150
0151
0152 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const GaudiPython::Matrix& data,
0153 const Tuples::TupleObj::MIndex cols );
0154
0155
0156 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Matrix2x2& value );
0157
0158
0159 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Matrix3x3& value );
0160
0161
0162 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Matrix4x4& value );
0163
0164
0165 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Matrix5x5& value );
0166
0167
0168 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Matrix6x6& value );
0169
0170
0171 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Matrix7x7& value );
0172
0173
0174 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Matrix8x8& value );
0175
0176
0177 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Matrix9x9& value );
0178
0179
0180 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Matrix1x1& value );
0181
0182
0183 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Matrix1x3& value );
0184
0185
0186 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Matrix1x5& value );
0187
0188
0189 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Matrix1x6& value );
0190
0191
0192 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Matrix4x3& value );
0193
0194
0195 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Matrix3x4& value );
0196
0197
0198 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Matrix3x5& value );
0199
0200
0201 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Matrix3x6& value );
0202
0203
0204 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Matrix2x3& value );
0205
0206
0207 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Matrix3x2& value );
0208
0209
0210 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::SymMatrix1x1& value );
0211
0212
0213 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::SymMatrix2x2& value );
0214
0215
0216 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::SymMatrix3x3& value );
0217
0218
0219 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::SymMatrix4x4& value );
0220
0221
0222 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::SymMatrix5x5& value );
0223
0224
0225 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::SymMatrix6x6& value );
0226
0227
0228 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::SymMatrix7x7& value );
0229
0230
0231 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::SymMatrix8x8& value );
0232
0233
0234 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::SymMatrix9x9& value );
0235
0236 public:
0237
0238
0239 static StatusCode column( const Tuples::Tuple& tuple, const std::string& name, const Gaudi::Time& value );
0240
0241 static StatusCode column( const Tuples::Tuple& tuple, const Gaudi::Time& value );
0242
0243 public:
0244
0245
0246 static StatusCode array( const Tuples::Tuple& tuple, const std::string& name, const CLHEP::HepVector& data );
0247
0248 static StatusCode farray( const Tuples::Tuple& tuple, const std::string& name, const CLHEP::HepVector& data,
0249 const std::string& length, const size_t maxv );
0250
0251 static StatusCode matrix( const Tuples::Tuple& tuple, const std::string& name, const CLHEP::HepGenMatrix& data );
0252
0253 static StatusCode fmatrix( const Tuples::Tuple& tuple, const std::string& name, const CLHEP::HepGenMatrix& data,
0254 const Tuples::TupleObj::MIndex cols,
0255 const std::string& length, const size_t maxv );
0256
0257 };
0258
0259
0260
0261
0262
0263
0264 class GAUDI_API TupleAlgDecorator {
0265 public:
0266
0267
0268 static Tuples::Tuple nTuple( const GaudiTupleAlg& algo, const std::string& title,
0269 const CLID& clid = CLID_ColumnWiseTuple );
0270
0271
0272 static Tuples::Tuple nTuple( const GaudiTupleAlg& algo, const GaudiAlg::TupleID& ID, const std::string& title,
0273 const CLID& clid = CLID_ColumnWiseTuple );
0274
0275
0276 static Tuples::Tuple nTuple( const GaudiTupleAlg& algo, const int ID, const std::string& title,
0277 const CLID& clid = CLID_ColumnWiseTuple );
0278
0279
0280 static Tuples::Tuple nTuple( const GaudiTupleAlg& algo, const std::string& ID, const std::string& title,
0281 const CLID& clid = CLID_ColumnWiseTuple );
0282
0283
0284 static Tuples::Tuple evtCol( const GaudiTupleAlg& algo, const std::string& title,
0285 const CLID& clid = CLID_ColumnWiseTuple );
0286
0287
0288 static Tuples::Tuple evtCol( const GaudiTupleAlg& algo, const GaudiAlg::TupleID& ID, const std::string& title,
0289 const CLID& clid = CLID_ColumnWiseTuple );
0290
0291
0292 static Tuples::Tuple evtCol( const GaudiTupleAlg& algo, const int ID, const std::string& title,
0293 const CLID& clid = CLID_ColumnWiseTuple );
0294
0295
0296 static Tuples::Tuple evtCol( const GaudiTupleAlg& algo, const std::string& ID, const std::string& title,
0297 const CLID& clid = CLID_ColumnWiseTuple );
0298
0299 };
0300
0301
0302
0303
0304
0305
0306 class GAUDI_API TupleToolDecorator {
0307 public:
0308
0309
0310 static Tuples::Tuple nTuple( const ITupleTool& tool, const std::string& title,
0311 const CLID& clid = CLID_ColumnWiseTuple ) {
0312 return tool.nTuple( title, clid );
0313 }
0314
0315
0316 static Tuples::Tuple nTuple( const ITupleTool& tool, const GaudiAlg::TupleID& ID, const std::string& title,
0317 const CLID& clid = CLID_ColumnWiseTuple ) {
0318 return tool.nTuple( ID, title, clid );
0319 }
0320
0321
0322 static Tuples::Tuple nTuple( const ITupleTool& tool, const int ID, const std::string& title,
0323 const CLID& clid = CLID_ColumnWiseTuple ) {
0324 return tool.nTuple( ID, title, clid );
0325 }
0326
0327
0328 static Tuples::Tuple nTuple( const ITupleTool& tool, const std::string& ID, const std::string& title,
0329 const CLID& clid = CLID_ColumnWiseTuple ) {
0330 return tool.nTuple( ID, title, clid );
0331 }
0332
0333
0334 static Tuples::Tuple evtCol( const ITupleTool& tool, const std::string& title,
0335 const CLID& clid = CLID_ColumnWiseTuple ) {
0336 return tool.evtCol( title, clid );
0337 }
0338
0339
0340 static Tuples::Tuple evtCol( const ITupleTool& tool, const GaudiAlg::TupleID& ID, const std::string& title,
0341 const CLID& clid = CLID_ColumnWiseTuple ) {
0342 return tool.nTuple( ID, title, clid );
0343 }
0344
0345
0346 static Tuples::Tuple evtCol( const ITupleTool& tool, const int ID, const std::string& title,
0347 const CLID& clid = CLID_ColumnWiseTuple ) {
0348 return tool.nTuple( ID, title, clid );
0349 }
0350
0351
0352 static Tuples::Tuple evtCol( const ITupleTool& tool, const std::string& ID, const std::string& title,
0353 const CLID& clid = CLID_ColumnWiseTuple ) {
0354 return tool.nTuple( ID, title, clid );
0355 }
0356
0357 };
0358
0359 }