LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
EDProducer.cc
Go to the documentation of this file.
2 
12 #include "cetlib_except/demangle.h"
14 
15 namespace art {
16 
17  bool
19  CPC_exempt_ptr cpc,
20  CountingStatistics& counts)
21  {
23  Event e{ep, moduleDescription_, this};
24  counts.increment<stats::Run>();
25  produce(e);
26  e.commit(ep, checkPutProducts_, expectedProducts<InEvent>());
27  counts.increment<stats::Passed>();
28  return true;
29  }
30 
31  void
33  {
34  // 'checkPutProducts_' cannot be set during the c'tor
35  // initialization list since 'moduleDescription_' is empty there.
36  auto const& mainID = moduleDescription_.mainParameterSetID();
37  auto const& scheduler_pset =
39  "services.scheduler");
40  auto const& module_pset =
43  detail::get_failureToPut_flag(scheduler_pset, module_pset);
44  prepareForJob(scheduler_pset);
45  beginJob();
46  }
47 
48  void
50  {
51  endJob();
53  }
54 
55  bool
57  {
59  Run r{rp, moduleDescription_, this, RangeSet::forRun(rp.id())};
60  beginRun(r);
61  r.commit(rp);
62  return true;
63  }
64 
65  bool
67  {
69  Run r{rp, moduleDescription_, this, rp.seenRanges()};
70  endRun(r);
71  r.commit(rp);
72  return true;
73  }
74 
75  bool
77  {
79  SubRun sr{srp, moduleDescription_, this, RangeSet::forSubRun(srp.id())};
80  beginSubRun(sr);
81  sr.commit(srp);
82  return true;
83  }
84 
85  bool
87  {
89  SubRun sr{srp, moduleDescription_, this, srp.seenRanges()};
90  endSubRun(sr);
91  sr.commit(srp);
92  return true;
93  }
94 
95  void
97  {
99  }
100 
101  void
103  {
105  }
106 
107  void
109  {
111  }
112 
113  void
115  {
117  }
118 
121  {
122  return current_context_.get();
123  }
124 
125 } // art
fhicl::ParameterSetID const & mainParameterSetID() const
CPC_exempt_ptr current_context_
Definition: EDProducer.h:116
ModuleDescription moduleDescription_
Definition: EDProducer.h:115
void doBeginJob()
Definition: EDProducer.cc:32
virtual void beginJob()
Definition: EDProducer.h:73
virtual void endRun(Run &)
Definition: EDProducer.h:86
static collection_type const & get() noexcept
void doRespondToCloseInputFile(FileBlock const &fb)
Definition: EDProducer.cc:102
virtual void endSubRun(SubRun &)
Definition: EDProducer.h:89
virtual void respondToCloseInputFile(FileBlock const &)
Definition: EDProducer.h:96
cet::exempt_ptr< CurrentProcessingContext const > CPC_exempt_ptr
Definition: EDProducer.h:51
bool doEvent(EventPrincipal &ep, CPC_exempt_ptr cpcp, CountingStatistics &)
Definition: EDProducer.cc:18
bool doEndRun(RunPrincipal &rp, CPC_exempt_ptr cpc)
Definition: EDProducer.cc:66
Definition: Run.h:30
bool checkPutProducts_
Definition: EDProducer.h:117
RangeSet seenRanges() const override
virtual void beginSubRun(SubRun &)
Definition: EDProducer.h:83
virtual void beginRun(Run &)
Definition: EDProducer.h:80
SubRunID id() const
bool doEndSubRun(SubRunPrincipal &srp, CPC_exempt_ptr cpc)
Definition: EDProducer.cc:86
bool doBeginRun(RunPrincipal &rp, CPC_exempt_ptr cpc)
Definition: EDProducer.cc:56
virtual void endJob()
Definition: EDProducer.h:76
virtual void respondToCloseOutputFiles(FileBlock const &)
Definition: EDProducer.h:102
TFile fb("Li6.root")
fhicl::ParameterSetID const & parameterSetID() const
virtual void respondToOpenOutputFiles(FileBlock const &)
Definition: EDProducer.h:99
RangeSet seenRanges() const override
Definition: RunPrincipal.h:87
static RangeSet forRun(RunID)
Definition: RangeSet.cc:52
bool doBeginSubRun(SubRunPrincipal &srp, CPC_exempt_ptr cpc)
Definition: EDProducer.cc:76
CurrentProcessingContext const * currentContext() const
Definition: EDProducer.cc:120
static RangeSet forSubRun(SubRunID)
Definition: RangeSet.cc:58
RunID const & id() const
Definition: RunPrincipal.h:46
void prepareForJob(fhicl::ParameterSet const &pset)
Definition: Consumer.cc:89
void doRespondToOpenOutputFiles(FileBlock const &fb)
Definition: EDProducer.cc:108
void doRespondToCloseOutputFiles(FileBlock const &fb)
Definition: EDProducer.cc:114
void showMissingConsumes() const
Definition: Consumer.cc:125
HLT enums.
virtual void respondToOpenInputFile(FileBlock const &)
Definition: EDProducer.h:93
bool get_failureToPut_flag(fhicl::ParameterSet const &scheduler_pset, fhicl::ParameterSet const &module_pset)
void doRespondToOpenInputFile(FileBlock const &fb)
Definition: EDProducer.cc:96
Float_t e
Definition: plot.C:34
virtual void produce(Event &)=0