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