STARTLoader for TObject Digits and RecPoints
authoralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 15 Aug 2003 07:14:23 +0000 (07:14 +0000)
committeralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 15 Aug 2003 07:14:23 +0000 (07:14 +0000)
START/AliSTARTLoader.cxx [new file with mode: 0644]
START/AliSTARTLoader.h [new file with mode: 0644]

diff --git a/START/AliSTARTLoader.cxx b/START/AliSTARTLoader.cxx
new file mode 100644 (file)
index 0000000..c621350
--- /dev/null
@@ -0,0 +1,49 @@
+#include "AliSTARTLoader.h"
+#include <AliRunLoader.h>
+#include "AliDataLoader.h"
+
+#include <TTree.h>
+#include <TFile.h>
+
+#include <stdlib.h>
+#include <Riostream.h>
+#include <Riostream.h>
+
+
+ClassImp(AliSTARTLoader)
+
+/*****************************************************************************/ 
+AliSTARTLoader::AliSTARTLoader(const Char_t *name,const Char_t *topfoldername):
+  AliLoader(name,topfoldername)
+
+{
+//ctor   
+  cout<<" AliSTARTLoader "<<endl;
+
+
+   
+}
+/*****************************************************************************/ 
+
+AliSTARTLoader::AliSTARTLoader(const Char_t *name,TFolder *topfolder):
+ AliLoader(name,topfolder)
+{
+//ctor   
+
+  cout<<"  My AliDTARTLoader!!!!! "<<endl;
+
+   
+}
+/*****************************************************************************/ 
+AliSTARTLoader::~AliSTARTLoader()
+{
+ //destructor
+  UnloadDigits();
+  fDataLoaders->Remove(&fDigitsDataLoader);
+
+  UnloadRecPoints();
+  fDataLoaders->Remove(&fVertexDataLoader);
+
+}
+
diff --git a/START/AliSTARTLoader.h b/START/AliSTARTLoader.h
new file mode 100644 (file)
index 0000000..ec76fa6
--- /dev/null
@@ -0,0 +1,57 @@
+#ifndef ALISTARTLOADER_H
+#define ALISTARTLOADER_H
+
+#include <AliLoader.h>
+#include "AliDataLoader.h"
+#include <AliSTART.h>
+#include "AliSTARTdigit.h"
+#include "AliSTARTvertex.h"
+
+class AliSTARTLoader: public AliLoader
+ {
+ public:
+   AliSTARTLoader(){};
+   AliSTARTLoader(const Char_t *name,const Char_t *topfoldername);
+   AliSTARTLoader(const Char_t *name,TFolder *topfolder);
+   
+   virtual ~AliSTARTLoader();
+   // Digits
+   virtual void   CleanDigits() {fDigitsDataLoader.GetBaseDataLoader()->Clean();}
+   Int_t          LoadDigits(Option_t* opt=""){return fDigitsDataLoader.GetBaseDataLoader()->Load(opt);}
+   
+   void           UnloadDigits(){fDigitsDataLoader.GetBaseDataLoader()->Unload();}
+   virtual Int_t  WriteDigits(Option_t* opt=""){return fDigitsDataLoader.GetBaseDataLoader()->WriteData(opt);}
+   virtual Int_t PostDigits(AliSTARTdigit *dgt){return fDigitsDataLoader.GetBaseDataLoader()->Post(dgt);}
+   
+   TObject*  Digits(){ return fDigitsDataLoader.GetBaseDataLoader()->Get();} // returns a pointer to the tree of  RawClusters
+   
+   
+   //Vertices
+   virtual void   CleanRecPoints() {fVertexDataLoader.GetBaseDataLoader()->Clean();}
+   Int_t          LoadRecPoints(Option_t* opt=""){return fVertexDataLoader.GetBaseDataLoader()->Load(opt);}
+   void           UnloadRecPoints(){fVertexDataLoader.GetBaseDataLoader()->Unload();}
+   virtual Int_t  WriteRecPoints(Option_t* opt=""){return fVertexDataLoader.GetBaseDataLoader()->WriteData(opt);}
+   //  AliSTARTVertex *GetVertex(){return static_cast <AliSTARTVertex*>(fVertexDataLoader.GetBaseDataLoader()->Get());}
+   virtual Int_t PostRecPoints(AliSTARTvertex *vrt){return fVertexDataLoader.GetBaseDataLoader()->Post(vrt);}
+   //  TObject*  Vertex(){ return fVertexDataLoader.GetBaseDataLoader()->Get();} // returns a pointer to the tree of  RawClusters
+   
+   protected:
+   // methods
+   
+   Int_t     PostDigits(){return fDigitsDataLoader.GetBaseDataLoader()->Post();}
+   Int_t     PostRecPoints(){return fVertexDataLoader.GetBaseDataLoader()->Post();}
+   
+
+    // DATA
+    AliDataLoader fDigitsDataLoader;
+    
+    AliDataLoader fVertexDataLoader;
+    
+ public:
+    ClassDef(AliSTARTLoader,1)
+      };
+#endif
+
+
+