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

Public Member Functions

 MVAPID (fhicl::ParameterSet const &pset)
 
void beginJob ()
 
void produce (art::Event &evt)
 
- 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

MVAAlg fAlg
 
std::vector< anab::MVAPIDResult > * fResult
 
unsigned int fRun
 
unsigned int fSubrun
 
unsigned int fEvent
 
TTree * fTree
 

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 25 of file MVAPID_module.cc.

Constructor & Destructor Documentation

mvapid::MVAPID::MVAPID ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 41 of file MVAPID_module.cc.

41  : EDProducer{pset}, fAlg(pset)
42  {
43  produces<std::vector<anab::MVAPIDResult>>();
44  produces<art::Assns<recob::Track, anab::MVAPIDResult, void>>();
45  produces<art::Assns<recob::Shower, anab::MVAPIDResult, void>>();
46  fResult = new std::vector<anab::MVAPIDResult>;
47  }
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.h:20
std::vector< anab::MVAPIDResult > * fResult

Member Function Documentation

void mvapid::MVAPID::beginJob ( )
virtual

All-knowing tree with reconstruction information

Reimplemented from art::EDProducer.

Definition at line 51 of file MVAPID_module.cc.

52  {
54  fTree =
55  tfs->make<TTree>("MVAPID", "Results"); /**All-knowing tree with reconstruction information*/
56  fTree->Branch("run", &fRun, "run/I");
57  fTree->Branch("subrun", &fSubrun, "subrun/I");
58  fTree->Branch("event", &fEvent, "event/I");
59  fTree->Branch("MVAResult", &fResult);
62  }
unsigned int fSubrun
unsigned int fRun
void GetDetectorEdges()
Definition: MVAAlg.cxx:81
void GetWireNormals()
Definition: MVAAlg.cxx:104
unsigned int fEvent
std::vector< anab::MVAPIDResult > * fResult
void mvapid::MVAPID::produce ( art::Event evt)
virtual

Implements art::EDProducer.

Definition at line 66 of file MVAPID_module.cc.

67  {
68  std::unique_ptr<std::vector<anab::MVAPIDResult>> result(new std::vector<anab::MVAPIDResult>);
69  std::unique_ptr<art::Assns<recob::Track, anab::MVAPIDResult>> trackAssns(
71  std::unique_ptr<art::Assns<recob::Shower, anab::MVAPIDResult>> showerAssns(
73  fRun = evt.id().run();
74  fSubrun = evt.id().subRun();
75  fEvent = evt.id().event();
76  fAlg.RunPID(evt, *result, *trackAssns, *showerAssns);
77  *fResult = *result;
78  fTree->Fill();
79  evt.put(std::move(result));
80  evt.put(std::move(trackAssns));
81  evt.put(std::move(showerAssns));
82  }
static QCString result
unsigned int fSubrun
void RunPID(art::Event &evt, std::vector< anab::MVAPIDResult > &result, art::Assns< recob::Track, anab::MVAPIDResult, void > &trackAssns, art::Assns< recob::Shower, anab::MVAPIDResult, void > &showerAssns)
Definition: MVAAlg.cxx:137
RunNumber_t run() const
Definition: EventID.h:98
unsigned int fRun
def move(depos, offset)
Definition: depos.py:107
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
Definition: DataViewImpl.h:686
unsigned int fEvent
EventNumber_t event() const
Definition: EventID.h:116
std::vector< anab::MVAPIDResult > * fResult
SubRunNumber_t subRun() const
Definition: EventID.h:110
EventID id() const
Definition: Event.cc:34

Member Data Documentation

MVAAlg mvapid::MVAPID::fAlg
private

Definition at line 33 of file MVAPID_module.cc.

unsigned int mvapid::MVAPID::fEvent
private

Definition at line 35 of file MVAPID_module.cc.

std::vector<anab::MVAPIDResult>* mvapid::MVAPID::fResult
private

Definition at line 34 of file MVAPID_module.cc.

unsigned int mvapid::MVAPID::fRun
private

Definition at line 35 of file MVAPID_module.cc.

unsigned int mvapid::MVAPID::fSubrun
private

Definition at line 35 of file MVAPID_module.cc.

TTree* mvapid::MVAPID::fTree
private

Definition at line 36 of file MVAPID_module.cc.


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