GENIEGenerator
Loading...
Searching...
No Matches
Pythia8Singleton.h
Go to the documentation of this file.
1//____________________________________________________________________________
2/*!
3
4\class genie::Pythia8Singleton
5
6\brief Manage a single instance of pythia8
7
8\author Robert Hatcher <rhatcher \at fnal.gov>
9 Fermilab
10
11\created May 15, 2024
12
13\cpright Copyright (c) 2003-2025, The GENIE Collaboration
14 For the full text of the license visit http://copyright.genie-mc.org
15*/
16//____________________________________________________________________________
17
18#ifndef _PYTHIA8SINGLETON_H_
19#define _PYTHIA8SINGLETON_H_
20
21#ifdef __GENIE_PYTHIA8_ENABLED__
22#include "Pythia8/Pythia.h"
23#endif // __GENIE_PYTHIA8_ENABLED__
24
25namespace genie {
26
28
29//ostream & operator << (ostream & stream, const Pythia8Singleton & pythia8_1);
30
32{
33public:
34
35 static Pythia8Singleton * Instance(void);
36
37#ifdef __GENIE_PYTHIA8_ENABLED__
38 Pythia8::Pythia * Pythia8() { return fPythia; }
39#endif // __GENIE_PYTHIA8_ENABLED__
40
41 //! print
42 //void Print (ostream & stream) const;
43 //friend ostream & operator << (ostream & stream, const Pythia8Singleton & pythia8_1);
44
45private:
46
47 //! singleton instance
49
50#ifdef __GENIE_PYTHIA8_ENABLED__
51 mutable Pythia8::Pythia * fPythia; ///< actual Pythia8 instance
52#endif // __GENIE_PYTHIA8_ENABLED__
53
54 //! singleton class: constructors are private
57 virtual ~Pythia8Singleton();
58
59 //! proper de-allocation of the singleton object
69 friend struct Cleaner;
70};
71
72} // genie namespace
73
74#endif // _PYTHIA8SINGLETON_H_
Manage a single instance of pythia8.
static Pythia8Singleton * fInstance
print
Pythia8Singleton()
singleton class: constructors are private
static Pythia8Singleton * Instance(void)
Pythia8Singleton(const Pythia8Singleton &cache)
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25
proper de-allocation of the singleton object