GENIEGenerator
Loading...
Searching...
No Matches
genie::NtpMCDTime Class Reference

MINOS-style Ntuple Class to hold the date and time that the event ntuple was generated. More...

#include <NtpMCDTime.h>

Inheritance diagram for genie::NtpMCDTime:
[legend]
Collaboration diagram for genie::NtpMCDTime:
[legend]

Public Member Functions

 NtpMCDTime ()
 NtpMCDTime (const NtpMCDTime &dt)
virtual ~NtpMCDTime ()
void Now (void)
void Init (void)
void Copy (const NtpMCDTime &dt)
void PrintToStream (ostream &stream) const

Public Attributes

Int_t year
Int_t month
Int_t day
Int_t hour
Int_t min
Int_t sec
UInt_t val
 sec since 1st Jan 1995 as in TDatime

Friends

ostream & operator<< (ostream &stream, const NtpMCDTime &dt)

Detailed Description

MINOS-style Ntuple Class to hold the date and time that the event ntuple was generated.

Author
Costas Andreopoulos <c.andreopoulos \at cern.ch> University of Liverpool
Created:\n October 18, 2004
License:\n Copyright (c) 2003-2025, The GENIE Collaboration
For the full text of the license visit http://copyright.genie-mc.org

Definition at line 33 of file NtpMCDTime.h.

Constructor & Destructor Documentation

◆ NtpMCDTime() [1/2]

NtpMCDTime::NtpMCDTime ( )

Definition at line 30 of file NtpMCDTime.cxx.

30 :
31TObject()
32{
33 this->Init();
34}

References Init().

Referenced by Copy(), NtpMCDTime(), and operator<<.

◆ NtpMCDTime() [2/2]

NtpMCDTime::NtpMCDTime ( const NtpMCDTime & dt)

Definition at line 36 of file NtpMCDTime.cxx.

36 :
37TObject()
38{
39 this->Copy(dt);
40}
void Copy(const NtpMCDTime &dt)

References Copy(), and NtpMCDTime().

◆ ~NtpMCDTime()

NtpMCDTime::~NtpMCDTime ( )
virtual

Definition at line 42 of file NtpMCDTime.cxx.

43{
44
45}

Member Function Documentation

◆ Copy()

void NtpMCDTime::Copy ( const NtpMCDTime & dt)

Definition at line 54 of file NtpMCDTime.cxx.

55{
56 year = dt.year;
57 month = dt.month;
58 day = dt.day;
59 hour = dt.hour;
60 min = dt.min;
61 sec = dt.sec;
62 val = dt.val;
63}
UInt_t val
sec since 1st Jan 1995 as in TDatime
Definition NtpMCDTime.h:58

References day, hour, min, month, NtpMCDTime(), sec, val, and year.

Referenced by NtpMCDTime().

◆ Init()

void NtpMCDTime::Init ( void )

Definition at line 65 of file NtpMCDTime.cxx.

66{
67 year = 0;
68 month = 0;
69 day = 0;
70 hour = 0;
71 min = 0;
72 sec = 0;
73 val = 0;
74}

References day, hour, min, month, sec, val, and year.

Referenced by NtpMCDTime().

◆ Now()

void NtpMCDTime::Now ( void )

Definition at line 76 of file NtpMCDTime.cxx.

77{
78 TDatime t;
79
80 year = t.GetYear();
81 month = t.GetMonth();
82 day = t.GetDay();
83 hour = t.GetHour();
84 min = t.GetMinute();
85 sec = t.GetSecond();
86 val = t.Get();
87}

References day, hour, min, month, sec, val, and year.

◆ PrintToStream()

void NtpMCDTime::PrintToStream ( ostream & stream) const

Definition at line 47 of file NtpMCDTime.cxx.

48{
49 stream
50 << "DATE (dd/mm/yyyy): " << day << "/" << month << "/" << year
51 << ", TIME (hr:min:sec): " << hour << ":" << min << ":" << sec << endl;
52}

References day, hour, min, month, sec, and year.

Referenced by operator<<.

◆ operator<<

ostream & operator<< ( ostream & stream,
const NtpMCDTime & dt )
friend

Definition at line 23 of file NtpMCDTime.cxx.

24 {
25 dt.PrintToStream(stream);
26 return stream;
27 }
void PrintToStream(ostream &stream) const

References NtpMCDTime(), and PrintToStream().

Member Data Documentation

◆ day

Int_t genie::NtpMCDTime::day

Definition at line 54 of file NtpMCDTime.h.

Referenced by Copy(), Init(), Now(), and PrintToStream().

◆ hour

Int_t genie::NtpMCDTime::hour

Definition at line 55 of file NtpMCDTime.h.

Referenced by Copy(), Init(), Now(), and PrintToStream().

◆ min

Int_t genie::NtpMCDTime::min

Definition at line 56 of file NtpMCDTime.h.

Referenced by Copy(), Init(), Now(), and PrintToStream().

◆ month

Int_t genie::NtpMCDTime::month

Definition at line 53 of file NtpMCDTime.h.

Referenced by Copy(), Init(), Now(), and PrintToStream().

◆ sec

Int_t genie::NtpMCDTime::sec

Definition at line 57 of file NtpMCDTime.h.

Referenced by Copy(), Init(), Now(), and PrintToStream().

◆ val

UInt_t genie::NtpMCDTime::val

sec since 1st Jan 1995 as in TDatime

Definition at line 58 of file NtpMCDTime.h.

Referenced by Copy(), Init(), and Now().

◆ year

Int_t genie::NtpMCDTime::year

Definition at line 52 of file NtpMCDTime.h.

Referenced by Copy(), Init(), Now(), and PrintToStream().


The documentation for this class was generated from the following files: