1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
5 // $MpId: AliMpDataStreams.h,v 1.10 2006/05/24 13:58:07 ivana Exp $
8 /// \class AliMpDataStreams
9 /// \brief Mapping data streams provider
11 /// The class provides input streams for mapping data;
12 /// the input streams can be represented either by the
13 /// data files or by string streams filled from string map (AliMpDataMap).
14 /// The string map is set from outside (AliMpCDB) and is not
15 /// deleted in this class.
16 /// The data streams returned by CreateDataStream() function
17 /// must be deleted by the client code.
19 /// The selection between files and string streams is
20 /// done in the constructor:
21 /// if data map is provided, reading is performed from streams,
22 /// otherwise reading is performed from file.
23 /// User can also use the set function to select reading
24 /// from files also when the data map is provided: \n
25 /// void SetReadFromFiles();
27 /// \author Ivana Hrivnacova; IPN Orsay
29 #ifndef ALI_MP_DATA_STREAMS_H
30 #define ALI_MP_DATA_STREAMS_H
32 #include "AliMpDataMap.h"
43 class AliMpDataStreams : public TObject
46 AliMpDataStreams(AliMpDataMap* map = 0x0);
47 AliMpDataStreams(TRootIOCtor* ioCtor);
48 virtual ~AliMpDataStreams();
51 istream& CreateDataStream(const TString& path) const;
52 Bool_t IsDataStream(const TString& path) const;
55 void SetReadFromFiles();
56 Bool_t GetReadFromFiles() const;
60 AliMpDataStreams(const AliMpDataStreams& right);
62 AliMpDataStreams& operator=(const AliMpDataStreams& right);
65 void CutDataPath(string& dataPath) const;
68 AliMpDataMap* fMap; ///< data map
69 Bool_t fReadFromFiles; ///< option for reading data from files
71 ClassDef(AliMpDataStreams, 1) //File names and paths
74 #endif //ALI_MP_DATA_STREAMS_H