1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
19 //-----------------------------------------------------------------------------
21 // ------------------------
22 // TObject class containing a map of strings to strings
23 // Author:Ivana Hrivnacova; IPN Orsay
24 //-----------------------------------------------------------------------------
26 #include "AliMpDataMap.h"
27 #include "Riostream.h"
31 #include <TObjString.h>
34 ClassImp(AliMpDataMap)
37 //_____________________________________________________________________________
38 AliMpDataMap::AliMpDataMap()
42 /// Standard & default constructor
46 //_____________________________________________________________________________
47 AliMpDataMap::~AliMpDataMap()
56 //_____________________________________________________________________________
57 void AliMpDataMap::Add(const TString& path, const TString& data)
61 fMap.Add(new TObjString(path), new TObjString(data));
64 //_____________________________________________________________________________
65 TString AliMpDataMap::Get(const TString& path, Bool_t warn) const
67 /// Find the data string for given path;
68 /// give error and return empty string if not found
70 TObject* object = fMap.GetValue(path.Data());
75 << path << " not found in the map." << std::endl;
80 return ((TObjString*)object)->String();