X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=STEER%2FAliCDBMetaData.cxx;h=779bd5445956f10cc31389ae41ac52a925cdfba1;hp=d0bc667f834f2cf8027b1685f84b6776ba7e00bc;hb=4453d90074bfdad23ca5dc949656684bd3a97b63;hpb=fe12e09c14250ca4a380175a67ffbd6bb844662e diff --git a/STEER/AliCDBMetaData.cxx b/STEER/AliCDBMetaData.cxx index d0bc667f834..779bd544595 100644 --- a/STEER/AliCDBMetaData.cxx +++ b/STEER/AliCDBMetaData.cxx @@ -25,6 +25,7 @@ #include "AliLog.h" #include +#include ClassImp(AliCDBMetaData) @@ -32,8 +33,8 @@ ClassImp(AliCDBMetaData) AliCDBMetaData::AliCDBMetaData() : TObject(), fObjectClassName(""), -fResponsible(""), -fBeamPeriod(0), +fResponsible(""), +fBeamPeriod(0), fAliRootVersion(""), fComment(""), fProperties() @@ -43,6 +44,22 @@ fProperties() 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 @@ -78,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 @@ -102,5 +135,6 @@ void AliCDBMetaData::PrintMetaData() { message += Form("\t\t%s\n", ((TObjString* ) aPair->Key())->String().Data()); } } - AliInfo(Form("**** Object's MetaData set **** \n%s", message.Data())); + message += '\n'; + AliInfo(Form("**** Object's MetaData parameters **** \n%s", message.Data())); }