All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
mvapid::MVAPID Class Reference
Inheritance diagram for mvapid::MVAPID:

Public Member Functions

 MVAPID (fhicl::ParameterSet const &pset)
 
void beginJob ()
 
void produce (art::Event &evt)
 

Private Attributes

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

Detailed Description

Definition at line 26 of file MVAPID_module.cc.

Constructor & Destructor Documentation

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

Definition at line 42 of file MVAPID_module.cc.

42  : EDProducer{pset}, fAlg(pset)
43  {
44  produces<std::vector<anab::MVAPIDResult>>();
45  produces<art::Assns<recob::Track, anab::MVAPIDResult, void>>();
46  produces<art::Assns<recob::Shower, anab::MVAPIDResult, void>>();
47  fResult = new std::vector<anab::MVAPIDResult>;
48  }
std::vector< anab::MVAPIDResult > * fResult

Member Function Documentation

void mvapid::MVAPID::beginJob ( )

All-knowing tree with reconstruction information

Definition at line 52 of file MVAPID_module.cc.

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

Definition at line 67 of file MVAPID_module.cc.

68  {
69  std::unique_ptr<std::vector<anab::MVAPIDResult>> result(new std::vector<anab::MVAPIDResult>);
70  std::unique_ptr<art::Assns<recob::Track, anab::MVAPIDResult>> trackAssns(
71  new art::Assns<recob::Track, anab::MVAPIDResult>);
72  std::unique_ptr<art::Assns<recob::Shower, anab::MVAPIDResult>> showerAssns(
73  new art::Assns<recob::Shower, anab::MVAPIDResult>);
74  fRun = evt.id().run();
75  fSubrun = evt.id().subRun();
76  fEvent = evt.id().event();
77  fAlg.RunPID(evt, *result, *trackAssns, *showerAssns);
78  *fResult = *result;
79  fTree->Fill();
80  evt.put(std::move(result));
81  evt.put(std::move(trackAssns));
82  evt.put(std::move(showerAssns));
83  }
unsigned int event
Definition: DataStructs.h:634
unsigned int run
Definition: DataStructs.h:635
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:147
unsigned int fRun
unsigned int fEvent
unsigned int subRun
Definition: DataStructs.h:636
TCEvent evt
Definition: DataStructs.cxx:8
std::vector< anab::MVAPIDResult > * fResult

Member Data Documentation

MVAAlg mvapid::MVAPID::fAlg
private

Definition at line 34 of file MVAPID_module.cc.

unsigned int mvapid::MVAPID::fEvent
private

Definition at line 36 of file MVAPID_module.cc.

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

Definition at line 35 of file MVAPID_module.cc.

unsigned int mvapid::MVAPID::fRun
private

Definition at line 36 of file MVAPID_module.cc.

unsigned int mvapid::MVAPID::fSubrun
private

Definition at line 36 of file MVAPID_module.cc.

TTree* mvapid::MVAPID::fTree
private

Definition at line 37 of file MVAPID_module.cc.


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