Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DReaction_factory_Thrown.h
Go to the documentation of this file.
1 #ifndef _DReaction_factory_Thrown_
2 #define _DReaction_factory_Thrown_
3 
4 #include <iostream>
5 #include <deque>
6 
7 #include "JANA/JFactory.h"
8 #include "particleType.h"
9 
10 #include "ANALYSIS/DReaction.h"
11 #include "PID/DMCReaction.h"
12 #include "TRACKING/DMCThrown.h"
14 
15 using namespace jana;
16 using namespace std;
17 using namespace DAnalysis;
18 
19 class DAnalysisUtilities;
20 
21 class DReaction_factory_Thrown:public jana::JFactory<DReaction>
22 {
23  public:
24  DReaction_factory_Thrown(){use_factory = 1;}; //prevents JANA from searching the input file for these objects
26  const char* Tag(void){return "Thrown";}
27 
28  DReaction* Build_ThrownReaction(JEventLoop* locEventLoop, deque<pair<const DMCThrown*, deque<const DMCThrown*> > >& locThrownSteps);
29 
30  void Recycle_Reaction(DReaction* locReaction); //deletes reaction, but recycles steps
31 
32  private:
33  jerror_t init(void); ///< Called once at program start.
34  jerror_t brun(jana::JEventLoop *locEventLoop, int32_t runnumber); ///< Called everytime a new run number is detected.
35  jerror_t evnt(jana::JEventLoop *locEventLoop, uint64_t eventnumber); ///< Called every event.
36  jerror_t erun(void); ///< Called everytime run number changes, provided brun has been called.
37  jerror_t fini(void); ///< Called after last event of last event source has been processed.
38 
39  const DAnalysisUtilities* dAnalysisUtilities = nullptr;
40 
41  DReactionStep* Get_ReactionStepResource(void);
42 
43  deque<DReactionStep*> dReactionStepPool_All;
44  deque<DReactionStep*> dReactionStepPool_Available;
45 
46  size_t MAX_dReactionStepPoolSize = 10;
47 };
48 
49 #endif // _DReaction_factory_Thrown_
50 
deque< DReactionStep * > dReactionStepPool_All
deque< DReactionStep * > dReactionStepPool_Available