GENIEGenerator
Loading...
Searching...
No Matches
NtpMCDTime.cxx
Go to the documentation of this file.
1//____________________________________________________________________________
2/*
3 Copyright (c) 2003-2025, The GENIE Collaboration
4 For the full text of the license visit http://copyright.genie-mc.org
5
6 Costas Andreopoulos <c.andreopoulos \at cern.ch>
7 University of Liverpool
8*/
9//____________________________________________________________________________
10
11#include <TDatime.h>
12
14
15using namespace genie;
16
18
19using std::endl;
20
21//____________________________________________________________________________
22namespace genie {
23 ostream & operator<< (ostream& stream, const NtpMCDTime & dt)
24 {
25 dt.PrintToStream(stream);
26 return stream;
27 }
28}
29//____________________________________________________________________________
31TObject()
32{
33 this->Init();
34}
35//____________________________________________________________________________
37TObject()
38{
39 this->Copy(dt);
40}
41//____________________________________________________________________________
46//____________________________________________________________________________
47void NtpMCDTime::PrintToStream(ostream & stream) const
48{
49 stream
50 << "DATE (dd/mm/yyyy): " << day << "/" << month << "/" << year
51 << ", TIME (hr:min:sec): " << hour << ":" << min << ":" << sec << endl;
52}
53//____________________________________________________________________________
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}
64//____________________________________________________________________________
66{
67 year = 0;
68 month = 0;
69 day = 0;
70 hour = 0;
71 min = 0;
72 sec = 0;
73 val = 0;
74}
75//____________________________________________________________________________
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}
88//____________________________________________________________________________
ClassImp(EventRecord) namespace genie
MINOS-style Ntuple Class to hold the date and time that the event ntuple was generated.
Definition NtpMCDTime.h:33
void PrintToStream(ostream &stream) const
virtual ~NtpMCDTime()
void Copy(const NtpMCDTime &dt)
UInt_t val
sec since 1st Jan 1995 as in TDatime
Definition NtpMCDTime.h:58
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)