Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DMCThrown_factory_Decaying.cc
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DMCThrown_factory_Decaying.cc
4 // Created: Thu Dec 3 17:27:55 EST 2009
5 // Creator: pmatt (on Linux ifarml6 2.6.18-128.el5 x86_64)
6 //
7 
9 
10 using namespace jana;
11 
12 //------------------
13 // init
14 //------------------
16 {
17  SetFactoryFlag(NOT_OBJECT_OWNER);
18  return NOERROR;
19 }
20 
21 //------------------
22 // brun
23 //------------------
24 jerror_t DMCThrown_factory_Decaying::brun(jana::JEventLoop *locEventLoop, int32_t runnumber)
25 {
26  locEventLoop->GetSingle(dAnalysisUtilities);
27  return NOERROR;
28 }
29 
30 //------------------
31 // evnt
32 //------------------
33 jerror_t DMCThrown_factory_Decaying::evnt(jana::JEventLoop *locEventLoop, uint64_t eventnumber)
34 {
35  _data.clear();
36 
37  deque<pair<const DMCThrown*, deque<const DMCThrown*> > > locThrownSteps;
38  dAnalysisUtilities->Get_ThrownParticleSteps(locEventLoop, locThrownSteps);
39 
40  if(locThrownSteps.empty())
41  return NOERROR;
42 
43  for(size_t loc_i = 1; loc_i < locThrownSteps.size(); ++loc_i)
44  _data.push_back(const_cast<DMCThrown*>(locThrownSteps[loc_i].first));
45 
46  return NOERROR;
47 }
48 
49 
50 //------------------
51 // erun
52 //------------------
54 {
55  return NOERROR;
56 }
57 
58 //------------------
59 // fini
60 //------------------
62 {
63  return NOERROR;
64 }
65 
jerror_t fini(void)
Called after last event of last event source has been processed.
jerror_t brun(jana::JEventLoop *locEventLoop, int32_t runnumber)
Called everytime a new run number is detected.
jerror_t evnt(jana::JEventLoop *locEventLoop, uint64_t eventnumber)
Called every event.
jerror_t erun(void)
Called everytime run number changes, provided brun has been called.
jerror_t init(void)
Called once at program start.