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

Public Member Functions

 SplitterAnalyzer (fhicl::ParameterSet const &ps)
 
virtual ~SplitterAnalyzer ()
 
virtual 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 &)
 
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 Attributes

art::InputTag inputTag_
 
std::size_t nExpectedEvts_
 
std::size_t nEvts_
 
std::size_t nExpDigitsLastEvt_
 
std::size_t nExpDigitsPerEvt_
 

Additional Inherited Members

- Public Types inherited from art::EDAnalyzer
using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 
- 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 ()
 
- Protected Member Functions inherited from art::ModuleBase
ConsumesCollectorconsumesCollector ()
 
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 ()
 

Detailed Description

Definition at line 24 of file SplitterAnalyzer_module.cc.

Constructor & Destructor Documentation

arttest::SplitterAnalyzer::SplitterAnalyzer ( fhicl::ParameterSet const &  ps)
inlineexplicit

Definition at line 27 of file SplitterAnalyzer_module.cc.

27  :
29  inputTag_("SplitterInput:TPC"),
30  nExpectedEvts_(ps.get<std::size_t>("nExpectedEvents")),
31  nEvts_(),
32  nExpDigitsLastEvt_(ps.get<std::size_t>("nExpDigitsLastEvent")),
33  nExpDigitsPerEvt_(ps.get<std::size_t>("nExpDigitsPerEvent"))
34  {}
static const double ps
Definition: Units.h:102
virtual arttest::SplitterAnalyzer::~SplitterAnalyzer ( )
inlinevirtual

Definition at line 36 of file SplitterAnalyzer_module.cc.

36 {}

Member Function Documentation

virtual void arttest::SplitterAnalyzer::analyze ( art::Event const &  e)
inlineoverridevirtual

Implements art::EDAnalyzer.

Definition at line 38 of file SplitterAnalyzer_module.cc.

38  {
39 
40  ++nEvts_;
41  auto rawDigitsH = e.getValidHandle<rawDigits_t>( inputTag_ );
42  mf::LogDebug("DigitsTest") << "analyzing event: " << e.id() << " : " << rawDigitsH->size() << " digits present";
43  std::vector< art::Ptr<raw::RawDigit> > Digits;
44  art::fill_ptr_vector(Digits, rawDigitsH);
45 
46  assert (Digits.size() > 0);
47  art::Ptr<raw::RawDigit> digit = Digits.at(0);
48  std::size_t ticks = digit->Samples();
49 
50 
51  if ( nEvts_ < nExpectedEvts_ ) {
52  assert( ticks == nExpDigitsPerEvt_ );
53  }
54  else {
55  assert( ticks == nExpDigitsLastEvt_ );
56  }
57 
58  }
tick ticks
Alias for common language habits.
Definition: electronics.h:78
const double e
std::vector< raw::RawDigit > rawDigits_t
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:291

Member Data Documentation

art::InputTag arttest::SplitterAnalyzer::inputTag_
private

Definition at line 61 of file SplitterAnalyzer_module.cc.

std::size_t arttest::SplitterAnalyzer::nEvts_
private

Definition at line 63 of file SplitterAnalyzer_module.cc.

std::size_t arttest::SplitterAnalyzer::nExpDigitsLastEvt_
private

Definition at line 64 of file SplitterAnalyzer_module.cc.

std::size_t arttest::SplitterAnalyzer::nExpDigitsPerEvt_
private

Definition at line 65 of file SplitterAnalyzer_module.cc.

std::size_t arttest::SplitterAnalyzer::nExpectedEvts_
private

Definition at line 62 of file SplitterAnalyzer_module.cc.


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