]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliCDBMetaData.cxx
Move to fixed size step manager as default
[u/mrichter/AliRoot.git] / STEER / AliCDBMetaData.cxx
CommitLineData
2c8628dd 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
9e1ceb13 16/////////////////////////////////////////////////////////////////////
17// //
18// class AliCDBMetaData //
19// Set of data describing the object //
20// but not used to identify the object //
21// //
22/////////////////////////////////////////////////////////////////////
2c8628dd 23
fe913d8f 24#include "AliCDBMetaData.h"
f05209ee 25#include "AliLog.h"
2c8628dd 26
9e1ceb13 27#include <TObjString.h>
2c8628dd 28
fe913d8f 29ClassImp(AliCDBMetaData)
2c8628dd 30
2c8628dd 31//_____________________________________________________________________________
17c7b9cd 32AliCDBMetaData::AliCDBMetaData() :
33TObject(),
34fObjectClassName(""),
35fResponsible(""),
36fBeamPeriod(0),
37fAliRootVersion(""),
38fComment("")
39{
2c8628dd 40// default constructor
2c8628dd 41
9e1ceb13 42 fProperties.SetOwner(1);
2c8628dd 43}
44
2c8628dd 45//_____________________________________________________________________________
9e1ceb13 46AliCDBMetaData::~AliCDBMetaData() {
47// destructor
2c8628dd 48
2c8628dd 49}
50
2c8628dd 51//_____________________________________________________________________________
9e1ceb13 52void AliCDBMetaData::SetProperty(const char* property, TObject* object) {
53// add something to the list of properties
f05209ee 54
9e1ceb13 55 fProperties.Add(new TObjString(property), object);
f05209ee 56}
57
58//_____________________________________________________________________________
9e1ceb13 59TObject* AliCDBMetaData::GetProperty(const char* property) const {
60// get a property specified by its name (property)
f05209ee 61
9e1ceb13 62 return fProperties.GetValue(property);
2c8628dd 63}
64
65//_____________________________________________________________________________
9e1ceb13 66Bool_t AliCDBMetaData::RemoveProperty(const char* property) {
67// removes a property
68
69 TObjString objStrProperty(property);
70 TObjString* aKey = (TObjString*) fProperties.Remove(&objStrProperty);
71
72 if (aKey) {
73 delete aKey;
74 return kTRUE;
75 } else {
76 return kFALSE;
77 }
2c8628dd 78}
79
2c8628dd 80//_____________________________________________________________________________
9e1ceb13 81void AliCDBMetaData::PrintMetaData() {
82// print the object's metaData
83
84 AliInfo("**** Object's MetaData set ****");
85 AliInfo(Form(" Object's class name: %s", fObjectClassName.Data()));
86 AliInfo(Form(" Responsible: %s", fResponsible.Data()));
87 AliInfo(Form(" Beam period: %d", fBeamPeriod));
88 AliInfo(Form(" AliRoot version: %s", fAliRootVersion.Data()));
89 AliInfo(Form(" Comment: %s", fComment.Data()));
90 AliInfo(" Properties key names:");
91
92 TIter iter(fProperties.GetTable());
93 TPair* aPair;
94 while ((aPair = (TPair*) iter.Next())) {
95 AliInfo(Form(" %s",((TObjString* )aPair->Key())->String().Data()));
96 }
97
2c8628dd 98}