EventLibraryInterface.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::evtlib::EventLibraryInterface
5 
6 \brief Reads pre-generated events produced by an external generator.
7  On an event-by-event basis, it can accept GENIE input specifying
8  the neutrino and target IDs and neutrino energy and, therefore,
9  it can re-use the upstream GENIE flux and geometry tools.
10 
11 \author
12 
13 \created February 28, 2020
14 
15 \cpright Copyright (c) 2003-2020, The GENIE Collaboration
16  For the full text of the license visit http://copyright.genie-mc.org
17 */
18 //____________________________________________________________________________
19 
20 #ifndef _EVENT_LIBRARY_INTERFACE_H_
21 #define _EVENT_LIBRARY_INTERFACE_H_
22 
23 #include "Tools/EvtLib/Key.h"
24 
26 
27 #include "TVector3.h"
28 
29 namespace genie {
30 
31 class Interaction;
32 
33 namespace evtlib {
34 
35 class IEvtLibRecordList;
36 class EvtLibRecord;
37 
39 
40 public:
44 
45  // implement the EventRecordVisitorI interface
46  void ProcessEventRecord (GHepRecord * event) const override ;
47 
48  // overload the Algorithm::Configure() methods to load private data
49  // members from configuration options
50  void Configure(const Registry & config) override ;
51  void Configure(string config) override ;
52 
53  protected:
54 
55  const EvtLibRecord* GetRecord(const Interaction* interaction) const;
56 
57  void LoadRecords();
58  void Cleanup();
59 
60  void FillKinematics( const GHepRecord &,
61  Kinematics & kine,
62  int primary_lep_id ) const ;
63 
64 private:
65 
66  std::map<Key, const IEvtLibRecordList*> fRecords;
67  TFile* fRecordFile;
68 };
69 
70 } // evtlib namespace
71 } // genie namespace
72 
73 #endif // _EVENT_LIBRARY_INTERFACE_H_
std::map< Key, const IEvtLibRecordList * > fRecords
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
Defines the EventRecordVisitorI interface. Concrete implementations of this interface use the &#39;Visito...
void Configure(const Registry &config) override
Reads pre-generated events produced by an external generator. On an event-by-event basis...
Generated/set kinematical variables for an event.
Definition: Kinematics.h:39
Summary information for an interaction.
Definition: Interaction.h:56
static Config * config
Definition: config.cpp:1054
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
const EvtLibRecord * GetRecord(const Interaction *interaction) const
GENIE&#39;s GHEP MC event record.
Definition: GHepRecord.h:45
Event finding and building.
void FillKinematics(const GHepRecord &, Kinematics &kine, int primary_lep_id) const
void ProcessEventRecord(GHepRecord *event) const override