Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DTAGMGeometry_factory.h
Go to the documentation of this file.
1 //
2 // File: DTAGMGeometry_factory.h
3 // Created: Sat Jul 5 10:09:27 EST 2014
4 // Creator: jonesrt on gluey.phys.uconn.edu
5 //
6 
7 #ifndef _DTAGMGeometry_factory_
8 #define _DTAGMGeometry_factory_
9 
10 #include <string>
11 
12 #include "JANA/JFactory.h"
13 #include "DTAGMGeometry.h"
14 
15 class DTAGMGeometry_factory : public JFactory<DTAGMGeometry> {
16  public:
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( tagmgeometry ) delete tagmgeometry;
32 
33  tagmgeometry = new DTAGMGeometry(loop);
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( tagmgeometry ) _data.push_back( tagmgeometry );
45 
46  return NOERROR;
47  }
48 
49  //------------------
50  // erun
51  //------------------
52  jerror_t erun(void)
53  {
54  if( tagmgeometry ) delete tagmgeometry;
55  tagmgeometry = NULL;
56 
57  return NOERROR;
58  }
59 };
60 #endif // _DTAGMGeometry_factory_
jerror_t brun(JEventLoop *loop, int32_t runnumber)
jerror_t evnt(JEventLoop *loop, uint64_t eventnumber)