NtpMCEventRecord.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2019, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5  or see $GENIE/LICENSE
6 
7  Author: Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
8  University of Liverpool & STFC Rutherford Appleton Lab - October 01, 2004
9 
10  For the class documentation see the corresponding header file.
11 
12  Important revisions after version 2.0.0 :
13 
14 */
15 //____________________________________________________________________________
16 
20 
21 using std::endl;
22 
23 using namespace genie;
24 
26 
27 //____________________________________________________________________________
29  ostream & operator<< (ostream& stream, const NtpMCEventRecord & ntpp)
30  {
31  ntpp.PrintToStream(stream);
32  return stream;
33  }
34 }
35 //____________________________________________________________________________
38 {
39  this->Init();
40 }
41 //____________________________________________________________________________
44 {
45  this->Copy(ntpmcrec);
46 }
47 //____________________________________________________________________________
49 {
50  this->Clear();
51 }
52 //____________________________________________________________________________
54 {
55  stream << this->hdr << endl;
56  stream << *this->event << endl;
57 }
58 //____________________________________________________________________________
59 void NtpMCEventRecord::Fill(unsigned int ievent, const EventRecord * ev_rec)
60 {
61  this->event->Copy(*ev_rec);
62  this->hdr.ievent = ievent;
63 }
64 //____________________________________________________________________________
66 {
67  this->event->Copy(*ntpmcrec.event);
68  this->hdr.ievent = ntpmcrec.hdr.ievent;
69 }
70 //____________________________________________________________________________
72 {
73  this->event = new EventRecord;
74  this->hdr.ievent = 0;
75 }
76 //____________________________________________________________________________
77 void NtpMCEventRecord::Clear(Option_t * /*opt*/)
78 {
79  delete (this->event);
80  this->event = 0;
81  this->hdr.ievent = 0;
82 }
83 //____________________________________________________________________________
NtpMCRecHeader hdr
record header
Definition: NtpMCRecordI.h:39
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
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:30
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:38
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
void Clear(Option_t *opt="")
EventRecord * event
event