/[PAMELA software]/chewbacca/event/RunInfoYoda.cpp
ViewVC logotype

Annotation of /chewbacca/event/RunInfoYoda.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (download) (vendor branch)
Tue Sep 23 07:19:51 2008 UTC (16 years, 2 months ago) by mocchiut
Branch: v0r00, MAIN
CVS Tags: v1r02, v1r00, v1r01, start, v10RED, v9r00, v9r01, HEAD
Changes since 1.1: +0 -0 lines
Imported sources, 23/09/2008

1 mocchiut 1.1 /** @file
2     * $Source: /repository/event/RunInfoYoda.cpp,v $
3     * $Id: RunInfoYoda.cpp,v 1.1 2008-03-11 14:26:18 messineo Exp $
4     * $Author: messineo $
5     *
6     * Implementation of the default functions of the Algorithm class.
7     */
8     extern "C" {
9     #include <unistd.h>
10     #include <time.h>
11     #include <stdlib.h>
12     #include <pwd.h>
13     #include <sys/types.h>
14     }
15     #include "RunInfoYoda.h"
16     #include "PamelaRun.h"
17     using namespace pamela;
18    
19     RunInfoYoda::RunInfoYoda(PamelaRun* run): UserName(getpwuid(geteuid())->pw_name),
20     DataPath( run->GetUnpackPath()),
21     RunNumber(run->GetRunNumber()) {
22     char* hostname = new char[1000];
23     gethostname(hostname, 1000);
24     HostName = TString(hostname);
25    
26     time_t t = time(NULL);
27     Time = TString(asctime(gmtime(&t)));
28     //marco: to avoid memory leaks
29     delete[] hostname;
30     }
31    
32     RunInfoYoda::RunInfoYoda(void) { }
33     RunInfoYoda::~RunInfoYoda(void) { }
34    
35     ClassImp(RunInfoYoda)

  ViewVC Help
Powered by ViewVC 1.1.23