Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
Generator
src
Framework
Ntuple
NtpMCDTime.cxx
Go to the documentation of this file.
1
//____________________________________________________________________________
2
/*
3
Copyright (c) 2003-2020, The GENIE Collaboration
4
For the full text of the license visit http://copyright.genie-mc.org
5
6
Costas Andreopoulos <constantinos.andreopoulos \at cern.ch>
7
University of Liverpool & STFC Rutherford Appleton Laboratory
8
*/
9
//____________________________________________________________________________
10
11
#include <TDatime.h>
12
13
#include "
Framework/Ntuple/NtpMCDTime.h
"
14
15
using namespace
genie
;
16
17
ClassImp
(
NtpMCDTime
)
18
19
using
std
::
endl
;
20
21
//____________________________________________________________________________
22
namespace
genie
{
23
ostream &
operator<<
(ostream&
stream
,
const
NtpMCDTime
& dt)
24
{
25
dt.
PrintToStream
(stream);
26
return
stream
;
27
}
28
}
29
//____________________________________________________________________________
30
NtpMCDTime::NtpMCDTime
() :
31
TObject()
32
{
33
this->
Init
();
34
}
35
//____________________________________________________________________________
36
NtpMCDTime::NtpMCDTime
(
const
NtpMCDTime
& dt) :
37
TObject()
38
{
39
this->
Copy
(dt);
40
}
41
//____________________________________________________________________________
42
NtpMCDTime::~NtpMCDTime
()
43
{
44
45
}
46
//____________________________________________________________________________
47
void
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
//____________________________________________________________________________
54
void
NtpMCDTime::Copy
(
const
NtpMCDTime
& dt)
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
//____________________________________________________________________________
65
void
NtpMCDTime::Init
(
void
)
66
{
67
year
= 0;
68
month
= 0;
69
day
= 0;
70
hour
= 0;
71
min
= 0;
72
sec
= 0;
73
val
= 0;
74
}
75
//____________________________________________________________________________
76
void
NtpMCDTime::Now
(
void
)
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
//____________________________________________________________________________
genie::NtpMCDTime::year
Int_t year
Definition:
NtpMCDTime.h:52
genie
THE MAIN GENIE PROJECT NAMESPACE
Definition:
AlgCmp.h:25
genie::NtpMCDTime::hour
Int_t hour
Definition:
NtpMCDTime.h:55
val
Definition:
registry_via_id_test_2.cc:15
genie::NtpMCDTime::Init
void Init(void)
Definition:
NtpMCDTime.cxx:65
std
STL namespace.
NtpMCDTime.h
genie::NtpMCDTime::val
UInt_t val
sec since 1st Jan 1995 as in TDatime
Definition:
NtpMCDTime.h:58
genie::NtpMCDTime
MINOS-style Ntuple Class to hold the date and time that the event ntuple was generated.
Definition:
NtpMCDTime.h:33
genie::NtpMCDTime::month
Int_t month
Definition:
NtpMCDTime.h:53
reco_momentum_tuples.t
t
Definition:
reco_momentum_tuples.py:25
genie::NtpMCDTime::NtpMCDTime
NtpMCDTime()
Definition:
NtpMCDTime.cxx:30
generate_datataset.stream
stream
Definition:
generate_datataset.py:30
genie::NtpMCDTime::Copy
void Copy(const NtpMCDTime &dt)
Definition:
NtpMCDTime.cxx:54
genie::NtpMCDTime::Now
void Now(void)
Definition:
NtpMCDTime.cxx:76
ClassImp
ClassImp(EDep::TEventChangeManager) namespace
Definition:
TEventChangeManager.cxx:21
genie::operator<<
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
Definition:
AlgConfigPool.cxx:41
genie::NtpMCDTime::min
Int_t min
Definition:
NtpMCDTime.h:56
genie::NtpMCDTime::PrintToStream
void PrintToStream(ostream &stream) const
Definition:
NtpMCDTime.cxx:47
genie::NtpMCDTime::sec
Int_t sec
Definition:
NtpMCDTime.h:57
genie::NtpMCDTime::~NtpMCDTime
virtual ~NtpMCDTime()
Definition:
NtpMCDTime.cxx:42
genie::NtpMCDTime::day
Int_t day
Definition:
NtpMCDTime.h:54
endl
QTextStream & endl(QTextStream &s)
Definition:
qtextstream.cpp:2030
Generated by
1.8.11