]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/AliReaderAOD.h
- AliHLTComponent: bugfix in buffer handling; overwrite check added to
[u/mrichter/AliRoot.git] / ANALYSIS / AliReaderAOD.h
index b7e459249d018b58e45ef27be6d3a3e11838b833..49a44546349ab4a8de46aadbc5a6c96ffe717387 100644 (file)
@@ -1,5 +1,33 @@
 #ifndef ALIREADERAOD_H
 #define ALIREADERAOD_H
+//______________________________________________________________________________
+////////////////////////////////////////////////////////////////////////////////
+//                                                                            //
+// class AliReaderAOD                                                         //
+//                                                                            //
+// Reader and Writer for AOD format.                                          //
+// AODs are stored in a tree named by the variable fgkTreeName.               //
+// There is stored 1 or 2 branches. Each of them stores AOD objects           //
+// First branch is named by the variable fgkReconstructedDataBranchName       //
+// ("reconstructed.") and keeps reconstructed data.                           //
+// Second branch is called by the variable fgkSimulatedDataBranchName         //
+// ("simulated.") and stores Monte carlo truth. If both branches are present  //
+// AODs are parallel, i.e. nth particle in one branch corresponds to the nth  //
+// particle in the other one.                                                 //
+//                                                                            //
+// Since we accept different formats of particles that are stored in AODs     //
+// reader must take care of that fact: clean buffer if the next file contains //
+// different particle type.                                                   //
+//                                                                            //
+// If no cuts are specified in a reader, it reuturns pointer to the           //
+// buffers. In the other case data are copied to the onother AOD (filtering   //
+// out particles that do not pass a cut), thus reading is slower.             //
+//                                                                            //
+// Piotr.Skowronski@cern.ch                                                   //
+//                                                                            //
+////////////////////////////////////////////////////////////////////////////////
+
+
 
 #include "AliReader.h"
 
@@ -13,7 +41,8 @@ class AliReaderAOD: public AliReader
     virtual ~AliReaderAOD();
 
     void          ReadSimulatedData(Bool_t flag){fReadSim = flag;}//switches reading MC data
-    Bool_t        ReadsRec() const {return kTRUE;}
+    void          ReadReconsructedData(Bool_t flag){fReadRec = flag;}//switches reading MC data
+    Bool_t        ReadsRec() const {return fReadRec;}
     Bool_t        ReadsSim() const {return fReadSim;}
 
     void          Rewind();
@@ -24,10 +53,14 @@ class AliReaderAOD: public AliReader
     
   protected:
     virtual Int_t         ReadNext();
-    virtual Int_t        OpenFile(Int_t evno);//opens files to be read for given event
-
+    virtual Int_t         OpenFile(Int_t evno);//opens files to be read for given event
+    
+    virtual Int_t         ReadRecAndSim();
+    virtual Int_t         ReadRec();
+    virtual Int_t         ReadSim();
+    
     static const TString  fgkTreeName;//name of branch holding simulated data
-    static const TString  fgkRecosntructedDataBranchName;//name of branch holding reconstructed data
+    static const TString  fgkReconstructedDataBranchName;//name of branch holding reconstructed data
     static const TString  fgkSimulatedDataBranchName;//name of branch holding simulated data
     
   
@@ -35,6 +68,7 @@ class AliReaderAOD: public AliReader
     TString fFileName;//File name
     
     Bool_t  fReadSim;//indicates if to read simulated data
+    Bool_t  fReadRec;//indicates if to read simulated data
 
     TTree*        fTree;//!tree
     TFile*        fFile;//!file