]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliStream.h
Bug fix
[u/mrichter/AliRoot.git] / STEER / AliStream.h
index ea00fb7a0f75cb82d31aa4291949327ccb66dda4..f67d1c88962e2cdebee15198ca68be755269b73f 100644 (file)
@@ -8,18 +8,16 @@
 ////////////////////////////////////////////////////////////////////////
 //
 //  Class to handle files on IO
-//                  
+//  Handles files and returns serial event number                  
 //  Author: Jiri Chudoba (CERN), 2001
 //
 ////////////////////////////////////////////////////////////////////////
 
 // --- ROOT system ---
-#include "TNamed.h"
+#include <TNamed.h>
 
 // --- AliRoot header files ---
-//#include <TString.h>
-
-#include "TObjArray.h"
+class TObjArray;
 class TFile;
 
 class TString;
@@ -29,6 +27,9 @@ class AliStream: public TNamed {
 public:
   AliStream();
   AliStream(const char* foldername, Option_t *optioneventfoldername);
+  AliStream(const AliStream &as);
+  AliStream & operator = (const AliStream & as) 
+    {as.Copy(*this); return *this;}
   virtual ~AliStream();
 
   void       AddFile(const char *fileName);
@@ -39,15 +40,20 @@ public:
  
   const TString& GetFolderName() const{return fEventFolderName;}
   Int_t GetNInputFiles() const {return fFileNames->GetLast()+1;}
-  TString GetFileName(const Int_t order) const;
-  void SetFolderName(const TString name) { fEventFolderName = name ; }    
+  TString GetFileName(Int_t order) const;
+  void SetFolderName(const TString name) { fEventFolderName = name ; }
+  Int_t GetCurrentEventNumber() const { return fLastEventSerialNr ; }
+    
 private:  
-  Int_t      fLastEventSerialNr;
-  Int_t      fLastEventNr;
-  Int_t      fCurrentFileIndex;
+
+  void Copy(TObject & as) const;
+
+  Int_t      fLastEventSerialNr;     // Serial number of last event
+  Int_t      fLastEventNr;           // Number of last event
+  Int_t      fCurrentFileIndex;      // Index of current file
   Int_t      fEvents;                //! nr. of events in the current file
   TString    fMode;                  // = 0 for READONLY, = 1 for READWRITE
-  TObjArray* fFileNames;
+  TObjArray* fFileNames;             // List of file names
   
   TString fEventFolderName; //Name of the folder where data for this stram will be mounted