]>
Commit | Line | Data |
---|---|---|
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 | // Handles files and returns serial event number | |
12 | // Author: Jiri Chudoba (CERN), 2001 | |
13 | // | |
14 | //////////////////////////////////////////////////////////////////////// | |
15 | ||
16 | // --- ROOT system --- | |
17 | #include <TNamed.h> | |
18 | ||
19 | // --- AliRoot header files --- | |
20 | class TObjArray; | |
21 | class TFile; | |
22 | ||
23 | class TString; | |
24 | ||
25 | class AliStream: public TNamed { | |
26 | ||
27 | public: | |
28 | AliStream(); | |
29 | AliStream(const char* foldername, Option_t *optioneventfoldername); | |
30 | AliStream(const AliStream &as); | |
31 | AliStream & operator = (const AliStream & as) | |
32 | {as.Copy(*this); return *this;} | |
33 | virtual ~AliStream(); | |
34 | ||
35 | void AddFile(const char *fileName); | |
36 | Bool_t NextEventInStream(); | |
37 | Bool_t OpenNextFile();//returns kFALSE in case of failure | |
38 | Bool_t ImportgAlice(); | |
39 | void ChangeMode(Option_t* option); // reset READ or UPDATE mode | |
40 | ||
41 | const TString& GetFolderName() const{return fEventFolderName;} | |
42 | Int_t GetNInputFiles() const {return fFileNames->GetLast()+1;} | |
43 | TString GetFileName(Int_t order) const; | |
44 | void SetFolderName(const TString name) { fEventFolderName = name ; } | |
45 | Int_t GetCurrentEventNumber() const { return fLastEventSerialNr ; } | |
46 | ||
47 | private: | |
48 | ||
49 | void Copy(TObject & as) const; | |
50 | ||
51 | Int_t fLastEventSerialNr; // Serial number of last event | |
52 | Int_t fLastEventNr; // Number of last event | |
53 | Int_t fCurrentFileIndex; // Index of current file | |
54 | Int_t fEvents; //! nr. of events in the current file | |
55 | TString fMode; // = 0 for READONLY, = 1 for READWRITE | |
56 | TObjArray* fFileNames; // List of file names | |
57 | ||
58 | TString fEventFolderName; //Name of the folder where data for this stram will be mounted | |
59 | ||
60 | ClassDef(AliStream,1) | |
61 | }; | |
62 | ||
63 | #endif // ALISTREAM_H |