StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEmcMicroEvent.cxx
1 //###########################################################
2 // EMC Micro Event
3 // Author: Alexandre A. P. Suaide
4 // initial version 08/2001
5 //
6 // See README for details
7 //###########################################################
8 #include "StEmcMicroEvent.h"
9 ClassImp(StEmcMicroEvent)
10 
12 {
13  fpTracks = new TObjArray();
14  fgTracks = new TObjArray();
15  fV0 = new TObjArray();
16  mVersion=3;
17 }
18 StEmcMicroEvent::~StEmcMicroEvent()
19 {
20  clear();
21  if(fpTracks) delete fpTracks;
22  if(fgTracks) delete fgTracks;
23  if(fV0) delete fV0;
24  if(fEmc) { delete fEmc; fEmc=NULL;}
25  if(fFpd) { delete fFpd; fFpd = NULL; }
26 }
27 void StEmcMicroEvent::clear(Option_t *option)
28 {
29  Int_t n =getNPrimaryTrack();
30  for(Int_t i=0;i<n;i++)
31  {
33  if(t) delete t;
34  }
35  n =getNGlobalTrack();
36  for(Int_t i=0;i<n;i++)
37  {
39  if(t) delete t;
40  }
41  n=getNV0();
42  for(Int_t i=0;i<n;i++)
43  {
44  StEmcMicroV0* v = getV0(i);
45  if(v) delete v;
46  }
47  fpTracks->Clear();
48  fgTracks->Clear();
49  fV0->Clear();
50  if(fEmc) fEmc->clear();
51  return;
52 }
StEmcMicroTrack * getGlobalTrack(Int_t i) const
Return Global track.
Int_t getNV0() const
Return Number of V0.
StEmcMicroTrack * getPrimaryTrack(Int_t i) const
Return Primary track.
Int_t getNPrimaryTrack() const
Return Number of Primary track.
Int_t getNGlobalTrack() const
Return Number of Global track.
StEmcMicroV0 * getV0(Int_t i) const
Return V0.