Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ConstAssnsIterAnalyzer Class Reference
Inheritance diagram for ConstAssnsIterAnalyzer:
art::EDAnalyzer art::detail::Analyzer art::detail::LegacyModule art::Observer art::ModuleBase

Public Types

typedef std::vector< int > intvec_t
 
typedef std::vector< std::stringstrvec_t
 
typedef std::vector< float > floatvec_t
 
- Public Types inherited from art::EDAnalyzer
using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 ConstAssnsIterAnalyzer (fhicl::ParameterSet const &p)
 
 ConstAssnsIterAnalyzer (ConstAssnsIterAnalyzer const &)=delete
 
 ConstAssnsIterAnalyzer (ConstAssnsIterAnalyzer &&)=delete
 
ConstAssnsIterAnalyzeroperator= (ConstAssnsIterAnalyzer const &)=delete
 
ConstAssnsIterAnalyzeroperator= (ConstAssnsIterAnalyzer &&)=delete
 
void analyze (art::Event const &e) override
 
- Public Member Functions inherited from art::EDAnalyzer
 EDAnalyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDAnalyzer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Analyzer
virtual ~Analyzer () noexcept
 
 Analyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 Analyzer (Table< Config > const &config)
 
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::Observer
 ~Observer () noexcept
 
 Observer (Observer const &)=delete
 
 Observer (Observer &&)=delete
 
Observeroperator= (Observer const &)=delete
 
Observeroperator= (Observer &&)=delete
 
void registerProducts (ProductDescriptions &, ModuleDescription const &)
 
void fillDescriptions (ModuleDescription const &)
 
std::string const & processName () const
 
bool wantAllEvents () const
 
bool wantEvent (Event const &e)
 
fhicl::ParameterSetID selectorConfig () const
 
Handle< TriggerResultsgetTriggerResults (Event const &e) const
 
- 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 test (art::Event const &e) const
 

Private Attributes

art::InputTag fInputLabel
 

Additional Inherited Members

- Protected Member Functions inherited from art::Observer
 Observer (fhicl::ParameterSet const &config)
 
 Observer (std::vector< std::string > const &paths, fhicl::ParameterSet const &config)
 
detail::ProcessAndEventSelectorsprocessAndEventSelectors ()
 

Detailed Description

Definition at line 26 of file ConstAssnsIterAnalyzer_module.cc.

Member Typedef Documentation

typedef std::vector<float> ConstAssnsIterAnalyzer::floatvec_t

Definition at line 30 of file ConstAssnsIterAnalyzer_module.cc.

typedef std::vector<int> ConstAssnsIterAnalyzer::intvec_t

Definition at line 28 of file ConstAssnsIterAnalyzer_module.cc.

Definition at line 29 of file ConstAssnsIterAnalyzer_module.cc.

Constructor & Destructor Documentation

ConstAssnsIterAnalyzer::ConstAssnsIterAnalyzer ( fhicl::ParameterSet const &  p)
explicit

Definition at line 50 of file ConstAssnsIterAnalyzer_module.cc.

51  : EDAnalyzer(p), fInputLabel(p.get<art::InputTag>("input_label"))
52 // More initializers here.
53 {}
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.h:27
p
Definition: test.py:228
ConstAssnsIterAnalyzer::ConstAssnsIterAnalyzer ( ConstAssnsIterAnalyzer const &  )
delete
ConstAssnsIterAnalyzer::ConstAssnsIterAnalyzer ( ConstAssnsIterAnalyzer &&  )
delete

Member Function Documentation

void ConstAssnsIterAnalyzer::analyze ( art::Event const &  e)
overridevirtual

Implements art::EDAnalyzer.

Definition at line 56 of file ConstAssnsIterAnalyzer_module.cc.

57 {
59 }
void test(art::Event const &e) const
const double e
ConstAssnsIterAnalyzer& ConstAssnsIterAnalyzer::operator= ( ConstAssnsIterAnalyzer const &  )
delete
ConstAssnsIterAnalyzer& ConstAssnsIterAnalyzer::operator= ( ConstAssnsIterAnalyzer &&  )
delete
void ConstAssnsIterAnalyzer::test ( art::Event const &  e) const
private

Definition at line 62 of file ConstAssnsIterAnalyzer_module.cc.

63 {
64  typedef typename art::Assns<int, float, std::string> assns_t;
65  typedef typename art::const_AssnsIter<int, float, std::string> assnsiter_t;
66 
67  // vectors to verify values
68  auto const vi = intvec_t{1, 1, 2, 2, 3, 3};
69  auto const vs = strvec_t{"one", "one-a", "two", "two-a", "three", "three-a"};
70  auto const vf = floatvec_t{1.0, 1.1, 2.0, 2.1, 3.0, 3.1};
71 
72  const assns_t assns{*e.getValidHandle<assns_t>(fInputLabel)};
73  // iterator increment and dereference test
74  auto my_begin = assns.begin();
75  auto my_end = assns.end();
76  assert(my_begin != my_end);
77  int k = 0;
78  for (auto p = my_begin; p != my_end; ++p) {
79  assert(*((*p).data) == vs[k]);
80  assert(*((*p).second.get()) == vf[k]);
81  assert(*((*p).first.get()) == vi[k]);
82  ++k;
83  }
84 }
std::vector< int > intvec_t
const double e
std::vector< float > floatvec_t
std::vector< std::string > strvec_t
p
Definition: test.py:228

Member Data Documentation

art::InputTag ConstAssnsIterAnalyzer::fInputLabel
private

Definition at line 46 of file ConstAssnsIterAnalyzer_module.cc.


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