fixed the tainted variables
[u/mrichter/AliRoot.git] / ITS / AliITSLoader.h
... / ...
CommitLineData
1#ifndef ALIITSLOADER_H
2#define ALIITSLOADER_H
3//////////////////////////////////////////////////////////
4// Loader class for ITS //
5//////////////////////////////////////////////////////////
6#include <AliLoader.h>
7#include <AliESDVertex.h>
8#include <AliITSgeom.h>
9class AliITSpidESD;
10class AliITSdigit;
11class TObjArray;
12
13class AliITSLoader: public AliLoader{
14 public:
15 AliITSLoader();
16 AliITSLoader(const Char_t *name,const Char_t *topfoldername);
17 AliITSLoader(const Char_t *name,TFolder *topfolder);
18
19 virtual ~AliITSLoader();
20
21 void MakeTree(Option_t* opt);
22 virtual void SetupDigits(TObjArray *digPerDet,Int_t n,
23 const Char_t **digclass); // Sets up digits
24 // Gets the AliITSdigit for a given module and a specific digit in that
25 // module. Array of digits stored in AliITS (must use
26 // SetupDigits(AliITS *its)).
27 // virtual AliITSdigit* GetDigit(AliITS *its,Int_t module,Int_t digit);
28 // Gets the AliITSdigit for a given module and a specific digit in that
29 // module. Array of digits stored in a user defined TObjArray digPerDet
30 virtual AliITSdigit* GetDigit(TObjArray *digPerDet,Int_t module,Int_t digit);
31
32 //Raw Clusters
33 AliDataLoader* GetRawClLoader() {return GetDataLoader("Raw Clusters");}
34 virtual void CleanRawClusters() {
35 GetRawClLoader()->GetBaseLoader(0)->Clean();}
36 Int_t LoadRawClusters(Option_t* opt=""){
37 return GetRawClLoader()->GetBaseLoader(0)->Load(opt);}
38 void SetRawClustersFileName(const TString& fname){
39 GetRawClLoader()->SetFileName(fname);}
40 // returns a pointer to the tree of RawClusters
41 TTree* TreeC(){ return GetRawClLoader()->Tree();}
42 void UnloadRawClusters(){
43 GetRawClLoader()->GetBaseLoader(0)->Unload();}
44 virtual Int_t WriteRawClusters(Option_t* opt=""){
45 return GetRawClLoader()->GetBaseLoader(0)->WriteData(opt);}
46
47 //Vertices
48 AliDataLoader* GetVertexDataLoader() {
49 return GetDataLoader("Primary Vertices");}
50 virtual void CleanVertices() {
51 GetVertexDataLoader()->GetBaseLoader(0)->Clean();}
52 Int_t LoadVertices(Option_t* opt=""){
53 return GetVertexDataLoader()->GetBaseLoader(0)->Load(opt);}
54 void SetVerticesFileName(const TString& fname){
55 GetVertexDataLoader()->SetFileName(fname);}
56 void UnloadVertices(){
57 GetVertexDataLoader()->GetBaseLoader(0)->Unload();}
58 virtual Int_t WriteVertices(Option_t* opt=""){
59 return GetVertexDataLoader()->GetBaseLoader(0)->WriteData(opt);}
60 virtual Int_t PostVertex(AliESDVertex *ptr){
61 return GetVertexDataLoader()->GetBaseLoader(0)->Post(ptr);}
62 // virtual void SetVerticesContName(const char *name){
63 // GetVertexDataLoader()->GetBaseLoader(0)->SetName(name);}
64 AliESDVertex *GetVertex(){
65 return static_cast <AliESDVertex*>(GetVertexDataLoader()->
66 GetBaseLoader(0)->Get());}
67 //V0s
68 AliDataLoader* GetV0DataLoader() {return GetDataLoader("V0 Vertices");}
69 virtual void CleanV0s() {GetV0DataLoader()->GetBaseLoader(0)->Clean();}
70 Int_t LoadV0s(Option_t* opt=""){
71 return GetV0DataLoader()->GetBaseLoader(0)->Load(opt);}
72 void SetV0FileName(const TString& fname){
73 GetV0DataLoader()->SetFileName(fname);}
74 void UnloadV0s(){GetV0DataLoader()->GetBaseLoader(0)->Unload();}
75 virtual Int_t WriteV0s(Option_t* opt=""){
76 return GetV0DataLoader()->GetBaseLoader(0)->WriteData(opt);}
77 TTree* TreeV0(){ return GetV0DataLoader()->Tree();}
78
79 //Cascades
80 AliDataLoader* GetCascadeDataLoader() {return GetDataLoader("Cascades");}
81 virtual void CleanCascades() {
82 GetCascadeDataLoader()->GetBaseLoader(0)->Clean();}
83 Int_t LoadCascades(Option_t* opt=""){
84 return GetCascadeDataLoader()->GetBaseLoader(0)->Load(opt);}
85 void SetCascadeFileName(const TString& fname){
86 GetCascadeDataLoader()->SetFileName(fname);}
87 void UnloadCascades(){
88 GetCascadeDataLoader()->GetBaseLoader(0)->Unload();}
89 virtual Int_t WriteCascades(Option_t* opt=""){
90 return GetCascadeDataLoader()->GetBaseLoader(0)->WriteData(opt);}
91 TTree* TreeX(){ return GetCascadeDataLoader()->Tree();}
92
93 //Back Propagated Tracks
94 AliDataLoader* GetBackTracksDataLoader() {
95 return GetDataLoader("Back Propagated Tracks");}
96 virtual void CleanBackTracks() {
97 GetBackTracksDataLoader()->GetBaseLoader(0)->Clean();}
98 Int_t LoadBackTracks(Option_t* opt=""){
99 return GetBackTracksDataLoader()->GetBaseLoader(0)->Load(opt);}
100 void SetBackTracksFileName(const TString& fname){
101 GetBackTracksDataLoader()->SetFileName(fname);}
102 // returns a pointer to the tree of BackTracks
103 TTree* TreeB(){ return GetBackTracksDataLoader()->Tree();}
104 void UnloadBackTracks(){
105 GetBackTracksDataLoader()->GetBaseLoader(0)->Unload();}
106 virtual Int_t WriteBackTracks(Option_t* opt=""){
107 return GetBackTracksDataLoader()->GetBaseLoader(0)->WriteData(opt);}
108
109 // Geometry. Geom is read from file, unless already loaded
110 // readout from file can be forced if force=kTRUE
111 AliITSgeom* GetITSgeom(Bool_t force=kFALSE);
112 void SetITSgeom(AliITSgeom* g);
113 protected:
114
115 AliITSLoader(const AliITSLoader &ob); // copy constructor
116 AliITSLoader& operator=(const AliITSLoader & /* source */); // ass.
117
118 // METHODS
119 virtual void MakeRawClustersContainer() {GetRawClLoader()->MakeTree();}
120 Int_t PostRawClusters(){
121 return GetRawClLoader()->GetBaseLoader(0)->Post();}
122
123 virtual void MakeBackTracksContainer() {
124 GetBackTracksDataLoader()->MakeTree();}
125 Int_t PostBackTracks(){
126 return GetBackTracksDataLoader()->GetBaseLoader(0)->Post();}
127 virtual void MakeV0Container() {GetV0DataLoader()->MakeTree();}
128 Int_t PostV0s(){
129 return GetV0DataLoader()->GetBaseLoader(0)->Post();}
130
131 virtual void MakeCascadeContainer() {GetCascadeDataLoader()->MakeTree();}
132 Int_t PostCascades(){
133 return GetCascadeDataLoader()->GetBaseLoader(0)->Post();}
134
135 // DATA
136 static const TString fgkDefaultRawClustersContainerName; //default for Raw Clusters container name
137 static const TString fgkDefaultBackTracksContainerName; //default for Back propag. tracks container name
138 static const TString fgkDefaultVerticesContainerName; //default for primary vertices container name
139 static const TString fgkDefaultV0ContainerName; //default for V0 container name
140 static const TString fgkDefaultCascadeContainerName; //default fo cascade container name
141 AliITSgeom *fGeom; //! pointer to the ITS geometry class
142
143
144 ClassDef(AliITSLoader,6) // Loader for additional ITS specific trees.
145};
146
147#endif