]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliStream.h
Additional comment.
[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
af7ba10c 11// Handles files and returns serial event number
77843484 12// Author: Jiri Chudoba (CERN), 2001
13//
14////////////////////////////////////////////////////////////////////////
15
16// --- ROOT system ---
024a7e64 17#include <TNamed.h>
e2afb3b6 18
88cb7938 19// --- AliRoot header files ---
024a7e64 20class TObjArray;
e2afb3b6 21class TFile;
77843484 22
88cb7938 23class TString;
77843484 24
25class AliStream: public TNamed {
26
27public:
28 AliStream();
88cb7938 29 AliStream(const char* foldername, Option_t *optioneventfoldername);
024a7e64 30 AliStream(const AliStream &as);
31 AliStream & operator = (const AliStream & as)
32 {as.Copy(*this); return *this;}
77843484 33 virtual ~AliStream();
88cb7938 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;}
d0f1ee3b 43 TString GetFileName(Int_t order) const;
18787eca 44 void SetFolderName(const TString name) { fEventFolderName = name ; }
45 Int_t GetCurrentEventNumber() const { return fLastEventSerialNr ; }
46
77843484 47private:
024a7e64 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
88cb7938 54 Int_t fEvents; //! nr. of events in the current file
55 TString fMode; // = 0 for READONLY, = 1 for READWRITE
024a7e64 56 TObjArray* fFileNames; // List of file names
88cb7938 57
58 TString fEventFolderName; //Name of the folder where data for this stram will be mounted
77843484 59
60 ClassDef(AliStream,1)
61};
62
63#endif // ALISTREAM_H