ATLAS Offline Software
PyqPar.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //
6 // Description:
7 // Class definition for PyqPar, which is used
8 // to modify PYQPAR common.
9 
10 #ifndef PyqPar_h
11 #define PyqPar_h
12 
13 #include <cstdint>
14 
15 extern "C" { uintptr_t pyqpar_address_(); }
16 
17 class PyqPar {
18 public:
19  PyqPar();
20  ~PyqPar();
21 
22  double& t0 (void);
23  double& tau0 (void);
24  int& nf (void);
25  int& ienglu (void);
26  int& ianglu (void);
27 
28  void init (void);
29 
30 private:
31 
32  struct PYQPAR;
33  friend struct PYQPAR;
34 
35  struct PYQPAR
36  {
37  double t0;
38  double tau0;
39  int nf;
40  int ienglu;
41  int ianglu;
42  };
43 
44  static PYQPAR* s_pyqpar;
45 };
46 
47 // set pointer to zero at start
49 
50 inline void
52 { if (!s_pyqpar) s_pyqpar = reinterpret_cast<PYQPAR*>(pyqpar_address_()); }
53 
54 // Constructor
55 inline
57 {}
58 
59 // Destructor
60 inline
62 {}
63 
64 inline double&
65 PyqPar::t0 (void)
66 {
67  init();
68  return s_pyqpar->t0;
69 }
70 
71 inline double&
73 {
74  init();
75  return s_pyqpar->tau0;
76 }
77 
78 inline int&
79 PyqPar::nf (void)
80 {
81  init();
82  return s_pyqpar->nf;
83 }
84 
85 inline int&
87 {
88  init();
89  return s_pyqpar->ienglu;
90 }
91 
92 inline int&
94 {
95  init();
96  return s_pyqpar->ianglu;
97 }
98 
99 #endif
PyqPar::PYQPAR::t0
double t0
Definition: PyqPar.h:37
PyqPar::s_pyqpar
static PYQPAR * s_pyqpar
Definition: PyqPar.h:44
PyqPar::tau0
double & tau0(void)
Definition: PyqPar.h:72
PyqPar::init
void init(void)
Definition: PyqPar.h:51
PyqPar::PyqPar
PyqPar()
Definition: PyqPar.h:56
PyqPar::PYQPAR::tau0
double tau0
Definition: PyqPar.h:38
PyqPar::PYQPAR::nf
int nf
Definition: PyqPar.h:39
PyqPar
Definition: PyqPar.h:17
PyqPar::ienglu
int & ienglu(void)
Definition: PyqPar.h:86
pyqpar_address_
uintptr_t pyqpar_address_()
PyqPar::PYQPAR::ianglu
int ianglu
Definition: PyqPar.h:41
PyqPar::ianglu
int & ianglu(void)
Definition: PyqPar.h:93
PyqPar::PYQPAR
Definition: PyqPar.h:36
PyqPar::PYQPAR::ienglu
int ienglu
Definition: PyqPar.h:40
PyqPar::t0
double & t0(void)
Definition: PyqPar.h:65
PyqPar::~PyqPar
~PyqPar()
Definition: PyqPar.h:61
PyqPar::nf
int & nf(void)
Definition: PyqPar.h:79