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