DD4hep  1.28.0
Detector Description Toolkit for High Energy Physics
ParsersObjects_XYZPoint.cpp
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 //==========================================================================
11 //==========================================================================
12 // Include files
13 //==========================================================================
14 #ifndef DD4HEP_PARSERS_NO_ROOT
15 #include "Parsers/spirit/ParsersStandardListCommon.h"
16 
17 namespace ROOT { namespace Math {
18  bool operator<(const XYZPoint& a, const XYZPoint& b) {
19  if ( a.X() < b.X() ) return true;
20  if ( a.Y() < b.Y() ) return true;
21  if ( a.Z() < b.Z() ) return true;
22  return false;
23  }
24  }}
25 // ============================================================================
26 namespace dd4hep {
27  namespace Parsers {
28 
29  // ==========================================================================
30  template <> int parse(ROOT::Math::XYZPoint& result,const std::string& input) {
31  return parse_(result, input);
32  }
33  // ==========================================================================
34  /* parse the vector of points
35  * @param resut (OUTPUT) the parser vector
36  * @param input (INPIUT) the string to be parsed
37  * @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
38  * @date 2009-09-05
39  */
40  // ==========================================================================
41  IMPLEMENT_STL_PARSERS(ROOT::Math::XYZPoint)
42  IMPLEMENT_MAPPED_PARSERS(pair,ROOT::Math::XYZPoint)
43  }
44 }
45 #endif
46 
dd4hep::Parsers::parse
int parse(Property &result, const std::string &input)
Definition: ComponentProperties.cpp:187
ROOT::Math::operator<
bool operator<(const XYZPoint &a, const XYZPoint &b)
Allow point insertion of a point in maps.
Definition: ParsersObjects_XYZPoint.cpp:18
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
ROOT
ROOT include files.
Definition: Objects.h:508