/** @file
 * $Source: /home/cvsmanager/yoda/event/RunInfo.cpp,v $
 * $Id: RunInfo.cpp,v 3.0 2005/03/04 15:54:11 kusanagi Exp $
 * $Author: kusanagi $
 * 
 * Implementation of the default functions of the Algorithm class.
 */
extern "C" {
#include <unistd.h>
#include <time.h>
#include <stdlib.h>
#include <pwd.h>
#include <sys/types.h>
}
#include "PamelaRun.h"
#include "RunInfo.h"

using namespace pamela;

RunInfo::RunInfo(PamelaRun* run):  UserName(getpwuid(geteuid())->pw_name), 
				   DataPath( getenv("YODA_DATA")), 
				   RunNumber(run->GetRunNumber()) {
  char* hostname = new char[1000];
  gethostname(hostname, 1000);
  HostName = TString(hostname);

  time_t t = time(NULL);
  Time = TString(asctime(gmtime(&t)));
}

RunInfo::RunInfo(void) { }
RunInfo::~RunInfo(void) { }

ClassImp(RunInfo)
