Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DBCALShower_factory.h
Go to the documentation of this file.
1 // $Id$
2 
3 #ifndef _DBCALShower_factory_
4 #define _DBCALShower_factory_
5 
6 #include <JANA/JFactory.h>
7 #include <BCAL/DBCALShower.h>
8 
9 class DBCALShower_factory:public jana::JFactory<DBCALShower>{
10  public:
13 
14  private:
15  jerror_t evnt(jana::JEventLoop *loop, uint64_t eventnumber){
16 
17  // This is a trivial factory that simply implements the
18  // IU tagged factory as the default. It is here so
19  // that the default can be changed easily by simply
20  // changing the tag here or on the command line.
21  vector<const DBCALShower*> showers;
22  loop->Get(showers, "IU");
23  for(unsigned int i=0; i<showers.size(); i++){
24  _data.push_back(const_cast<DBCALShower*>(showers[i]));
25  }
26  SetFactoryFlag(NOT_OBJECT_OWNER);
27 
28  return NOERROR;
29  }
30 };
31 
32 #endif // _DBCALShower_factory_
jerror_t evnt(jana::JEventLoop *loop, uint64_t eventnumber)