Project

General

Profile

ProvenanceDumper

Overview

The ProvenanceDumper class template is used to create output modules capable of iterating over all Provenances in an event, subrun or run. Note that it is always possible to obtain the provenance for a particular product through its handle: this class template is only for cases where one wishes to iterate over many Provenances without necessarily loading each product.

Mandatory interface: Detail.

The ProvenanceDumper class template takes a single template argument, namely a type which we will here call Detail.

Detail must supply a constructor with the following signature:
Detail(fhicl::ParameterSet const &);
The ParameterSet thus supplied may provide either or both of the following two parameters to configure (control the behavior of) this module template:
  • wantPresentOnly (bool, default true). If true, produce provenances and invoke relevant callbacks only if the product is actually present.
  • resolveProducts (bool, default true). If true, attempt to resolve the product before attempting to determine whether it is present.

Optional interface for Detail.

In addition, Detail may optionally provide any or all of the following member functions; each will be callled at the appropriate time iff it is declared. Note that none of these functions should be declared const; the correct signature of each is shown following its description:
  • beginJob, if present, will be called at the beginning of the job, from the template module's beginJob() member function.
    void beginJob();
  • preProcessEvent, if present, will be called prior to looping over any Provenances to be found in the event (always called if present).
    void preProcessEvent();
  • processEventProvenance, if present, will be called for each Provenance in the event (not called if there are none).
    void processEventProvenance(art::Provenance const &);
  • postProcessEvent, if present, will be called after looping over any Provenances to be found in the event (always called if present).
    void postProcessEvent();
  • preProcessSubRun, if present, will be called prior to looping over any Provenances to be found in the subrun (always called if present).
    void preProcessSubRun();
  • processSubRunProvenance, if present, will be called for each Provenance in the subrun (not called if there are none).
    void processSubRunProvenance(art::Provenance const &);
  • postProcessSubRun, if present, will be called after looping over any Provenances to be found in the subrun (always called if present).
    void postProcessSubRun();
  • preProcessRun, if present, will be called prior to looping over any Provenances to be found in the run (always called if present).
    void preProcessRun();
  • processRunProvenance, if present, will be called for each Provenance in the run (not called if there are none).
    void processRunProvenance(art::Provenance const &);
  • postProcessRun, if present, will be called after looping over any Provenances to be found in the run (always called if present).
    void postProcessRun();
  • endJob, if present, will be called at the end of the job, from the template module's endJob() member function.
    void endJob();