Public Member Functions | Public Attributes | Friends | List of all members
genie::NtpMCTreeHeader Class Reference

MINOS-style Ntuple Class to hold an output MC Tree Header. More...

#include "/cvmfs/nova.opensciencegrid.org/externals/genie/v3_00_06_p01/Linux64bit+3.10-2.17-e17-debug/GENIE-Generator/src/Framework/Ntuple/NtpMCTreeHeader.h"

Inheritance diagram for genie::NtpMCTreeHeader:

Public Member Functions

 NtpMCTreeHeader ()
 
 NtpMCTreeHeader (const NtpMCTreeHeader &hdr)
 
virtual ~NtpMCTreeHeader ()
 
void Init (void)
 
void Copy (const NtpMCTreeHeader &hdr)
 
void PrintToStream (ostream &stream) const
 

Public Attributes

NtpMCFormat_t format
 Event Record format (GENIE support multiple formats) More...
 
TObjString cvstag
 GENIE CVS Tag (to keep track of GENIE's version) More...
 
NtpMCDTime datime
 Date and Time that the event ntuple was generated. More...
 
Long_t runnu
 MC Job run number. More...
 

Friends

ostream & operator<< (ostream &stream, const NtpMCTreeHeader &hdr)
 

Detailed Description

MINOS-style Ntuple Class to hold an output MC Tree Header.

Author
Costas Andreopoulos <costas.andreopoulos stfc.ac.uk> University of Liverpool & STFC Rutherford Appleton Lab

October 1, 2004

Copyright (c) 2003-2019, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org or see $GENIE/LICENSE

Definition at line 38 of file NtpMCTreeHeader.h.

Constructor & Destructor Documentation

NtpMCTreeHeader::NtpMCTreeHeader ( )

Definition at line 42 of file NtpMCTreeHeader.cxx.

References Init().

42  :
43 TNamed("header","GENIE output tree header")
44 {
45  this->Init();
46 }
NtpMCTreeHeader::NtpMCTreeHeader ( const NtpMCTreeHeader hdr)

Definition at line 48 of file NtpMCTreeHeader.cxx.

References Copy().

48  :
49 TNamed("header","GENIE output tree header")
50 {
51  this->Copy(hdr);
52 }
void Copy(const NtpMCTreeHeader &hdr)
NtpMCTreeHeader::~NtpMCTreeHeader ( )
virtual

Definition at line 54 of file NtpMCTreeHeader.cxx.

55 {
56 
57 }

Member Function Documentation

void NtpMCTreeHeader::Copy ( const NtpMCTreeHeader hdr)

Definition at line 71 of file NtpMCTreeHeader.cxx.

References genie::NtpMCDTime::Copy(), cvstag, datime, format, and runnu.

Referenced by NtpMCTreeHeader().

72 {
73  this->format = hdr.format;
74  this->cvstag.SetString(hdr.cvstag.GetString().Data());
75  this->datime.Copy(hdr.datime);
76  this->runnu = hdr.runnu;
77 }
NtpMCDTime datime
Date and Time that the event ntuple was generated.
TObjString cvstag
GENIE CVS Tag (to keep track of GENIE&#39;s version)
Long_t runnu
MC Job run number.
void Copy(const NtpMCDTime &dt)
Definition: NtpMCDTime.cxx:60
NtpMCFormat_t format
Event Record format (GENIE support multiple formats)
void NtpMCTreeHeader::Init ( void  )

Definition at line 79 of file NtpMCTreeHeader.cxx.

References cvstag, datime, shutoffs::filename, format, in, genie::kNFUndefined, LOG, genie::NtpMCDTime::Now(), pERROR, and runnu.

Referenced by NtpMCTreeHeader().

80 {
81  string version;
82  string genie_path = gSystem->Getenv("GENIE");
83  string filename = genie_path + "/VERSION";
84  bool vrs_file_found = ! (gSystem->AccessPathName(filename.c_str()));
85  if (!vrs_file_found) {
86  LOG("Ntp", pERROR)
87  << "The GENIE version file [" << filename << "] is not accessible";
88  version = "NO CVS version number was specified";
89  } else {
90  ifstream gvinp(filename.c_str(), ios::in);
91  gvinp >> version;
92  gvinp.close();
93  }
94 
95  this->format = kNFUndefined;
96  this->cvstag.SetString(version.c_str());
97  this->datime.Now();
98  this->runnu = 0;
99 }
#define pERROR
Definition: Messenger.h:60
NtpMCDTime datime
Date and Time that the event ntuple was generated.
string filename
Definition: shutoffs.py:106
TObjString cvstag
GENIE CVS Tag (to keep track of GENIE&#39;s version)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
Long_t runnu
MC Job run number.
const XML_Char * version
Definition: expat.h:187
void Now(void)
Definition: NtpMCDTime.cxx:82
ifstream in
Definition: comparison.C:7
NtpMCFormat_t format
Event Record format (GENIE support multiple formats)
void NtpMCTreeHeader::PrintToStream ( ostream &  stream) const

Definition at line 59 of file NtpMCTreeHeader.cxx.

References genie::NtpMCFormat::AsString(), cvstag, datime, allTimeWatchdog::endl, format, and runnu.

Referenced by genie::operator<<().

60 {
61  string sformat = NtpMCFormat::AsString(this->format);
62  string scvstag = this->cvstag.GetString().Data();
63 
64  stream << "Tree Header Info:" << endl
65  << "MC run number -> " << this->runnu << endl
66  << "NtpRecord Format -> " << sformat << endl
67  << "GENIE CVS Vrs Nu -> " << scvstag << endl
68  << "File generated at -> " << this->datime << endl;
69 }
NtpMCDTime datime
Date and Time that the event ntuple was generated.
TObjString cvstag
GENIE CVS Tag (to keep track of GENIE&#39;s version)
Long_t runnu
MC Job run number.
static const char * AsString(NtpMCFormat_t fmt)
Definition: NtpMCFormat.h:37
NtpMCFormat_t format
Event Record format (GENIE support multiple formats)

Friends And Related Function Documentation

ostream& operator<< ( ostream &  stream,
const NtpMCTreeHeader hdr 
)
friend

Definition at line 35 of file NtpMCTreeHeader.cxx.

36  {
37  hdr.PrintToStream(stream);
38  return stream;
39  }
void PrintToStream(ostream &stream) const

Member Data Documentation

TObjString genie::NtpMCTreeHeader::cvstag

GENIE CVS Tag (to keep track of GENIE's version)

Definition at line 58 of file NtpMCTreeHeader.h.

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

NtpMCDTime genie::NtpMCTreeHeader::datime

Date and Time that the event ntuple was generated.

Definition at line 59 of file NtpMCTreeHeader.h.

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

NtpMCFormat_t genie::NtpMCTreeHeader::format

Event Record format (GENIE support multiple formats)

Definition at line 57 of file NtpMCTreeHeader.h.

Referenced by Copy(), genie::NtpWriter::CreateTreeHeader(), Init(), and PrintToStream().

Long_t genie::NtpMCTreeHeader::runnu

MC Job run number.

Definition at line 60 of file NtpMCTreeHeader.h.

Referenced by Copy(), genie::NtpWriter::CreateTreeHeader(), Init(), and PrintToStream().


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