X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=STEER%2FAliCDBMetaData.cxx;h=4a55caa34d06ff65c96378356b0f57b7a84ba9cc;hb=cc1016607ec41f3e281e4f94d09c157991137f24;hp=a7004419434fefea4e3ab4d38f272db223641113;hpb=9e1ceb13c690a7673f9720e254c12f53b7777dee;p=u%2Fmrichter%2FAliRoot.git diff --git a/STEER/AliCDBMetaData.cxx b/STEER/AliCDBMetaData.cxx index a7004419434..4a55caa34d0 100644 --- a/STEER/AliCDBMetaData.cxx +++ b/STEER/AliCDBMetaData.cxx @@ -29,12 +29,36 @@ ClassImp(AliCDBMetaData) //_____________________________________________________________________________ -AliCDBMetaData::AliCDBMetaData() { +AliCDBMetaData::AliCDBMetaData() : +TObject(), +fObjectClassName(""), +fResponsible(""), +fBeamPeriod(0), +fAliRootVersion(""), +fComment(""), +fProperties() +{ // default constructor fProperties.SetOwner(1); } +//_____________________________________________________________________________ +AliCDBMetaData::AliCDBMetaData(const char *responsible, UInt_t beamPeriod, + const char* alirootVersion, const char* comment) : +TObject(), +fObjectClassName(""), +fResponsible(responsible), +fBeamPeriod(beamPeriod), +fAliRootVersion(alirootVersion), +fComment(comment), +fProperties() +{ +// constructor + + fProperties.SetOwner(1); +} + //_____________________________________________________________________________ AliCDBMetaData::~AliCDBMetaData() { // destructor @@ -74,18 +98,26 @@ Bool_t AliCDBMetaData::RemoveProperty(const char* property) { void AliCDBMetaData::PrintMetaData() { // print the object's metaData - AliInfo("**** Object's MetaData set ****"); - AliInfo(Form(" Object's class name: %s", fObjectClassName.Data())); - AliInfo(Form(" Responsible: %s", fResponsible.Data())); - AliInfo(Form(" Beam period: %d", fBeamPeriod)); - AliInfo(Form(" AliRoot version: %s", fAliRootVersion.Data())); - AliInfo(Form(" Comment: %s", fComment.Data())); - AliInfo(" Properties key names:"); - - TIter iter(fProperties.GetTable()); - TPair* aPair; - while ((aPair = (TPair*) iter.Next())) { - AliInfo(Form(" %s",((TObjString* )aPair->Key())->String().Data())); + TString message; + if(fObjectClassName != "") + message += Form("\tObject's class name: %s\n", fObjectClassName.Data()); + if(fResponsible != "") + message += Form("\tResponsible: %s\n", fResponsible.Data()); + if(fBeamPeriod != 0) + message += Form("\tBeam period: %d\n", fBeamPeriod); + if(fAliRootVersion != "") + message += Form("\tAliRoot version: %s\n", fAliRootVersion.Data()); + if(fComment != "") + message += Form("\tComment: %s\n", fComment.Data()); + if(fProperties.GetEntries() > 0){ + message += "\tProperties key names:"; + + TIter iter(fProperties.GetTable()); + TPair* aPair; + while ((aPair = (TPair*) iter.Next())) { + message += Form("\t\t%s\n", ((TObjString* ) aPair->Key())->String().Data()); + } } - + message += '\n'; + AliInfo(Form("**** Object's MetaData parameters **** \n%s", message.Data())); }