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

Public Member Functions

 TestRemoveCachedProduct (fhicl::ParameterSet const &p)
 
 TestRemoveCachedProduct (TestRemoveCachedProduct const &)=delete
 
 TestRemoveCachedProduct (TestRemoveCachedProduct &&)=delete
 
TestRemoveCachedProductoperator= (TestRemoveCachedProduct const &)=delete
 
TestRemoveCachedProductoperator= (TestRemoveCachedProduct &&)=delete
 
void analyze (art::Event const &e) override
 
void endSubRun (art::SubRun const &sr) override
 
void endRun (art::Run const &r) 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)
 

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 ()
 

Detailed Description

Definition at line 26 of file TestRemoveCachedProduct_module.cc.

Constructor & Destructor Documentation

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

Definition at line 46 of file TestRemoveCachedProduct_module.cc.

48  : EDAnalyzer(p) // ,
49  // More initializers here.
50 {}
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.h:27
p
Definition: test.py:228
arttest::TestRemoveCachedProduct::TestRemoveCachedProduct ( TestRemoveCachedProduct const &  )
delete
arttest::TestRemoveCachedProduct::TestRemoveCachedProduct ( TestRemoveCachedProduct &&  )
delete

Member Function Documentation

void arttest::TestRemoveCachedProduct::analyze ( art::Event const &  e)
overridevirtual

Implements art::EDAnalyzer.

Definition at line 53 of file TestRemoveCachedProduct_module.cc.

54 {
56  BOOST_CHECK(!hi.isValid());
57  BOOST_CHECK(!e.removeCachedProduct(hi));
58  BOOST_CHECK(e.getByLabel("m1a", hi));
59  BOOST_CHECK(hi.isValid());
60  BOOST_CHECK_EQUAL(hi->size(), 16ul);
61  BOOST_CHECK(e.removeCachedProduct(hi));
62  BOOST_CHECK(!hi.isValid());
63 }
bool isValid() const
Definition: Handle.h:190
const double e
void arttest::TestRemoveCachedProduct::endRun ( art::Run const &  r)
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 79 of file TestRemoveCachedProduct_module.cc.

80 {
82  BOOST_CHECK(!hi.isValid());
83  BOOST_CHECK(!r.removeCachedProduct(hi));
84  r.getByLabel("m3", hi);
85  BOOST_CHECK(hi.isValid());
86  BOOST_CHECK_EQUAL(hi->value, 2);
87  BOOST_CHECK(r.removeCachedProduct(hi));
88  BOOST_CHECK(!hi.isValid());
89 }
bool isValid() const
Definition: Handle.h:190
void arttest::TestRemoveCachedProduct::endSubRun ( art::SubRun const &  sr)
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 66 of file TestRemoveCachedProduct_module.cc.

67 {
69  BOOST_CHECK(!hi.isValid());
70  BOOST_CHECK(!sr.removeCachedProduct(hi));
71  sr.getByLabel("m2", hi);
72  BOOST_CHECK(hi.isValid());
73  BOOST_CHECK_EQUAL(hi->value, 1);
74  BOOST_CHECK(sr.removeCachedProduct(hi));
75  BOOST_CHECK(!hi.isValid());
76 }
bool isValid() const
Definition: Handle.h:190
static const double sr
Definition: Units.h:167
TestRemoveCachedProduct& arttest::TestRemoveCachedProduct::operator= ( TestRemoveCachedProduct const &  )
delete
TestRemoveCachedProduct& arttest::TestRemoveCachedProduct::operator= ( TestRemoveCachedProduct &&  )
delete

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