]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliStream.h
Properly initialise pointers
[u/mrichter/AliRoot.git] / STEER / AliStream.h
1 #ifndef ALISTREAM_H
2 #define ALISTREAM_H
3 /* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 ////////////////////////////////////////////////////////////////////////
9 //
10 //  Class to handle files on IO
11 //                  
12 //  Author: Jiri Chudoba (CERN), 2001
13 //
14 ////////////////////////////////////////////////////////////////////////
15
16 // --- ROOT system ---
17 #include "TNamed.h"
18
19 // --- AliRoot header files ---
20 //#include <TString.h>
21
22 #include "TObjArray.h"
23 class TFile;
24
25 class TString;
26
27 class AliStream: public TNamed {
28
29 public:
30   AliStream();
31   AliStream(const char* foldername, Option_t *optioneventfoldername);
32   virtual ~AliStream();
33
34   void       AddFile(const char *fileName);
35   Bool_t     NextEventInStream();
36   Bool_t     OpenNextFile();//returns kFALSE in case of failure
37   Bool_t     ImportgAlice();
38   void       ChangeMode(Option_t* option);     // reset READ or UPDATE mode
39  
40   const TString& GetFolderName() const{return fEventFolderName;}
41   Int_t GetNInputFiles() const {return fFileNames->GetLast()+1;}
42   TString GetFileName(const Int_t order) const;
43   void SetFolderName(const TString name) { fEventFolderName = name ; }    
44 private:  
45   Int_t      fLastEventSerialNr;
46   Int_t      fLastEventNr;
47   Int_t      fCurrentFileIndex;
48   Int_t      fEvents;                //! nr. of events in the current file
49   TString    fMode;                  // = 0 for READONLY, = 1 for READWRITE
50   TObjArray* fFileNames;
51   
52   TString fEventFolderName; //Name of the folder where data for this stram will be mounted
53   
54   ClassDef(AliStream,1)
55 };
56
57 #endif // ALISTREAM_H