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 **************************************************************************/
16 /////////////////////////////////////////////////////////////////////
18 // class AliCDBMetaData //
19 // Set of data describing the object //
20 // but not used to identify the object //
22 /////////////////////////////////////////////////////////////////////
24 #include "AliCDBMetaData.h"
27 #include <TObjString.h>
29 ClassImp(AliCDBMetaData)
31 //_____________________________________________________________________________
32 AliCDBMetaData::AliCDBMetaData() :
41 // default constructor
43 fProperties.SetOwner(1);
46 //_____________________________________________________________________________
47 AliCDBMetaData::~AliCDBMetaData() {
52 //_____________________________________________________________________________
53 void AliCDBMetaData::SetProperty(const char* property, TObject* object) {
54 // add something to the list of properties
56 fProperties.Add(new TObjString(property), object);
59 //_____________________________________________________________________________
60 TObject* AliCDBMetaData::GetProperty(const char* property) const {
61 // get a property specified by its name (property)
63 return fProperties.GetValue(property);
66 //_____________________________________________________________________________
67 Bool_t AliCDBMetaData::RemoveProperty(const char* property) {
70 TObjString objStrProperty(property);
71 TObjString* aKey = (TObjString*) fProperties.Remove(&objStrProperty);
81 //_____________________________________________________________________________
82 void AliCDBMetaData::PrintMetaData() {
83 // print the object's metaData
86 if(fObjectClassName != "")
87 message += Form("\tObject's class name: %s\n", fObjectClassName.Data());
88 if(fResponsible != "")
89 message += Form("\tResponsible: %s\n", fResponsible.Data());
91 message += Form("\tBeam period: %d\n", fBeamPeriod);
92 if(fAliRootVersion != "")
93 message += Form("\tAliRoot version: %s\n", fAliRootVersion.Data());
95 message += Form("\tComment: %s\n", fComment.Data());
96 if(fProperties.GetEntries() > 0){
97 message += "\tProperties key names:";
99 TIter iter(fProperties.GetTable());
101 while ((aPair = (TPair*) iter.Next())) {
102 message += Form("\t\t%s\n", ((TObjString* ) aPair->Key())->String().Data());
105 AliInfo(Form("**** Object's MetaData set **** \n%s", message.Data()));