Public Member Functions | Private Attributes | List of all members
VLN::VLNEnergyProducer Class Reference
Inheritance diagram for VLN::VLNEnergyProducer:
art::EDProducer art::detail::Producer art::detail::LegacyModule art::Modifier art::ModuleBase art::ProductRegistryHelper

Public Member Functions

 VLNEnergyProducer (const fhicl::ParameterSet &pset)
 
void produce (art::Event &evt) override
 
- Public Member Functions inherited from art::EDProducer
 EDProducer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDProducer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Producer
virtual ~Producer () noexcept
 
 Producer (fhicl::ParameterSet const &)
 
 Producer (Producer const &)=delete
 
 Producer (Producer &&)=delete
 
Produceroperator= (Producer const &)=delete
 
Produceroperator= (Producer &&)=delete
 
void doBeginJob (SharedResources const &resources)
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
- Public Member Functions inherited from art::Modifier
 ~Modifier () noexcept
 
 Modifier ()
 
 Modifier (Modifier const &)=delete
 
 Modifier (Modifier &&)=delete
 
Modifieroperator= (Modifier const &)=delete
 
Modifieroperator= (Modifier &&)=delete
 
- Public Member Functions inherited from art::ModuleBase
virtual ~ModuleBase () noexcept
 
 ModuleBase ()
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Private Attributes

DefaultInputVarExtractor inputVarExtractor
 
VLNEnergyModel model
 
VarDict vars
 

Additional Inherited Members

- Public Types inherited from art::EDProducer
using ModuleType = EDProducer
 
using WorkerType = WorkerT< EDProducer >
 
- Public Types inherited from art::detail::Producer
template<typename UserConfig , typename KeysToIgnore = void>
using Table = Modifier::Table< UserConfig, KeysToIgnore >
 
- Public Types inherited from art::Modifier
template<typename UserConfig , typename UserKeysToIgnore = void>
using Table = ProducerTable< UserConfig, detail::ModuleConfig, UserKeysToIgnore >
 
- Static Public Member Functions inherited from art::EDProducer
static void commitEvent (EventPrincipal &ep, Event &e)
 
- Protected Member Functions inherited from art::ModuleBase
ConsumesCollectorconsumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Detailed Description

Definition at line 9 of file VLNEnergyProducer_module.cc.

Constructor & Destructor Documentation

VLN::VLNEnergyProducer::VLNEnergyProducer ( const fhicl::ParameterSet pset)
explicit

Definition at line 21 of file VLNEnergyProducer_module.cc.

22  : EDProducer(pset),
23  inputVarExtractor("", pset.get<fhicl::ParameterSet>("ConfigInputVars")),
24  model(pset.get<std::string>("ModelPath"))
25 {
26  produces<VLNEnergy>();
27 }
std::string string
Definition: nybbler.cc:12
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.h:20
T get(std::string const &key) const
Definition: ParameterSet.h:271
DefaultInputVarExtractor inputVarExtractor

Member Function Documentation

void VLN::VLNEnergyProducer::produce ( art::Event evt)
overridevirtual

Implements art::EDProducer.

Definition at line 29 of file VLNEnergyProducer_module.cc.

30 {
32  VLNEnergy energy = model.predict(vars);
33 
34  evt.put(std::make_unique<VLNEnergy>(std::move(energy)));
35 }
Definition: model.py:1
virtual void extract(const art::Event &evt, VarDict &vars)
def move(depos, offset)
Definition: depos.py:107
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
Definition: DataViewImpl.h:686
DefaultInputVarExtractor inputVarExtractor

Member Data Documentation

DefaultInputVarExtractor VLN::VLNEnergyProducer::inputVarExtractor
private

Definition at line 16 of file VLNEnergyProducer_module.cc.

VLNEnergyModel VLN::VLNEnergyProducer::model
private

Definition at line 17 of file VLNEnergyProducer_module.cc.

VarDict VLN::VLNEnergyProducer::vars
private

Definition at line 18 of file VLNEnergyProducer_module.cc.


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