EventRecord.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 
22 
23 using namespace genie;
24 
26 
27 //____________________________________________________________________________
29  ostream & operator<< (ostream& stream, const EventRecord & event_record)
30  {
31  event_record.Print(stream);
32  return stream;
33  }
34 }
35 //___________________________________________________________________________
37 GHepRecord()
38 {
39 
40 }
41 //___________________________________________________________________________
43 GHepRecord(size)
44 {
45 
46 }
47 //___________________________________________________________________________
49 GHepRecord(record)
50 {
51 
52 }
53 //___________________________________________________________________________
55 {
56 
57 }
58 //___________________________________________________________________________
60 {
61  visitor->ProcessEventRecord(this);
62 }
63 //___________________________________________________________________________
64 void EventRecord::Copy(const EventRecord & record)
65 {
66  try {
67  const GHepRecord & ghep = dynamic_cast<const GHepRecord &>(record);
68 
69  GHepRecord::Copy(ghep);
70 
71  } catch( std::bad_cast ) {
72  LOG("EventRecord", pERROR)
73  << "Bad casting to 'const GHepRecord &'. Can not copy EventRecord";
74  }
75 }
76 //___________________________________________________________________________
77 void EventRecord::Print(ostream & stream) const
78 {
79  GHepRecord::Print(stream);
80 }
81 //___________________________________________________________________________
virtual void Copy(const GHepRecord &record)
Definition: GHepRecord.cxx:943
void Print(ostream &stream) const
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
virtual void ProcessEventRecord(GHepRecord *event_rec) const =0
#define pERROR
Definition: Messenger.h:60
virtual void Copy(const EventRecord &record)
Definition: EventRecord.cxx:64
Defines the EventRecordVisitorI interface. Concrete implementations of this interface use the &#39;Visito...
virtual void Print(ostream &stream) const
Definition: EventRecord.cxx:77
ClassImp(EventRecord) namespace genie
Definition: EventRecord.cxx:25
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
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 AcceptVisitor(EventRecordVisitorI *visitor)
Definition: EventRecord.cxx:59
GENIE&#39;s GHEP MC event record.
Definition: GHepRecord.h:46