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 <costas.andreopoulos \at stfc.ac.uk>
13  University of Liverpool & STFC Rutherford Appleton Lab
14 
15 \created May 06, 2004
16 
17 \cpright Copyright (c) 2003-2019, The GENIE Collaboration
18  For the full text of the license visit http://copyright.genie-mc.org
19  or see $GENIE/LICENSE
20 */
21 //____________________________________________________________________________
22 
23 #ifndef _RUNNING_THREAD_INFO_H_
24 #define _RUNNING_THREAD_INFO_H_
25 
26 namespace genie {
27 
28 class EventGeneratorI;
29 
31 {
32 public:
33  static RunningThreadInfo * Instance(void);
34 
36  {
37  return fRunningThread;
38  }
40  {
41  fRunningThread = evg;
42  }
43 
44 private:
47  virtual ~RunningThreadInfo();
48 
49  //! self
51 
52  //! current thread
54 
55  //! clean
56  struct Cleaner {
62  }
63  }
64  };
65  friend struct Cleaner;
66 };
67 
68 } // genie namespace
69 
70 #endif // _RUNNING_THREAD_INFO_H_
const XML_Char XML_Encoding * info
Definition: expat.h:530
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
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