Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DReaction_factory_b1pi_hists.h
Go to the documentation of this file.
1 #ifndef _DReaction_factory_b1pi_hists_
2 #define _DReaction_factory_b1pi_hists_
3 
4 #include "JANA/JFactory.h"
5 #include "JANA/JEventLoop.h"
6 
7 #include "particleType.h"
8 
9 #include "ANALYSIS/DReaction.h"
10 #include "ANALYSIS/DReactionStep.h"
12 #include "ANALYSIS/DCutActions.h"
13 
14 using namespace std;
15 using namespace jana;
16 
17 class DReaction_factory_b1pi_hists : public jana::JFactory<DReaction>
18 {
19  public:
20  DReaction_factory_b1pi_hists(){SetFactoryFlag(PERSISTANT);}; // Setting the PERSISTANT prevents JANA from deleting the objects every event so we only create them once.
22  const char* Tag(void){return "b1pi_hists";}
23 
24  private:
25  jerror_t init(void); ///< Called once at program start.
26  jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber); ///< Called everytime a new run number is detected.
27  jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber); ///< Called every event.
28  jerror_t erun(void); ///< Called everytime run number changes, provided brun has been called.
29  jerror_t fini(void); ///< Called after last event of last event source has been processed.
30 
31  deque<DReactionStep*> dReactionStepPool; //to prevent memory leaks!
32 };
33 
34 #endif // _DReaction_factory_b1pi_hists_
35 
deque< DReactionStep * > dReactionStepPool