]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliCDBMetaData.cxx
Added fit macro from M. Putis
[u/mrichter/AliRoot.git] / STEER / AliCDBMetaData.cxx
index 4a55caa34d06ff65c96378356b0f57b7a84ba9cc..779bd5445956f10cc31389ae41ac52a925cdfba1 100644 (file)
@@ -25,6 +25,7 @@
 #include "AliLog.h"
 
 #include <TObjString.h>
+#include <TTimeStamp.h>
 
 ClassImp(AliCDBMetaData)
 
@@ -94,6 +95,22 @@ Bool_t AliCDBMetaData::RemoveProperty(const char* property) {
        }
 }
 
+//_____________________________________________________________________________
+void AliCDBMetaData::AddDateToComment() {
+// add the date to the comment.
+// This method is supposed to be useful if called at the time when the object
+// is created, so that later it can more easily be tracked, in particular
+// when the date of the file can be lost or when one is interested in the
+// date of creation, irrespective of a later copy of it
+
+       TTimeStamp ts(time(0));
+       TString comment(GetComment());
+       comment += Form("\tDate of production: %s\n", ts.AsString());
+       comment.Remove(comment.Last('+'));
+       SetComment(comment);
+
+}
+
 //_____________________________________________________________________________
 void AliCDBMetaData::PrintMetaData() {
 // print the object's metaData