36 #include <TObjString.h>
38 #include <Riostream.h>
55 if ( map ) fReadFromFiles = kFALSE;
88 if ( dataPath.find(top) != string::npos ) dataPath.erase(0, top.size()+1);
89 dataPath.erase(0,dataPath.find(
'/')+1);
107 AliDebugStream(2) <<
"Opening file " << path.Data() << endl;
108 ifstream* fileBuffer =
new ifstream();
109 fileBuffer->open(path.Data());
110 if ( ! fileBuffer->good() ) {
112 <<
"Cannot open file " << path.Data() << endl;
117 AliDebugStream(2) <<
"Opening stream " << path.Data() << endl;
120 string dataPath = path.Data();
123 istringstream* stringBuffer
124 =
new istringstream(
fMap->
Get(dataPath).Data());
125 return *stringBuffer;
135 ifstream fileBuffer(path.Data());
136 return fileBuffer.good();
140 string dataPath = path.Data();
143 return (
fMap->
Get(dataPath, kFALSE) !=
"" );
istream & CreateDataStream(const TString &path) const
void CutDataPath(string &dataPath) const
AliMpDataMap * fMap
data map
TString Get(const TString &path, Bool_t warn=kTRUE) const
Bool_t IsDataStream(const TString &path) const
AliMpDataStreams(AliMpDataMap *map=0x0)
virtual ~AliMpDataStreams()
TObject class containing a map of strings to strings.
Bool_t fReadFromFiles
option for reading data from files
Bool_t GetReadFromFiles() const
Mapping data streams provider.