GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RunningThreadInfo.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::RunningThreadInfo
5 
6 \brief Keep info on the event generation thread currently on charge.
7  This is used so that event generation modules invoked by the thread
8  can see the "bigger picture" and access the cross section model for
9  the thread, look-up info for modules that run before or are scheduled
10  to run after etc.
11 
12 \author Costas Andreopoulos <c.andreopoulos \at cern.ch>
13  University of Liverpool
14 
15 \created May 06, 2004
16 
17 \cpright Copyright (c) 2003-2024, The GENIE Collaboration
18  For the full text of the license visit http://copyright.genie-mc.org
19 */
20 //____________________________________________________________________________
21 
22 #ifndef _RUNNING_THREAD_INFO_H_
23 #define _RUNNING_THREAD_INFO_H_
24 
25 namespace genie {
26 
27 class EventGeneratorI;
28 
30 {
31 public:
32  static RunningThreadInfo * Instance(void);
33 
35  {
36  return fRunningThread;
37  }
39  {
40  fRunningThread = evg;
41  }
42 
43 private:
46  virtual ~RunningThreadInfo();
47 
48  //! self
50 
51  //! current thread
53 
54  //! clean
55  struct Cleaner {
61  }
62  }
63  };
64  friend struct Cleaner;
65 };
66 
67 } // genie namespace
68 
69 #endif // _RUNNING_THREAD_INFO_H_
Defines the EventGeneratorI interface.
const EventGeneratorI * fRunningThread
current thread
static RunningThreadInfo * Instance(void)
void UpdateRunningThread(const EventGeneratorI *evg)
const EventGeneratorI * RunningThread(void)
Keep info on the event generation thread currently on charge. This is used so that event generation m...
static RunningThreadInfo * fInstance
self