FairRoot/PandaRoot
PndTrkSkewHitList.cxx
Go to the documentation of this file.
1 //
2 // PndTrkSkewHitList.cxx
3 //
4 // authors: Lia Lavezzi - University of Torino (2014)
5 //
6 
7 #include "PndTrkSkewHitList.h"
8 
9 #include <iostream>
10 #include "PndTrkConformalHit.h"
11 
12 using namespace std;
13 
14 
15 PndTrkSkewHitList::PndTrkSkewHitList() : fHitList(TClonesArray("PndTrkSkewHit", 10000)) {}
16 
18  *this = hlist;
19 }
20 
22  fHitList.Delete();
23 }
24 
26  fHitList = TClonesArray(hlist.fHitList);
27  return *this;
28 }
29 
30 
31 // ----------------------------------------------------
32 
33 void PndTrkSkewHitList::Clear(Option_t* opt) {
34  fHitList.Clear(opt);
35 }
36 
38  int size = fHitList.GetEntriesFast();
39  new(fHitList[size]) PndTrkSkewHit(*shit);
40 }
41 
43  int size = fHitList.GetEntriesFast();
44  new(fHitList[size]) PndTrkSkewHit(hit);
45 }
46 
48  int size = fHitList.GetEntriesFast();
49  new(fHitList[size]) PndTrkSkewHit(*hit);
50 }
51 
53  return (PndTrkSkewHit*) fHitList.At(index);
54 }
55 
56 
58 
59  cout << "###############################" << endl;
60  for(int ihit = 0; ihit < GetNofHits(); ihit++) {
61  PndTrkSkewHit* shit = (PndTrkSkewHit*) fHitList.At(ihit);
62  shit->Print();
63  }
64 }
65 
66 
67 void PndTrkSkewHitList::Draw(Color_t color) {
68  for(int ihit = 0; ihit < GetNofHits(); ihit++) {
69  PndTrkSkewHit* shit = (PndTrkSkewHit*) fHitList.At(ihit);
70  shit->Draw(color);
71  }
72 }
73 
74 
75 
77 
PndTrkSkewHit * GetHit(int index)
void Clear(Option_t *opt="")
void AddHit(PndTrkSkewHit *shit)
TClonesArray fHitList
int hit(Int_t nEvents=0, TString inFile="sim.root", TString parFile="par.root", TString inDigi="digi.root", TString outFile="hit.root", Int_t timeBased=0)
Definition: hit.C:1
ClassImp(PndAnaContFact)
void Draw(Color_t color)
void Draw(Color_t color=kBlack)
PndTrkSkewHitList & operator=(const PndTrkSkewHitList &hlist)