LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::ProvenanceCheckerOutput Class Reference
Inheritance diagram for art::ProvenanceCheckerOutput:
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

 ProvenanceCheckerOutput (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 writeSubRun (SubRunPrincipal &) override
 
void writeRun (RunPrincipal &) override
 

Detailed Description

Definition at line 19 of file ProvenanceCheckerOutput_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::ProvenanceCheckerOutput::ProvenanceCheckerOutput ( ProvenanceCheckerOutput::Parameters const &  ps)
explicit

Definition at line 42 of file ProvenanceCheckerOutput_module.cc.

44  : OutputModule{ps().omConfig}
45  {}
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::SharedAnalyzer::setupQueues(), art::EDFilter::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
string const & art::Observer::processName ( ) const
protectedinherited

Definition at line 57 of file Observer.cc.

References art::Observer::process_name_.

Referenced by art::FileDumperOutput::printPrincipal().

58  {
59  return process_name_;
60  }
std::string process_name_
Definition: Observer.h:76
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::ProvenanceCheckerOutput::write ( EventPrincipal e)
overrideprivatevirtual

Implements art::OutputModule.

Definition at line 74 of file ProvenanceCheckerOutput_module.cc.

References DEFINE_ART_MODULE, and art::markAncestors().

75  {
76  // Check ProductProvenance's parents to see if they are in the
77  // ProductProvenance list
78 
79  std::map<ProductID, bool> seenParentInPrincipal;
80  std::set<ProductID> missingFromMapper;
81  std::set<ProductID> missingProductProvenance;
82 
83  for (auto const& [pid, pd] : e) {
84  if (pd && pd->productAvailable()) {
85  e.getForOutput(pid, false);
86  if (not pd->productProvenance().get()) {
87  missingProductProvenance.insert(pid);
88  continue;
89  }
90  auto pInfo = e.branchToProductProvenance(pid);
91  if (!pInfo) {
92  missingFromMapper.insert(pid);
93  }
94  markAncestors(*(pd->productProvenance()),
95  e,
96  seenParentInPrincipal,
97  missingFromMapper);
98  }
99  seenParentInPrincipal[pid] = true;
100  }
101 
102  // Determine what ProductIDs are missing from the principal,
103  // vs. which ProductIDs are not even accessible to the principal
104  // via the product tables.
105  std::set<ProductID> missingFromPrincipal;
106  std::set<ProductID> missingFromTables;
107  for (auto const& [parent_pid, seen] : seenParentInPrincipal) {
108  if (!seen) {
109  missingFromPrincipal.insert(parent_pid);
110  }
111  auto found = e.getProductDescription(parent_pid);
112  if (found == nullptr) {
113  missingFromTables.insert(parent_pid);
114  }
115  }
116 
117  auto logProductID = [](auto const& missing) {
118  mf::LogProblem("ProvenanceChecker") << missing;
119  };
120 
121  if (missingFromMapper.size()) {
122  mf::LogError("ProvenanceChecker")
123  << "Missing the following ProductIDs from BranchMapper";
124  cet::for_all(missingFromMapper, logProductID);
125  }
126 
127  if (missingFromPrincipal.size()) {
128  mf::LogError("ProvenanceChecker")
129  << "Missing the following ProductIDs from EventPrincipal";
130  cet::for_all(missingFromPrincipal, logProductID);
131  }
132 
133  if (missingProductProvenance.size()) {
134  mf::LogError("ProvenanceChecker") << "The Groups for the following "
135  "ProductIDs have no "
136  "ProductProvenance";
137  cet::for_all(missingProductProvenance, logProductID);
138  }
139 
140  if (missingFromTables.size()) {
141  mf::LogError("ProvenanceChecker") << "Missing the following ProductIDs "
142  "from the principal's product "
143  "tables";
144  cet::for_all(missingFromTables, logProductID);
145  }
146 
147  if (missingFromMapper.size() or missingFromPrincipal.size() or
148  missingProductProvenance.size() or missingFromTables.size()) {
149  throw cet::exception("ProvenanceError")
150  << (missingFromMapper.size() or missingFromPrincipal.size() ?
151  "Having missing ancestors" :
152  "")
153  << (missingFromMapper.size() ? " from BranchMapper" : "")
154  << (missingFromMapper.size() and missingFromPrincipal.size() ? " and" :
155  "")
156  << (missingFromPrincipal.size() ? " from EventPrincipal" : "")
157  << (missingFromMapper.size() or missingFromPrincipal.size() ? ".\n" :
158  "")
159  << (missingProductProvenance.size() ? " Have missing "
160  "ProductProvenance's from Group "
161  "in EventPrincipal.\n" :
162  "")
163  << (missingFromTables.size() ?
164  " Have missing info from the principal's product tables.\n" :
165  "");
166  }
167  }
static void markAncestors(ProductProvenance const &iInfo, EventPrincipal &e, std::map< ProductID, bool > &oMap, std::set< ProductID > &oMapperMissing)
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
MaybeLogger_< ELseverityLevel::ELsev_error, true > LogProblem
Float_t e
Definition: plot.C:35
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void art::ProvenanceCheckerOutput::writeRun ( RunPrincipal )
inlineoverrideprivatevirtual

Implements art::OutputModule.

Definition at line 35 of file ProvenanceCheckerOutput_module.cc.

36  {}
void art::ProvenanceCheckerOutput::writeSubRun ( SubRunPrincipal )
inlineoverrideprivatevirtual

Implements art::OutputModule.

Definition at line 32 of file ProvenanceCheckerOutput_module.cc.

33  {}

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