The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
ExtendedProperties2.cpp
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2024 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// ============================================================================
12// Include files
13// ============================================================================
14// STD & STL
15// ============================================================================
16#include <map>
17#include <string>
18#include <utility>
19#include <vector>
20// ============================================================================
21// GaudiKernel
22// ============================================================================
28// ============================================================================
31// ============================================================================
33// ============================================================================
34
41// ============================================================================
42namespace Gaudi {
43 // ==========================================================================
44 namespace TestSuite {
45 // ========================================================================
52 public:
53 // ======================================================================
54 StatusCode execute() override;
55 // ======================================================================
56 public:
57 // ======================================================================
62 ExtendedProperties2( const std::string& name, ISvcLocator* pSvc ) : TestAlg( name, pSvc ) {
63 setProperty( "PropertiesPrint", true ).ignore();
64 }
65 // ======================================================================
66 private:
67 // ======================================================================
68 Gaudi::Property<Gaudi::XYZPoint> m_point3D{ this, "Point3D", { 0, 1, 2 }, "3D-point" };
69 Gaudi::Property<Gaudi::XYZVector> m_vector3D{ this, "Vector3D", { 1, 2, 3 }, "3D-vector" };
70 Gaudi::Property<Gaudi::LorentzVector> m_vector4D{ this, "Vector4D", { 1, 2, 3, 4 }, "Lorentz-vector" };
71 Gaudi::Property<Gaudi::Vector5> m_vector5{ this, "SVector5", {}, "Generic-vector" };
72 Gaudi::Property<std::vector<Gaudi::XYZPoint>> m_points{ this, "Points3D", {}, "Vector of 3D-points" };
73 Gaudi::Property<std::vector<Gaudi::XYZVector>> m_vectors{ this, "Vectors3D", {}, "Vector of 3D-vectors" };
74 Gaudi::Property<std::vector<Gaudi::LorentzVector>> m_lvs{ this, "Vectors4D", {}, "Vector of 4D-vectors" };
75 // ======================================================================
76 };
77 // ========================================================================
78 } // namespace TestSuite
79 // ==========================================================================
80} // end of namespace Gaudi
81// ============================================================================
83 always() << "3D-Point : " << Gaudi::Utils::toString( m_point3D.value() ) << endmsg;
84 always() << "3D-Vector: " << Gaudi::Utils::toString( m_vector3D.value() ) << endmsg;
85 always() << "4D-Vector: " << Gaudi::Utils::toString( m_vector4D.value() ) << endmsg;
86 always() << " 5-Vector: " << Gaudi::Utils::toString( m_vector5.value() ) << endmsg;
87
88 always() << "Vector of 3D-Points " << Gaudi::Utils::toString( m_points.value() ) << endmsg;
89 always() << "Vector of 3D-Vectors " << Gaudi::Utils::toString( m_vectors.value() ) << endmsg;
90 always() << "Vector of 4D-Vectors " << Gaudi::Utils::toString( m_lvs.value() ) << endmsg;
91
93}
94// ============================================================================
95// the factory
96// ============================================================================
99// ============================================================================
100// The END
101// ============================================================================
bool PyHelper setProperty(IInterface *p, char *name, char *value)
General vectors.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition MsgStream.h:198
#define DECLARE_COMPONENT(type)
3D point typedefs
4D point typedefs
Declaration of parsing functions for generic vectors to allow their usage as properties for Gaudi com...
Declaration of parsing functions for various ROOT::Math objects to allow their usage as properties fo...
MsgStream & always() const
shortcut for the method msgStream(MSG::ALWAYS)
const std::string & name() const override
The identifying name of the algorithm object.
Implementation of property with value of concrete type.
Definition PropertyFwd.h:27
simple DEMO-file for "extended vector properties",
ExtendedProperties2(const std::string &name, ISvcLocator *pSvc)
standard constructor
Gaudi::Property< Gaudi::LorentzVector > m_vector4D
Gaudi::Property< Gaudi::Vector5 > m_vector5
Gaudi::Property< Gaudi::XYZVector > m_vector3D
Gaudi::Property< std::vector< Gaudi::XYZVector > > m_vectors
Gaudi::Property< std::vector< Gaudi::XYZPoint > > m_points
Gaudi::Property< std::vector< Gaudi::LorentzVector > > m_lvs
Gaudi::Property< Gaudi::XYZPoint > m_point3D
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition ISvcLocator.h:42
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
constexpr static const auto SUCCESS
Definition StatusCode.h:99
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition ToStream.h:326
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition __init__.py:1
Simple algorithm useful as base class for tests.
Definition TestAlg.h:19