GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EventRecord.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2024, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5 
6  Costas Andreopoulos <c.andreopoulos \at cern.ch>
7  University of Liverpool
8 */
9 //____________________________________________________________________________
10 
16 
17 using namespace genie;
18 
20 
21 //____________________________________________________________________________
22 namespace genie {
23  ostream & operator<< (ostream& stream, const EventRecord & event_record)
24  {
25  event_record.Print(stream);
26  return stream;
27  }
28 }
29 //___________________________________________________________________________
31 GHepRecord()
32 {
33 
34 }
35 //___________________________________________________________________________
37 GHepRecord(size)
38 {
39 
40 }
41 //___________________________________________________________________________
43 GHepRecord(record)
44 {
45 
46 }
47 //___________________________________________________________________________
49 {
50 
51 }
52 //___________________________________________________________________________
54 {
55  visitor->ProcessEventRecord(this);
56 }
57 //___________________________________________________________________________
58 void EventRecord::Copy(const EventRecord & record)
59 {
60  try {
61  const GHepRecord & ghep = dynamic_cast<const GHepRecord &>(record);
62 
63  GHepRecord::Copy(ghep);
64 
65  } catch( std::bad_cast ) {
66  LOG("EventRecord", pERROR)
67  << "Bad casting to 'const GHepRecord &'. Can not copy EventRecord";
68  }
69 }
70 //___________________________________________________________________________
71 void EventRecord::Print(ostream & stream) const
72 {
73  GHepRecord::Print(stream);
74 }
75 //___________________________________________________________________________
virtual void Copy(const GHepRecord &record)
Definition: GHepRecord.cxx:907
void Print(ostream &stream) const
Definition: GHepRecord.cxx:965
#define pERROR
Definition: Messenger.h:59
virtual void Copy(const EventRecord &record)
Definition: EventRecord.cxx:58
Defines the EventRecordVisitorI interface. Concrete implementations of this interface use the &#39;Visito...
virtual void Print(ostream &stream) const
Definition: EventRecord.cxx:71
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
virtual void ProcessEventRecord(GHepRecord *event_rec) const =0
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)
ClassImp(CacheBranchFx)
void AcceptVisitor(EventRecordVisitorI *visitor)
Definition: EventRecord.cxx:53
GENIE&#39;s GHEP MC event record.
Definition: GHepRecord.h:45