]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - STEER/AliCDBMetaData.cxx
Regenerated with modifying geometry (adding mother volumes)
[u/mrichter/AliRoot.git] / STEER / AliCDBMetaData.cxx
... / ...
CommitLineData
1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
16/////////////////////////////////////////////////////////////////////
17// //
18// class AliCDBMetaData //
19// Set of data describing the object //
20// but not used to identify the object //
21// //
22/////////////////////////////////////////////////////////////////////
23
24#include "AliCDBMetaData.h"
25#include "AliLog.h"
26
27#include <TObjString.h>
28
29ClassImp(AliCDBMetaData)
30
31//_____________________________________________________________________________
32AliCDBMetaData::AliCDBMetaData() {
33// default constructor
34
35 fProperties.SetOwner(1);
36}
37
38//_____________________________________________________________________________
39AliCDBMetaData::~AliCDBMetaData() {
40// destructor
41
42}
43
44//_____________________________________________________________________________
45void AliCDBMetaData::SetProperty(const char* property, TObject* object) {
46// add something to the list of properties
47
48 fProperties.Add(new TObjString(property), object);
49}
50
51//_____________________________________________________________________________
52TObject* AliCDBMetaData::GetProperty(const char* property) const {
53// get a property specified by its name (property)
54
55 return fProperties.GetValue(property);
56}
57
58//_____________________________________________________________________________
59Bool_t AliCDBMetaData::RemoveProperty(const char* property) {
60// removes a property
61
62 TObjString objStrProperty(property);
63 TObjString* aKey = (TObjString*) fProperties.Remove(&objStrProperty);
64
65 if (aKey) {
66 delete aKey;
67 return kTRUE;
68 } else {
69 return kFALSE;
70 }
71}
72
73//_____________________________________________________________________________
74void AliCDBMetaData::PrintMetaData() {
75// print the object's metaData
76
77 AliInfo("**** Object's MetaData set ****");
78 AliInfo(Form(" Object's class name: %s", fObjectClassName.Data()));
79 AliInfo(Form(" Responsible: %s", fResponsible.Data()));
80 AliInfo(Form(" Beam period: %d", fBeamPeriod));
81 AliInfo(Form(" AliRoot version: %s", fAliRootVersion.Data()));
82 AliInfo(Form(" Comment: %s", fComment.Data()));
83 AliInfo(" Properties key names:");
84
85 TIter iter(fProperties.GetTable());
86 TPair* aPair;
87 while ((aPair = (TPair*) iter.Next())) {
88 AliInfo(Form(" %s",((TObjString* )aPair->Key())->String().Data()));
89 }
90
91}