Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DTrackHitSelector_factory_ALT1.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DTrackHitSelector_factory_ALT1.h
4 // Created: Fri Feb 6 08:11:38 EST 2009
5 // Creator: davidl (on Darwin harriet.jlab.org 9.6.0 i386)
6 //
7 
8 #ifndef _DTrackHitSelector_factory_ALT1_
9 #define _DTrackHitSelector_factory_ALT1_
10 
11 #include <JANA/JFactory.h>
12 #include "DTrackHitSelector.h"
13 #include "DTrackHitSelectorALT1.h"
14 
15 class DTrackHitSelector_factory_ALT1:public jana::JFactory<DTrackHitSelector>{
16  public:
19  const char* Tag(void){return "ALT1";}
20 
22 
23  //------------------
24  // brun
25  //------------------
26  jerror_t brun(JEventLoop *loop, int32_t runnumber)
27  {
28  // (See DTAGHGeometry_factory.h)
29  SetFactoryFlag(NOT_OBJECT_OWNER);
30  ClearFactoryFlag(WRITE_TO_OUTPUT);
31 
32  if( selector ) delete selector;
33 
34  selector = new DTrackHitSelectorALT1(loop);
35 
36  return NOERROR;
37  }
38 
39  //------------------
40  // evnt
41  //------------------
42  jerror_t evnt(JEventLoop *loop, uint64_t eventnumber)
43  {
44  // Reuse existing DTrackHitSelectorALT1 object.
45  if( selector ) _data.push_back( selector );
46 
47  return NOERROR;
48  }
49 
50  //------------------
51  // erun
52  //------------------
53  jerror_t erun(void)
54  {
55  if( selector ) delete selector;
56  selector = NULL;
57 
58  return NOERROR;
59  }
60 };
61 
62 #endif // _DTrackHitSelector_factory_ALT1_
63 
jerror_t brun(JEventLoop *loop, int32_t runnumber)
The DTrackHitSelector class is a base class for algorithms that will select hits from the drift chamb...
jerror_t evnt(JEventLoop *loop, uint64_t eventnumber)