LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::FileDumperOutput Class Reference
Inheritance diagram for art::FileDumperOutput:
art::OutputModule art::Observer art::detail::SharedModule art::ModuleBase

Classes

struct  Config
 

Public Types

using Parameters = fhicl::WrappedTable< Config, OutputModule::Config::KeysToIgnore >
 
using ModuleType = OutputModule
 
using WorkerType = OutputWorker
 
using PluginCollection_t = std::vector< std::unique_ptr< FileCatalogMetadataPlugin >>
 

Public Member Functions

 FileDumperOutput (Parameters const &)
 
bool fileIsOpen () const
 
OutputFileStatus fileStatus () const
 
virtual std::string const & lastClosedFileName () const
 
SelectionsArray const & keptProducts () const
 
bool selected (BranchDescription const &) const
 
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch () const
 
void selectProducts (ProductTables const &)
 
void doSelectProducts (ProductTables const &)
 
void registerProducts (ProductDescriptions &)
 
BranchChildren const & branchChildren () const
 
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)
 
std::unique_ptr< WorkermakeWorker (WorkerParams const &wp)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 
hep::concurrency::SerialTaskQueueChain * serialTaskQueueChain () const
 
std::set< std::string > const & sharedResources () const
 
void createQueues (SharedResources const &resources)
 
template<BranchType , typename... T>
void serialize (T const &...resources)
 
template<BranchType , typename... T>
void serializeExternal (T const &...resources)
 

Protected Member Functions

virtual void doRegisterProducts (ProductDescriptions &, ModuleDescription const &)
 
std::string const & processName () const
 
bool wantAllEvents () const noexcept
 
bool wantEvent (ScheduleID id, Event const &e) const
 
Handle< TriggerResultsgetTriggerResults (Event const &e) const
 
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 ()
 
template<BranchType BT = InEvent, typename... T>
void serialize (T const &...)
 
template<BranchType BT = InEvent, typename... T>
void serializeExternal (T const &...)
 
template<BranchType BT = InEvent>
void async ()
 

Private Member Functions

void write (EventPrincipal &e) override
 
void writeRun (RunPrincipal &r) override
 
void writeSubRun (SubRunPrincipal &sr) override
 
void readResults (ResultsPrincipal const &resp) override
 
template<typename P >
void printPrincipal (P const &p)
 
void printProductInfo (std::vector< std::size_t > const &columnWidths, std::string const &processName, detail::ProductInfo const &pi) const
 

Private Attributes

bool const wantProductFullClassName_
 
bool const wantProductFriendlyClassName_
 
bool const wantProductID_
 
bool const wantResolveProducts_
 
bool const wantPresentOnly_
 

Detailed Description

Definition at line 95 of file FileDumperOutput_module.cc.

Member Typedef Documentation

Definition at line 53 of file OutputModule.h.

using art::OutputModule::PluginCollection_t = std::vector<std::unique_ptr<FileCatalogMetadataPlugin>>
inherited

Definition at line 57 of file OutputModule.h.

Definition at line 54 of file OutputModule.h.

Constructor & Destructor Documentation

art::FileDumperOutput::FileDumperOutput ( Parameters const &  ps)
explicit

Definition at line 135 of file FileDumperOutput_module.cc.

References wantPresentOnly_, wantProductFriendlyClassName_, wantProductFullClassName_, wantProductID_, and wantResolveProducts_.

136  : OutputModule{ps().omConfig}
137  , wantProductFullClassName_{ps().wantProductFullClassName()}
138  , wantProductFriendlyClassName_{ps().wantProductFriendlyClassName()}
139  , wantProductID_{ps().wantProductID()}
140  , wantResolveProducts_{ps().resolveProducts()}
141  , wantPresentOnly_{ps().onlyIfPresent()}
142 {}
OutputModule(fhicl::ParameterSet const &pset)
Definition: OutputModule.cc:74

Member Function Documentation

template<BranchType BT = InEvent>
void art::detail::SharedModule::async ( )
inlineprotectedinherited

Definition at line 38 of file SharedModule.h.

References art::detail::SharedModule::asyncDeclared_, art::detail::SharedModule::implicit_serialize(), art::InEvent, and art::detail::SharedModule::serialize_for().

39  {
40  static_assert(
41  BT == InEvent,
42  "async is currently supported only for the 'InEvent' level.");
43  asyncDeclared_ = true;
44  }
BranchChildren const & art::OutputModule::branchChildren ( ) const
inherited

Definition at line 660 of file OutputModule.cc.

References art::OutputModule::branchChildren_.

661  {
662  return branchChildren_;
663  }
BranchChildren branchChildren_
Definition: OutputModule.h:233
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::consumes ( InputTag const &  tag)
protectedinherited

Definition at line 61 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::consumes().

62  {
63  return collector_.consumes<T, BT>(tag);
64  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
ProductToken< T > consumes(InputTag const &)
ConsumesCollector & art::ModuleBase::consumesCollector ( )
protectedinherited

Definition at line 57 of file ModuleBase.cc.

References art::ModuleBase::collector_.

58  {
59  return collector_;
60  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename T , BranchType BT>
void art::ModuleBase::consumesMany ( )
protectedinherited

Definition at line 75 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::consumesMany().

76  {
77  collector_.consumesMany<T, BT>();
78  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::consumesView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::consumesView ( InputTag const &  tag)
inherited

Definition at line 68 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::consumesView().

69  {
70  return collector_.consumesView<T, BT>(tag);
71  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
ViewToken< Element > consumesView(InputTag const &)
void art::detail::SharedModule::createQueues ( SharedResources const &  resources)
inherited

Definition at line 34 of file SharedModule.cc.

References art::detail::SharedModule::asyncDeclared_, util::cbegin(), util::cend(), art::detail::SharedModule::chain_, art::detail::SharedResources::createQueues(), e, util::empty(), art::errors::LogicError, and art::detail::SharedModule::resourceNames_.

Referenced by art::OutputModule::doBeginJob(), art::SharedFilter::setupQueues(), art::SharedProducer::setupQueues(), art::EDFilter::setupQueues(), art::SharedAnalyzer::setupQueues(), art::EDProducer::setupQueues(), and art::EDAnalyzer::setupQueues().

35  {
37  "An error occurred while processing scheduling options for a "
38  "module.\n"};
39  if (asyncDeclared_) {
40  if (empty(resourceNames_)) {
41  return;
42  }
43  throw e
44  << "async<art::InEvent>() cannot be called in combination with any "
45  "serialize<art::InEvent>(...) calls.\n";
46  }
47 
48  if (empty(resourceNames_)) {
49  throw e << "Either 'async<art::InEvent>()' or "
50  "'serialize<art::InEvent>(...)'\n"
51  "must be called in a shared module's constructor.\n";
52  }
53  std::vector<std::string> const names(cbegin(resourceNames_),
55  auto queues = resources.createQueues(names);
56  chain_ = std::make_unique<SerialTaskQueueChain>(queues);
57  }
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
Definition: StdUtils.h:93
std::set< std::string > resourceNames_
Definition: SharedModule.h:76
std::unique_ptr< hep::concurrency::SerialTaskQueueChain > chain_
Definition: SharedModule.h:78
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
decltype(auto) constexpr cbegin(T &&obj)
ADL-aware version of std::cbegin.
Definition: StdUtils.h:85
Float_t e
Definition: plot.C:35
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
Definition: StdUtils.h:109
void art::OutputModule::doRegisterProducts ( ProductDescriptions ,
ModuleDescription const &   
)
protectedvirtualinherited

Definition at line 179 of file OutputModule.cc.

Referenced by art::OutputModule::registerProducts().

181  {}
void art::OutputModule::doSelectProducts ( ProductTables const &  tables)
inherited

Definition at line 123 of file OutputModule.cc.

References art::combinable(), art::ProductTables::descriptions(), util::end(), art::for_each_branch_type(), art::OutputModule::groupSelector_, art::OutputModule::groupSelectorRules_, art::OutputModule::hasNewlyDroppedBranch_, art::OutputModule::keptProducts(), art::OutputModule::keptProducts_, art::OutputModule::selected(), and util::values().

Referenced by art::OutputModule::selectProducts().

124  {
125  // Note: The keptProducts_ data member records all of the
126  // BranchDescription objects that may be persisted to disk. Since
127  // we do not reset it, the list never shrinks. This behavior should
128  // be reconsidered for future use cases of art.
129  auto selectProductForBranchType = [this, &tables](BranchType const bt) {
130  auto const& productList = tables.descriptions(bt);
131  groupSelector_[bt] =
132  std::make_unique<GroupSelector const>(groupSelectorRules_, productList);
133  // TODO: See if we can collapse keptProducts_ and groupSelector into
134  // a single object. See the notes in the header for GroupSelector
135  // for more information.
136  for (auto const& pd : productList | ::ranges::views::values) {
137  if (pd.transient() || pd.dropped()) {
138  continue;
139  }
140  if (selected(pd)) {
141  // Here, we take care to merge the BranchDescription objects
142  // if one was already present in the keptProducts list.
143  auto& keptProducts = keptProducts_[bt];
144  if (auto it = keptProducts.find(pd.productID());
145  it != end(keptProducts)) {
146  auto& found_pd = it->second;
147  assert(combinable(found_pd, pd));
148  found_pd.merge(pd);
149  } else {
150  // New product
151  keptProducts.emplace(pd.productID(), pd);
152  }
153  continue;
154  }
155  hasNewlyDroppedBranch_[bt] = true;
156  }
157  };
158  for_each_branch_type(selectProductForBranchType);
159  }
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
Definition: StdUtils.h:77
GroupSelectorRules groupSelectorRules_
Definition: OutputModule.h:230
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
Definition: OutputModule.h:229
std::array< std::unique_ptr< GroupSelector const >, NumBranchTypes > groupSelector_
Definition: OutputModule.h:228
decltype(auto) values(Coll &&coll)
Range-for loop helper iterating across the values of the specified collection.
SelectionsArray keptProducts_
Definition: OutputModule.h:226
bool selected(BranchDescription const &) const
bool combinable(BranchDescription const &a, BranchDescription const &b)
SelectionsArray const & keptProducts() const
BranchType
Definition: BranchType.h:20
void for_each_branch_type(F f)
Definition: BranchType.h:38
bool art::OutputModule::fileIsOpen ( ) const
inherited

Definition at line 95 of file OutputModule.cc.

References art::OutputModule::isFileOpen().

96  {
97  return isFileOpen();
98  }
virtual bool isFileOpen() const
OutputFileStatus art::OutputModule::fileStatus ( ) const
inherited
std::array< std::vector< ProductInfo >, NumBranchTypes > const & art::ModuleBase::getConsumables ( ) const
inherited

Definition at line 43 of file ModuleBase.cc.

References art::ModuleBase::collector_, and art::ConsumesCollector::getConsumables().

44  {
45  return collector_.getConsumables();
46  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables() const
Handle< TriggerResults > art::Observer::getTriggerResults ( Event const &  e) const
protectedinherited

Definition at line 75 of file Observer.cc.

References art::ProductRetriever::get(), and art::Observer::selectors_.

Referenced by art::OutputModule::doWriteEvent(), and art::Observer::wantAllEvents().

76  {
77  if (selectors_) {
78  return selectors_->getOneTriggerResults(e);
79  }
80 
81  // The following applies for cases where no SelectEvents entries
82  // exist.
83  Handle<TriggerResults> h;
84  if (e.get(empty_process_name, h)) {
85  return h;
86  }
87  return Handle<TriggerResults>{};
88  }
Float_t e
Definition: plot.C:35
std::optional< detail::ProcessAndEventSelectors > selectors_
Definition: Observer.h:79
std::array< bool, NumBranchTypes > const & art::OutputModule::hasNewlyDroppedBranch ( ) const
inherited

Definition at line 654 of file OutputModule.cc.

References art::OutputModule::hasNewlyDroppedBranch_.

655  {
656  return hasNewlyDroppedBranch_;
657  }
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
Definition: OutputModule.h:229
SelectionsArray const & art::OutputModule::keptProducts ( ) const
inherited

Definition at line 640 of file OutputModule.cc.

References art::OutputModule::keptProducts_.

Referenced by art::OutputModule::doSelectProducts().

641  {
642  return keptProducts_;
643  }
SelectionsArray keptProducts_
Definition: OutputModule.h:226
string const & art::OutputModule::lastClosedFileName ( ) const
virtualinherited

Definition at line 117 of file OutputModule.cc.

References art::OutputModule::configuredFileName_.

118  {
119  return configuredFileName_;
120  }
std::string configuredFileName_
Definition: OutputModule.h:234
std::unique_ptr< Worker > art::ModuleBase::makeWorker ( WorkerParams const &  wp)
inherited

Definition at line 37 of file ModuleBase.cc.

References art::ModuleBase::doMakeWorker(), and art::NumBranchTypes.

38  {
39  return doMakeWorker(wp);
40  }
virtual std::unique_ptr< Worker > doMakeWorker(WorkerParams const &wp)=0
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::mayConsume ( InputTag const &  tag)
protectedinherited

Definition at line 82 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsume().

83  {
84  return collector_.mayConsume<T, BT>(tag);
85  }
ProductToken< T > mayConsume(InputTag const &)
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename T , BranchType BT>
void art::ModuleBase::mayConsumeMany ( )
protectedinherited

Definition at line 96 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsumeMany().

97  {
98  collector_.mayConsumeMany<T, BT>();
99  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::mayConsumeView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::mayConsumeView ( InputTag const &  tag)
inherited

Definition at line 89 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsumeView().

90  {
91  return collector_.mayConsumeView<T, BT>(tag);
92  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
ViewToken< Element > mayConsumeView(InputTag const &)
ModuleDescription const & art::ModuleBase::moduleDescription ( ) const
inherited

Definition at line 13 of file ModuleBase.cc.

References art::errors::LogicError.

Referenced by art::OutputModule::doRespondToOpenInputFile(), art::OutputModule::doWriteEvent(), art::Modifier::fillProductDescriptions(), art::OutputModule::makePlugins_(), art::OutputWorker::OutputWorker(), reco::shower::LArPandoraModularShowerCreation::produce(), art::Modifier::registerProducts(), and art::OutputModule::registerProducts().

14  {
15  if (md_.has_value()) {
16  return *md_;
17  }
18 
20  "There was an error while calling moduleDescription().\n"}
21  << "The moduleDescription() base-class member function cannot be called\n"
22  "during module construction. To determine which module is "
23  "responsible\n"
24  "for calling it, find the '<module type>:<module "
25  "label>@Construction'\n"
26  "tag in the message prefix above. Please contact artists@fnal.gov\n"
27  "for guidance.\n";
28  }
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::optional< ModuleDescription > md_
Definition: ModuleBase.h:55
template<typename P >
void art::FileDumperOutput::printPrincipal ( P const &  p)
private

Definition at line 170 of file FileDumperOutput_module.cc.

References art::BranchTypeToString(), art::detail::columnWidth(), art::detail::ProductInfo::friendly_type, art::detail::ProductInfo::instance_name, art::EDProduct::isPresent(), art::detail::ProductInfo::module_label, util::pi(), art::productstatus::present(), printProductInfo(), art::Observer::processName(), art::detail::ProductInfo::product_id, art::detail::ProductInfo::product_type, art::detail::ProductInfo::str_size, util::to_string(), util::values(), wantPresentOnly_, and wantResolveProducts_.

Referenced by readResults(), write(), writeRun(), and writeSubRun().

171 {
172  if (!p.size())
173  return;
174 
175  size_t present{0};
176  size_t not_present{0};
177  std::map<std::string, std::vector<detail::ProductInfo>> products;
178 
179  auto const& dinfo = dummyInfo();
180 
181  products[dummyProcess()].emplace_back(dinfo);
182 
183  for (auto const& g : p | views::values | views::indirect) {
184  auto const& pd = g.productDescription();
185  auto const& oh = p.getForOutput(pd.productID(), wantResolveProducts_);
186 
187  EDProduct const* product = oh.isValid() ? oh.wrapper() : nullptr;
188  bool const productPresent = product != nullptr && product->isPresent();
189 
190  if (productPresent) {
191  ++present;
192  } else {
193  ++not_present;
194  }
195 
196  if (!wantPresentOnly_ || productPresent) {
197  auto pi = detail::ProductInfo{pd.moduleLabel(),
198  pd.productInstanceName(),
199  pd.producedClassName(),
200  pd.friendlyClassName(),
201  std::to_string(pd.productID().value()),
202  product_size(product, productPresent)};
203  products[pd.processName()].emplace_back(std::move(pi));
204  }
205  }
206 
207  std::cout << "PRINCIPAL TYPE: " << BranchTypeToString(p.branchType())
208  << std::endl;
209 
210  std::vector<std::size_t> const widths{
211  columnWidthFirst(products, dummyProcess()),
212  columnWidth(
213  products, &detail::ProductInfo::module_label, dinfo.module_label),
214  columnWidth(
215  products, &detail::ProductInfo::instance_name, dinfo.instance_name),
216  columnWidth(
217  products, &detail::ProductInfo::product_type, dinfo.product_type),
218  columnWidth(
219  products, &detail::ProductInfo::friendly_type, dinfo.friendly_type),
220  columnWidth(products, &detail::ProductInfo::product_id, dinfo.product_id),
221  columnWidth(products, &detail::ProductInfo::str_size, dinfo.str_size)};
222 
223  // Print banner
224  printProductInfo(widths, dummyProcess(), dummyInfo());
225  for (auto const& processConfig : p.processHistory()) {
226  auto const& processName = processConfig.processName();
227  for (auto const& pi : products[processName]) {
228  printProductInfo(widths, processName, pi);
229  }
230  }
231 
232  std::cout << "\nTotal products (present, not present): "
233  << present + not_present << " (" << present << ", " << not_present
234  << ").\n\n";
235 }
std::string const & processName() const
Definition: Observer.cc:57
std::size_t columnWidth(T const &coll, std::string const Elem::*cp, std::string const &header)
decltype(auto) constexpr to_string(T &&obj)
ADL-aware version of std::to_string.
void printProductInfo(std::vector< std::size_t > const &columnWidths, std::string const &processName, detail::ProductInfo const &pi) const
decltype(auto) values(Coll &&coll)
Range-for loop helper iterating across the values of the specified collection.
std::string const & BranchTypeToString(BranchType const bt)
Definition: BranchType.cc:65
constexpr T pi()
Returns the constant pi (up to 35 decimal digits of precision)
constexpr ProductStatus present() noexcept
Definition: ProductStatus.h:10
void art::FileDumperOutput::printProductInfo ( std::vector< std::size_t > const &  columnWidths,
std::string const &  processName,
detail::ProductInfo const &  pi 
) const
private

Definition at line 238 of file FileDumperOutput_module.cc.

References DEFINE_ART_MODULE, art::detail::ProductInfo::friendly_type, art::detail::ProductInfo::instance_name, art::detail::ProductInfo::module_label, art::detail::ProductInfo::product_id, art::detail::ProductInfo::product_type, art::detail::ProductInfo::str_size, wantProductFriendlyClassName_, wantProductFullClassName_, and wantProductID_.

Referenced by printPrincipal().

241 {
242  std::ostringstream oss;
243  oss << cet::rpad(processName, widths[0], '.') << " | "
244  << cet::rpad(pi.module_label, widths[1], '.') << " | "
245  << cet::rpad(pi.instance_name, widths[2], '.') << " | ";
247  oss << cet::rpad(pi.product_type, widths[3], '.') << " | ";
248  }
250  oss << cet::rpad(pi.friendly_type, widths[4], '.') << " | ";
251  }
252  if (wantProductID_) {
253  oss << cet::rpad(pi.product_id, widths[5], '.') << " | ";
254  }
255  oss << cet::lpad(pi.str_size, widths[6], '.');
256  std::cout << oss.str() << '\n';
257 }
std::string const & processName() const
Definition: Observer.cc:57
constexpr T pi()
Returns the constant pi (up to 35 decimal digits of precision)
string const & art::Observer::processName ( ) const
protectedinherited

Definition at line 57 of file Observer.cc.

References art::Observer::process_name_.

Referenced by printPrincipal().

58  {
59  return process_name_;
60  }
std::string process_name_
Definition: Observer.h:76
void art::FileDumperOutput::readResults ( ResultsPrincipal const &  resp)
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 163 of file FileDumperOutput_module.cc.

References printPrincipal().

164 {
165  printPrincipal(resp);
166 }
void art::OutputModule::registerProducts ( ProductDescriptions producedProducts)
inherited

Definition at line 173 of file OutputModule.cc.

References art::OutputModule::doRegisterProducts(), and art::ModuleBase::moduleDescription().

174  {
175  doRegisterProducts(producedProducts, moduleDescription());
176  }
virtual void doRegisterProducts(ProductDescriptions &, ModuleDescription const &)
ModuleDescription const & moduleDescription() const
Definition: ModuleBase.cc:13
bool art::OutputModule::selected ( BranchDescription const &  pd) const
inherited

Definition at line 646 of file OutputModule.cc.

References art::BranchDescription::branchType(), and art::OutputModule::groupSelector_.

Referenced by art::OutputModule::doSelectProducts().

647  {
648  auto const bt = pd.branchType();
649  assert(groupSelector_[bt]);
650  return groupSelector_[bt]->selected(pd);
651  }
std::array< std::unique_ptr< GroupSelector const >, NumBranchTypes > groupSelector_
Definition: OutputModule.h:228
void art::OutputModule::selectProducts ( ProductTables const &  tables)
inherited

Definition at line 162 of file OutputModule.cc.

References art::OutputModule::doSelectProducts(), and art::OutputModule::postSelectProducts().

163  {
164  doSelectProducts(tables);
166  }
void doSelectProducts(ProductTables const &)
virtual void postSelectProducts()
template<BranchType BT = InEvent, typename... T>
void art::detail::SharedModule::serialize ( T const &  ...)
protectedinherited
template<BranchType , typename... T>
void art::detail::SharedModule::serialize ( T const &...  resources)
inherited

Definition at line 83 of file SharedModule.h.

References art::detail::SharedModule::serialize_for_resource().

84  {
85  serialize_for_resource(resources...);
86  }
void serialize_for_resource(T const &...t)
Definition: SharedModule.h:52
template<BranchType BT = InEvent, typename... T>
void art::detail::SharedModule::serializeExternal ( T const &  ...)
protectedinherited
template<BranchType , typename... T>
void art::detail::SharedModule::serializeExternal ( T const &...  resources)
inherited

Definition at line 90 of file SharedModule.h.

References art::detail::SharedModule::serialize_for_external_resource().

91  {
92  serialize_for_external_resource(resources...);
93  }
void serialize_for_external_resource(T const &...t)
Definition: SharedModule.h:65
SerialTaskQueueChain * art::detail::SharedModule::serialTaskQueueChain ( ) const
inherited

Definition at line 22 of file SharedModule.cc.

References art::detail::SharedModule::chain_.

23  {
24  return chain_.get();
25  }
std::unique_ptr< hep::concurrency::SerialTaskQueueChain > chain_
Definition: SharedModule.h:78
void art::ModuleBase::setModuleDescription ( ModuleDescription const &  md)
inherited

Definition at line 31 of file ModuleBase.cc.

References art::ModuleBase::md_.

32  {
33  md_ = md;
34  }
std::optional< ModuleDescription > md_
Definition: ModuleBase.h:55
std::set< std::string > const & art::detail::SharedModule::sharedResources ( ) const
inherited

Definition at line 28 of file SharedModule.cc.

References art::detail::SharedModule::resourceNames_.

29  {
30  return resourceNames_;
31  }
std::set< std::string > resourceNames_
Definition: SharedModule.h:76
void art::ModuleBase::sortConsumables ( std::string const &  current_process_name)
inherited

Definition at line 49 of file ModuleBase.cc.

References art::ModuleBase::collector_, and art::ConsumesCollector::sortConsumables().

50  {
51  // Now that we know we have seen all the consumes declarations,
52  // sort the results for fast lookup later.
53  collector_.sortConsumables(current_process_name);
54  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
void sortConsumables(std::string const &current_process_name)
bool art::Observer::wantAllEvents ( ) const
inlineprotectednoexceptinherited

Definition at line 31 of file Observer.h.

References e, art::Observer::getTriggerResults(), art::Observer::wantAllEvents_, and art::Observer::wantEvent().

32  {
33  return wantAllEvents_;
34  }
bool wantAllEvents_
Definition: Observer.h:75
bool art::Observer::wantEvent ( ScheduleID  id,
Event const &  e 
) const
protectedinherited

Definition at line 63 of file Observer.cc.

References art::Observer::rejectors_, art::Observer::selectors_, and art::Observer::wantAllEvents_.

Referenced by art::OutputModule::doEvent(), art::OutputModule::doWriteEvent(), and art::Observer::wantAllEvents().

64  {
65  if (wantAllEvents_) {
66  return true;
67  }
68  bool const select_event = selectors_ ? selectors_->matchEvent(id, e) : true;
69  bool const reject_event =
70  rejectors_ ? rejectors_->matchEvent(id, e) : false;
71  return select_event and not reject_event;
72  }
bool wantAllEvents_
Definition: Observer.h:75
std::optional< detail::ProcessAndEventSelectors > rejectors_
Definition: Observer.h:80
Float_t e
Definition: plot.C:35
std::optional< detail::ProcessAndEventSelectors > selectors_
Definition: Observer.h:79
void art::FileDumperOutput::write ( EventPrincipal e)
overrideprivatevirtual

Implements art::OutputModule.

Definition at line 145 of file FileDumperOutput_module.cc.

References printPrincipal().

146 {
147  printPrincipal(e);
148 }
Float_t e
Definition: plot.C:35
void art::FileDumperOutput::writeRun ( RunPrincipal r)
overrideprivatevirtual

Implements art::OutputModule.

Definition at line 151 of file FileDumperOutput_module.cc.

References printPrincipal().

152 {
153  printPrincipal(r);
154 }
TRandom r
Definition: spectrum.C:23
void art::FileDumperOutput::writeSubRun ( SubRunPrincipal sr)
overrideprivatevirtual

Implements art::OutputModule.

Definition at line 157 of file FileDumperOutput_module.cc.

References printPrincipal().

158 {
159  printPrincipal(sr);
160 }

Member Data Documentation

bool const art::FileDumperOutput::wantPresentOnly_
private

Definition at line 132 of file FileDumperOutput_module.cc.

Referenced by FileDumperOutput(), and printPrincipal().

bool const art::FileDumperOutput::wantProductFriendlyClassName_
private

Definition at line 129 of file FileDumperOutput_module.cc.

Referenced by FileDumperOutput(), and printProductInfo().

bool const art::FileDumperOutput::wantProductFullClassName_
private

Definition at line 128 of file FileDumperOutput_module.cc.

Referenced by FileDumperOutput(), and printProductInfo().

bool const art::FileDumperOutput::wantProductID_
private

Definition at line 130 of file FileDumperOutput_module.cc.

Referenced by FileDumperOutput(), and printProductInfo().

bool const art::FileDumperOutput::wantResolveProducts_
private

Definition at line 131 of file FileDumperOutput_module.cc.

Referenced by FileDumperOutput(), and printPrincipal().


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