NtpMCEventRecord.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 
14 
15 using std::endl;
16 
17 using namespace genie;
18 
20 
21 //____________________________________________________________________________
22 namespace genie {
23  ostream & operator<< (ostream& stream, const NtpMCEventRecord & ntpp)
24  {
25  ntpp.PrintToStream(stream);
26  return stream;
27  }
28 }
29 //____________________________________________________________________________
32 {
33  this->Init();
34 }
35 //____________________________________________________________________________
38 {
39  this->Copy(ntpmcrec);
40 }
41 //____________________________________________________________________________
43 {
44  this->Clear();
45 }
46 //____________________________________________________________________________
48 {
49  stream << this->hdr << endl;
50  stream << *this->event << endl;
51 }
52 //____________________________________________________________________________
53 void NtpMCEventRecord::Fill(unsigned int ievent, const EventRecord * ev_rec)
54 {
55  this->event->Copy(*ev_rec);
56  this->hdr.ievent = ievent;
57 }
58 //____________________________________________________________________________
60 {
61  this->event->Copy(*ntpmcrec.event);
62  this->hdr.ievent = ntpmcrec.hdr.ievent;
63 }
64 //____________________________________________________________________________
66 {
67  this->event = new EventRecord;
68  this->hdr.ievent = 0;
69 }
70 //____________________________________________________________________________
71 void NtpMCEventRecord::Clear(Option_t * /*opt*/)
72 {
73  delete (this->event);
74  this->event = 0;
75  this->hdr.ievent = 0;
76 }
77 //____________________________________________________________________________
NtpMCRecHeader hdr
record header
Definition: NtpMCRecordI.h:38
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
MINOS-style ntuple record. Each such ntuple record holds a generated EventRecord object. Ntuples of this type are intended for feeding GENIE events into other applications (for example the GEANT4 based MC generation framework of an experiment) if no direct interface exists.
void Fill(unsigned int ievent, const EventRecord *ev_rec)
MINOS-style base class for ntuple records.
Definition: NtpMCRecordI.h:29
ClassImp(NtpMCEventRecord) namespace genie
unsigned int ievent
Event number.
void Copy(const NtpMCEventRecord &ntpmcrec)
void PrintToStream(ostream &stream) const
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
Definition: EventRecord.h:37
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
void Clear(Option_t *opt="")
EventRecord * event
event
QTextStream & endl(QTextStream &s)