]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliCDBMetaData.cxx
Implementation of Grid CDB access using the Grid metadata tables.
[u/mrichter/AliRoot.git] / STEER / AliCDBMetaData.cxx
index cdb325d931f99799ef871096762fa1b9b18cb606..c33f1b7b505c6ea35947e00620d4effe769e596a 100644 (file)
@@ -81,18 +81,25 @@ 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());
+               }
        }
-       
+       AliInfo(Form("**** Object's MetaData set **** \n%s", message.Data()));
 }