Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
AssnsAnalyzerFEG Class Reference
Inheritance diagram for AssnsAnalyzerFEG:
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 art::Assns< std::string, int > strintAssns_t
 
- Public Types inherited from art::EDAnalyzer
using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 AssnsAnalyzerFEG (fhicl::ParameterSet const &p)
 
 AssnsAnalyzerFEG (AssnsAnalyzerFEG const &)=delete
 
 AssnsAnalyzerFEG (AssnsAnalyzerFEG &&)=delete
 
AssnsAnalyzerFEGoperator= (AssnsAnalyzerFEG const &)=delete
 
AssnsAnalyzerFEGoperator= (AssnsAnalyzerFEG &&)=delete
 
- 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 analyze (art::Event const &e) override
 
void for_each_group_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 29 of file AssnsAnalyzerFEG_module.cc.

Member Typedef Documentation

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

Definition at line 31 of file AssnsAnalyzerFEG_module.cc.

Definition at line 33 of file AssnsAnalyzerFEG_module.cc.

Definition at line 32 of file AssnsAnalyzerFEG_module.cc.

Constructor & Destructor Documentation

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

Definition at line 49 of file AssnsAnalyzerFEG_module.cc.

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

Member Function Documentation

void AssnsAnalyzerFEG::analyze ( art::Event const &  e)
overrideprivatevirtual

Implements art::EDAnalyzer.

Definition at line 55 of file AssnsAnalyzerFEG_module.cc.

56 {
58 }
void for_each_group_test(art::Event const &e) const
const double e
void AssnsAnalyzerFEG::for_each_group_test ( art::Event const &  e) const
private

Definition at line 61 of file AssnsAnalyzerFEG_module.cc.

62 {
63  typedef art::Assns<int, std::string> istr_assns;
64  auto const& int_to_str_assns = *e.getValidHandle<istr_assns>(fInputLabel);
65  auto vs = strvec_t{"one", "one-a", "two", "two-a", "three", "three-a"};
66 
67  strvec_t strvec;
68  auto strings = [&strvec](auto strs) {
69  for (auto s = begin(strs); s != end(strs); ++s) {
70  std::cout << *s << std::flush << " \"" << **s << "\"" << std::endl;
71  strvec.push_back(**s);
72  }
73  };
74 
75  art::for_each_group(int_to_str_assns, strings);
76 
77  // strings should be same as vs
78  for (auto k = 0; k < 6; ++k) {
79  if (strvec[k] != vs[k]) {
81  << "String #" << k << " expected to be '" << vs[k] << "', got '"
82  << strvec[k] << "' instead!\n";
83  }
84  }
85 
86 } // for_each_group_test()
std::vector< std::string > strings
const double e
auto begin(Data< Value > const &data)
std::vector< std::string > strvec_t
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
void for_each_group(art::Assns< A, B, D > const &assns, F func)
Helper functions to access associations in order.
end
Definition: test.py:8
static const double s
Definition: Units.h:99
AssnsAnalyzerFEG& AssnsAnalyzerFEG::operator= ( AssnsAnalyzerFEG const &  )
delete
AssnsAnalyzerFEG& AssnsAnalyzerFEG::operator= ( AssnsAnalyzerFEG &&  )
delete

Member Data Documentation

art::InputTag AssnsAnalyzerFEG::fInputLabel
private

Definition at line 46 of file AssnsAnalyzerFEG_module.cc.


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