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