]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliStream.h
Adaption to new fluka common blocks (E. Futo)
[u/mrichter/AliRoot.git] / STEER / AliStream.h
CommitLineData
77843484 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"
116cbefd 18#include "TObjArray.h"
f7ae2b32 19#include "TString.h"
e2afb3b6 20
21class TFile;
77843484 22
23// --- AliRoot header files ---
24
25class AliStream: public TNamed {
26
27public:
28 AliStream();
6873edea 29 AliStream(Option_t *option);
116cbefd 30 AliStream(const AliStream& str);
e2afb3b6 31 AliStream & operator=(const AliStream& str)
32 {str.Copy(*this); return (*this);}
77843484 33 virtual ~AliStream();
3466e07f 34 void AddFile(const char *fileName);
77843484 35 Bool_t NextEventInStream(Int_t &eventNr);
36 Bool_t OpenNextFile();
37 Bool_t ImportgAlice();
38 TFile* CurrentFile() { return fCurrentFile;}
6873edea 39 void ChangeMode(Option_t* option); // reset READ or UPDATE mode
f7ae2b32 40 Int_t GetNInputFiles() const {return fFileNames->GetLast()+1;}
41 TString GetFileName(const Int_t order) const;
77843484 42
43private:
e2afb3b6 44 void Copy(AliStream& str) const;
45
116cbefd 46 Int_t fLastEventSerialNr; // Serial number of the last event
47 Int_t fLastEventNr; // Number of the last event
48 Int_t fCurrentFileIndex; // Index of the current file
77843484 49 Int_t fEvents; //! nr. of events in the current file
f7ae2b32 50 TString fMode; // = 0 for READONLY, = 1 for READWRITE
3466e07f 51 TFile *fCurrentFile; //! pointer to current open file
f7ae2b32 52 TObjArray * fFileNames; // storage for TStrings with file names
77843484 53
54 ClassDef(AliStream,1)
55};
56
57#endif // ALISTREAM_H