Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DTrackHitSelector_factory.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DTrackHitSelector_factory.h
4 // Created: Thu Feb 5 13:34:58 EST 2009
5 // Creator: davidl (on Darwin harriet.jlab.org 9.6.0 i386)
6 //
7 
8 #ifndef _DTrackHitSelector_factory_
9 #define _DTrackHitSelector_factory_
10 
11 #include <JANA/JFactory.h>
12 #include "DTrackHitSelector.h"
13 
14 class DTrackHitSelector_factory:public jana::JFactory<DTrackHitSelector>{
15  public:
18 
19 
20  private:
21  jerror_t evnt(jana::JEventLoop *loop, uint64_t eventnumber){
22 
23  // This is a trivial class that simply implements the
24  // ALT1 tagged factory as the default. It is here so
25  // that the default can be changed easily by simply
26  // changing the tag here or on the command line.
27  vector<const DTrackHitSelector*> selectors;
28  loop->Get(selectors, "ALT2");
29  for(unsigned int i=0; i< selectors.size(); i++){
30  _data.push_back(const_cast<DTrackHitSelector*>(selectors[i]));
31  }
32  SetFactoryFlag(NOT_OBJECT_OWNER);
33 
34  return NOERROR;
35  }
36 };
37 
38 #endif // _DTrackHitSelector_factory_
39 
jerror_t evnt(jana::JEventLoop *loop, uint64_t eventnumber)