File indexing completed on 2024-05-11 03:34:13
0001 #ifndef FWCore_Framework_OutputModuleCommunicator_h
0002 #define FWCore_Framework_OutputModuleCommunicator_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #include <map>
0023 #include <string>
0024 #include <vector>
0025
0026
0027 #include "DataFormats/Provenance/interface/SelectedProducts.h"
0028 #include "FWCore/Common/interface/FWCoreCommonFwd.h"
0029 #include "FWCore/Framework/interface/Frameworkfwd.h"
0030
0031
0032 namespace edm {
0033
0034 class ActivityRegistry;
0035 class MergeableRunProductMetadata;
0036 class ProcessContext;
0037 class ThinnedAssociationsHelper;
0038 class WaitingTaskHolder;
0039
0040 class OutputModuleCommunicator {
0041 public:
0042 OutputModuleCommunicator() = default;
0043 OutputModuleCommunicator(const OutputModuleCommunicator&) = delete;
0044 OutputModuleCommunicator& operator=(const OutputModuleCommunicator&) = delete;
0045 virtual ~OutputModuleCommunicator();
0046
0047 virtual void closeFile() = 0;
0048
0049
0050 virtual bool shouldWeCloseFile() const = 0;
0051
0052
0053 virtual bool wantAllEvents() const = 0;
0054
0055 virtual void openFile(FileBlock const& fb) = 0;
0056
0057 virtual void writeProcessBlockAsync(WaitingTaskHolder iTask,
0058 ProcessBlockPrincipal const&,
0059 ProcessContext const*,
0060 ActivityRegistry*) noexcept = 0;
0061
0062 virtual void writeRunAsync(WaitingTaskHolder iTask,
0063 RunPrincipal const&,
0064 ProcessContext const*,
0065 ActivityRegistry*,
0066 MergeableRunProductMetadata const*) noexcept = 0;
0067
0068 virtual void writeLumiAsync(WaitingTaskHolder iTask,
0069 LuminosityBlockPrincipal const&,
0070 ProcessContext const*,
0071 ActivityRegistry*) noexcept = 0;
0072
0073
0074 virtual bool limitReached() const = 0;
0075
0076 virtual void configure(OutputModuleDescription const& desc) = 0;
0077
0078 virtual SelectedProductsForBranchType const& keptProducts() const = 0;
0079
0080 virtual void selectProducts(ProductRegistry const& preg,
0081 ThinnedAssociationsHelper const&,
0082 ProcessBlockHelperBase const&) = 0;
0083
0084 virtual void setEventSelectionInfo(
0085 std::map<std::string, std::vector<std::pair<std::string, int> > > const& outputModulePathPositions,
0086 bool anyProductProduced) = 0;
0087
0088 virtual ModuleDescription const& description() const = 0;
0089
0090 private:
0091
0092 };
0093 }
0094
0095 #endif