ATLAS Offline Software
Loading...
Searching...
No Matches
HyfPar.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 HyfPar, which is used
8// to modify HYFPAR common.
9
10#ifndef HyfPar_h
11#define HyfPar_h
12
13#include <cstdint>
14
15extern "C" { uintptr_t hyfpar_address_(); }
16
17class HyfPar {
18public:
19 HyfPar();
20 ~HyfPar();
21
22 double& bgen (void);
23 double& nbcol (void);
24 double& npart (void);
25 int& npyt (void);
26 int& nhyd (void);
27
28 void init (void);
29
30private:
31
32 struct HYFPAR;
33 friend struct HYFPAR;
34
35 struct HYFPAR
36 {
37 double bgen;
38 double nbcol;
39 double npart;
40 int npyt;
41 int nhyd;
42 };
43
45};
46
47// set pointer to zero at start
49
50inline void
52{ if (!s_hyfpar) s_hyfpar = reinterpret_cast<HYFPAR*>(hyfpar_address_()); }
53
54// Constructor
55inline
58
59// Destructor
60inline
63
64inline double&
66{
67 init();
68 return s_hyfpar->bgen;
69}
70
71inline double&
73{
74 init();
75 return s_hyfpar->nbcol;
76}
77
78inline double&
80{
81 init();
82 return s_hyfpar->npart;
83}
84
85inline int&
87{
88 init();
89 return s_hyfpar->npyt;
90}
91
92inline int&
94{
95 init();
96 return s_hyfpar->nhyd;
97}
98
99#endif
uintptr_t hyfpar_address_()
int & npyt(void)
Definition HyfPar.h:86
void init(void)
Definition HyfPar.h:51
int & nhyd(void)
Definition HyfPar.h:93
double & npart(void)
Definition HyfPar.h:79
double & bgen(void)
Definition HyfPar.h:65
~HyfPar()
Definition HyfPar.h:61
static HYFPAR * s_hyfpar
Definition HyfPar.h:44
double & nbcol(void)
Definition HyfPar.h:72
HyfPar()
Definition HyfPar.h:56
double nbcol
Definition HyfPar.h:38
double bgen
Definition HyfPar.h:37
double npart
Definition HyfPar.h:39