Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
arttest::Reconstruction Class Reference
Inheritance diagram for arttest::Reconstruction:
art::SharedFilter art::detail::Filter art::detail::SharedModule art::Modifier art::ModuleBase art::ProductRegistryHelper

Classes

struct  Config
 

Public Types

using Parameters = Table< Config >
 
- Public Types inherited from art::SharedFilter
using ModuleType = SharedFilter
 
using WorkerType = WorkerT< SharedFilter >
 
- Public Types inherited from art::detail::Filter
template<typename UserConfig >
using Table = Modifier::Table< UserConfig >
 
- Public Types inherited from art::Modifier
template<typename UserConfig , typename UserKeysToIgnore = void>
using Table = ProducerTable< UserConfig, detail::ModuleConfig, UserKeysToIgnore >
 

Public Member Functions

 Reconstruction (Parameters const &, ProcessingFrame const &)
 
- Public Member Functions inherited from art::SharedFilter
 SharedFilter (fhicl::ParameterSet const &pset)
 
template<typename Config >
 SharedFilter (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Filter
virtual ~Filter () noexcept
 
 Filter ()
 
 Filter (fhicl::ParameterSet const &)
 
 Filter (Filter const &)=delete
 
 Filter (Filter &&)=delete
 
Filteroperator= (Filter const &)=delete
 
Filteroperator= (Filter &&)=delete
 
void doBeginJob ()
 
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 &)
 
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
virtual ~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 &)
 
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 ()
 
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)
 
- Public Member Functions inherited from art::detail::SharedModule
 SharedModule ()
 
 SharedModule (std::string const &moduleLabel)
 
 ~SharedModule () noexcept
 
hep::concurrency::SerialTaskQueueChain * serialTaskQueueChain () const
 
void createQueues ()
 
template<BranchType BT = InEvent, typename... T>
void serialize (T const &...)
 
template<BranchType BT = InEvent>
void async ()
 
template<BranchType , typename... T>
void serialize (T const &...resources)
 

Private Member Functions

void beginSubRun (SubRun &, ProcessingFrame const &) override
 
void endSubRun (SubRun &, ProcessingFrame const &) override
 
bool filter (Event &, ProcessingFrame const &) override
 

Private Attributes

double const threshold_
 
ProductToken< vector< double > > const particleEnergiesTkn_
 
std::atomic< unsigned > numerator_ {}
 
std::atomic< unsigned > denominator_ {}
 

Additional Inherited Members

- Static Public Attributes inherited from art::detail::Filter
static constexpr bool Pass {true}
 
static constexpr bool Fail {false}
 

Detailed Description

Definition at line 27 of file Reconstruction_module.cc.

Member Typedef Documentation

Definition at line 33 of file Reconstruction_module.cc.

Constructor & Destructor Documentation

arttest::Reconstruction::Reconstruction ( Parameters const &  config,
ProcessingFrame const &   
)
explicit

Definition at line 47 of file Reconstruction_module.cc.

50  , threshold_{config().threshold()}
51  , particleEnergiesTkn_{consumes<vector<double>>(config().inputTag())}
52  {
53  produces<arttest::CalibConstants, InSubRun>("CalibConstants");
54  produces<arttest::TrackEfficiency, InSubRun>("TrackEfficiency");
55  async<InEvent>();
56  }
ProductToken< vector< double > > const particleEnergiesTkn_

Member Function Documentation

void arttest::Reconstruction::beginSubRun ( SubRun sr,
ProcessingFrame const &   
)
overrideprivatevirtual

Reimplemented from art::SharedFilter.

Definition at line 59 of file Reconstruction_module.cc.

60  {
61  sr.put(make_unique<arttest::CalibConstants>(sr.subRun()),
62  "CalibConstants",
63  fullSubRun());
64  }
SubRunNumber_t subRun() const
Definition: DataViewImpl.cc:89
constexpr auto fullSubRun()
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
Definition: DataViewImpl.h:692
void arttest::Reconstruction::endSubRun ( SubRun sr,
ProcessingFrame const &   
)
overrideprivatevirtual

Reimplemented from art::SharedFilter.

Definition at line 67 of file Reconstruction_module.cc.

68  {
69  sr.put(make_unique<arttest::TrackEfficiency>(numerator_.load(),
70  denominator_.load()),
71  "TrackEfficiency",
72  subRunFragment());
73  numerator_ = 0u;
74  denominator_ = 0u;
75  }
std::atomic< unsigned > numerator_
std::atomic< unsigned > denominator_
constexpr auto subRunFragment()
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
Definition: DataViewImpl.h:692
bool arttest::Reconstruction::filter ( Event e,
ProcessingFrame const &   
)
overrideprivatevirtual

Implements art::SharedFilter.

Definition at line 78 of file Reconstruction_module.cc.

79  {
80  auto const& particleEnergies = *e.getValidHandle(particleEnergiesTkn_);
81  bool pass = false;
82  for (auto const& val : particleEnergies) {
83  if (val >= threshold_) {
84  pass = true;
85  ++numerator_;
86  break;
87  }
88  }
89  ++denominator_;
90  return pass;
91  }
const HLTPathStatus pass
std::atomic< unsigned > numerator_
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
Definition: DataViewImpl.h:480
std::atomic< unsigned > denominator_
ProductToken< vector< double > > const particleEnergiesTkn_

Member Data Documentation

std::atomic<unsigned> arttest::Reconstruction::denominator_ {}
private

Definition at line 44 of file Reconstruction_module.cc.

std::atomic<unsigned> arttest::Reconstruction::numerator_ {}
private

Definition at line 43 of file Reconstruction_module.cc.

ProductToken<vector<double> > const arttest::Reconstruction::particleEnergiesTkn_
private

Definition at line 42 of file Reconstruction_module.cc.

double const arttest::Reconstruction::threshold_
private

Definition at line 41 of file Reconstruction_module.cc.


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