LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
artg4tk::HepevtInputActionService Class Reference

#include "HepevtInputAction_service.hh"

Inheritance diagram for artg4tk::HepevtInputActionService:
artg4tk::PrimaryGeneratorActionBase artg4tk::ActionBase

Public Member Functions

 HepevtInputActionService (fhicl::ParameterSet const &)
 
void initialize () override
 
void generatePrimaries (G4Event *anEvent) override
 
std::string const & myName () const
 

Private Attributes

std::unique_ptr< G4VPrimaryGenerator > HEPEvt_ {nullptr}
 
std::string fileName_
 

Detailed Description

Definition at line 48 of file HepevtInputAction_service.hh.

Constructor & Destructor Documentation

artg4tk::HepevtInputActionService::HepevtInputActionService ( fhicl::ParameterSet const &  p)

Definition at line 42 of file HepevtInputAction.cc.

43  : PrimaryGeneratorActionBase(p.get<std::string>("name", "HepevtInput"))
44  , fileName_(p.get<std::string>("FileName"))
45 {}

Member Function Documentation

void artg4tk::HepevtInputActionService::generatePrimaries ( G4Event *  anEvent)
overridevirtual

Reimplemented from artg4tk::PrimaryGeneratorActionBase.

Definition at line 58 of file HepevtInputAction.cc.

References HEPEvt_.

59 {
60  HEPEvt_->GeneratePrimaryVertex(anEvent);
61 }
std::unique_ptr< G4VPrimaryGenerator > HEPEvt_
void artg4tk::HepevtInputActionService::initialize ( )
overridevirtual

Reimplemented from artg4tk::ActionBase.

Definition at line 48 of file HepevtInputAction.cc.

References fileName_, and HEPEvt_.

49 {
50  mf::LogInfo("HepevtInputAction") << "Initializing Hepevt Input";
51  HEPEvt_ = std::make_unique<G4HEPEvtInterface>(fileName_.c_str());
52 }
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
std::unique_ptr< G4VPrimaryGenerator > HEPEvt_
std::string const& artg4tk::ActionBase::myName ( ) const
inlineinherited

Definition at line 25 of file ActionBase.hh.

References artg4tk::ActionBase::myName_.

26  {
27  return myName_;
28  }
std::string myName_
Definition: ActionBase.hh:41

Member Data Documentation

std::string artg4tk::HepevtInputActionService::fileName_
private

Definition at line 59 of file HepevtInputAction_service.hh.

Referenced by initialize().

std::unique_ptr<G4VPrimaryGenerator> artg4tk::HepevtInputActionService::HEPEvt_ {nullptr}
private

Definition at line 58 of file HepevtInputAction_service.hh.

Referenced by generatePrimaries(), and initialize().


The documentation for this class was generated from the following files: