Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DEventWriterEVIO_factory.h
Go to the documentation of this file.
1 #ifndef _DEventWriterEVIO_factory_
2 #define _DEventWriterEVIO_factory_
3 
4 #include <JANA/JFactory.h>
5 #include <JANA/JEventLoop.h>
6 
7 #include "DEventWriterEVIO.h"
8 
9 class DEventWriterEVIO_factory : public jana::JFactory<DEventWriterEVIO>
10 {
11  public:
12  DEventWriterEVIO_factory(){use_factory = 1;}; //prevents JANA from searching the input file for these objects
14 
15  private:
16  jerror_t evnt(jana::JEventLoop *locEventLoop, uint64_t locEventNumber)
17  {
18  // Create single DEventWriterEVIO object and marks the factory as persistent so it doesn't get deleted every event.
19  SetFactoryFlag(PERSISTANT);
20  ClearFactoryFlag(WRITE_TO_OUTPUT);
21  _data.push_back(new DEventWriterEVIO(locEventLoop));
22  return NOERROR;
23  }
24 };
25 
26 #endif // _DEventWriterEVIO_factory_
27 
jerror_t evnt(jana::JEventLoop *locEventLoop, uint64_t locEventNumber)