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