FairRoot/PandaRoot
PndTrkConformalHitList.cxx
Go to the documentation of this file.
1 //
2 // PndTrkConformalHitList.cxx
3 //
4 // authors: Lia Lavezzi - INFN Pavia (2012)
5 //
6 
8 
9 #include <iostream>
10 #include "PndTrkConformalHit.h"
11 
12 using namespace std;
13 
14 
15 PndTrkConformalHitList::PndTrkConformalHitList() : fConformal(new PndTrkConformalTransform()), fHitList(TClonesArray("PndTrkConformalHit", 10000)) {}
16 
17 PndTrkConformalHitList::PndTrkConformalHitList(PndTrkConformalTransform *conformal) : fConformal(conformal), fHitList(TClonesArray("PndTrkConformalHit", 10000)) {}
18 
19 PndTrkConformalHitList::PndTrkConformalHitList(const PndTrkConformalHitList& hlist) : TObject(hlist), fConformal(new PndTrkConformalTransform()), fHitList(TClonesArray("PndTrkConformalHit", 10000)) {
20  *this = hlist;
21 }
22 
24  delete fConformal;
25  fHitList.Delete();
26 }
27 
29  fHitList = TClonesArray(hlist.fHitList);
30  fConformal = hlist.fConformal;
31  return *this;
32 }
33 
34 
35 // ----------------------------------------------------
36 
38  fConformal = NULL;
39  fHitList.Clear();
40 }
41 
42 void PndTrkConformalHitList::Clear(Option_t* opt) {
43  fConformal = NULL;
44  fHitList.Clear(opt);
45 }
46 
48  int size = fHitList.GetEntriesFast();
49  new(fHitList[size]) PndTrkConformalHit(*chit);
50 }
51 
53  return (PndTrkConformalHit*) fHitList.At(index);
54 }
55 
56 
58 
59  cout << "###############################" << endl;
60  for(int ihit = 0; ihit < GetNofHits(); ihit++) {
62  chit->Print();
63  }
64 }
65 
66 
67 void PndTrkConformalHitList::Draw(Color_t color) {
68  for(int ihit = 0; ihit < GetNofHits(); ihit++) {
70  chit->Draw(color);
71  }
72 }
73 
74 
75 
77 
PndTrkConformalHitList & operator=(const PndTrkConformalHitList &hlist)
void AddHit(PndTrkConformalHit *chit)
void Draw(Color_t color)
PndTrkConformalHit * GetHit(int index)
PndTrkConformalTransform * fConformal
ClassImp(PndAnaContFact)
void Clear(Option_t *opt="")
void Draw(Color_t color=kBlack)