Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Df250EmulatorAlgorithm_factory_v3.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: Df250EmulatorAlgorithm_factory.h
4 // Created: Mar 20, 2016
5 // Creator: mstaib
6 //
7 
8 #ifndef _Df250EmulatorAlgorithm_factory_v3_
9 #define _Df250EmulatorAlgorithm_factory_v3_
10 
11 #include <JANA/JFactory.h>
13 
14 class Df250EmulatorAlgorithm_factory_v3:public jana::JFactory<Df250EmulatorAlgorithm>{
15  public:
18  const char* Tag(void){return "v3";}
19 
21 
22  //------------------
23  // brun
24  //------------------
25  jerror_t brun(JEventLoop *loop, int32_t runnumber)
26  {
27  // (See DTAGHGeometry_factory.h)
28  SetFactoryFlag(NOT_OBJECT_OWNER);
29  ClearFactoryFlag(WRITE_TO_OUTPUT);
30 
31  if( emulator ) delete emulator;
32 
34 
35  return NOERROR;
36  }
37 
38  //------------------
39  // evnt
40  //------------------
41  jerror_t evnt(JEventLoop *loop, uint64_t eventnumber)
42  {
43  // Reuse existing DBCALGeometry object.
44  if( emulator ) _data.push_back( emulator );
45 
46  return NOERROR;
47  }
48 
49  //------------------
50  // erun
51  //------------------
52  jerror_t erun(void)
53  {
54  if( emulator ) delete emulator;
55  emulator = NULL;
56 
57  return NOERROR;
58  }
59 
60 };
61 
62 #endif // _Df250EmulatorAlgorithm_factory_v3_
63 
jerror_t brun(JEventLoop *loop, int32_t runnumber)
jerror_t evnt(JEventLoop *loop, uint64_t eventnumber)