CLHEP_ps.h
Go to the documentation of this file.
1 #ifndef art_Utilities_ParameterSetHelpers_CLHEP_ps_h
2 #define art_Utilities_ParameterSetHelpers_CLHEP_ps_h
3 
4 #include "CLHEP/Vector/LorentzVector.h"
5 #include "CLHEP/Vector/ThreeVector.h"
6 #include "CLHEP/Vector/TwoVector.h"
7 #include "fhiclcpp/coding.h"
8 
9 namespace CLHEP {
10 
11  inline void
12  decode(std::any const& a, Hep2Vector& result)
13  {
14  std::array<double, 2> tmp = {{0.}};
15  fhicl::detail::decode(a, tmp);
16  result.setX(tmp.at(0));
17  result.setY(tmp.at(1));
18  }
19 
20  inline void
21  decode(std::any const& a, Hep3Vector& result)
22  {
23  std::array<double, 3> tmp = {{0.}};
24  fhicl::detail::decode(a, tmp);
25  result.setX(tmp.at(0));
26  result.setY(tmp.at(1));
27  result.setZ(tmp.at(2));
28  }
29 
30  inline void
31  decode(std::any const& a, HepLorentzVector& result)
32  {
33  std::array<double, 4> tmp = {{0.}};
34  fhicl::detail::decode(a, tmp);
35  result.setX(tmp.at(0));
36  result.setY(tmp.at(1));
37  result.setZ(tmp.at(2));
38  result.setT(tmp.at(3));
39  }
40 
41 } // namespace CLHEP
42 
43 // Local variables:
44 // mode: c++
45 // End:
46 
47 #endif /* art_Utilities_ParameterSetHelpers_CLHEP_ps_h */
static QCString result
void decode(std::any const &, std::string &)
const double a
string tmp
Definition: languages.py:63
void decode(std::any const &a, Hep2Vector &result)
Definition: CLHEP_ps.h:12