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

Public Member Functions

 TH1DataProducer (fhicl::ParameterSet const &p)
 
- Public Member Functions inherited from art::EDProducer
 EDProducer ()=default
 
 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 ()
 
 Producer (fhicl::ParameterSet const &)
 
 Producer (Producer const &)=delete
 
 Producer (Producer &&)=delete
 
Produceroperator= (Producer const &)=delete
 
Produceroperator= (Producer &&)=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 &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
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)
 

Private Member Functions

void beginRun (art::Run &r) override
 
void endRun (art::Run &r) override
 
void produce (art::Event &e) override
 

Private Attributes

std::unique_ptr< arttest::TH1Datadata_ {std::make_unique<arttest::TH1Data>()}
 

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)
 

Detailed Description

Definition at line 26 of file TH1DataProducer_module.cc.

Constructor & Destructor Documentation

arttest::TH1DataProducer::TH1DataProducer ( fhicl::ParameterSet const &  p)
explicit

Definition at line 38 of file TH1DataProducer_module.cc.

39  : EDProducer{ps}
40 {
41  data_->data = TH1D("name", "title", 101, -.5, 100.5);
42  produces<arttest::TH1Data, art::InRun>();
43 }
static const double ps
Definition: Units.h:103
EDProducer()=default
std::unique_ptr< arttest::TH1Data > data_

Member Function Documentation

void arttest::TH1DataProducer::beginRun ( art::Run r)
overrideprivatevirtual

Reimplemented from art::EDProducer.

Definition at line 52 of file TH1DataProducer_module.cc.

53 {
54  // Implementation of optional member function here.
55 }
void arttest::TH1DataProducer::endRun ( art::Run r)
overrideprivatevirtual

Reimplemented from art::EDProducer.

Definition at line 58 of file TH1DataProducer_module.cc.

59 {
60  r.put(std::move(data_), art::runFragment());
61  // Implementation of optional member function here.
62 }
constexpr auto runFragment()
std::unique_ptr< arttest::TH1Data > data_
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
Definition: DataViewImpl.h:692
void arttest::TH1DataProducer::produce ( art::Event e)
overrideprivatevirtual

Implements art::EDProducer.

Definition at line 46 of file TH1DataProducer_module.cc.

47 {
48  data_->data.Fill(e.event() % 100, 1.);
49 }
EventNumber_t event() const
Definition: DataViewImpl.cc:96
std::unique_ptr< arttest::TH1Data > data_

Member Data Documentation

std::unique_ptr<arttest::TH1Data> arttest::TH1DataProducer::data_ {std::make_unique<arttest::TH1Data>()}
private

Definition at line 35 of file TH1DataProducer_module.cc.


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