1 #ifndef FWCore_Framework_stream_ProducingModuleAdaptorBase_h 2 #define FWCore_Framework_stream_ProducingModuleAdaptorBase_h 25 #include <unordered_map> 45 class ModuleCallingContext;
46 class ProductResolverIndexHelper;
48 class PreallocationConfiguration;
49 class ProductResolverIndexAndSkipBit;
50 class ProductRegistry;
51 class ThinnedAssociationsHelper;
58 namespace eventsetup {
64 class ProducingModuleAdaptorBase {
81 virtual bool wantsGlobalRuns()
const = 0;
82 virtual bool wantsGlobalLuminosityBlocks()
const = 0;
83 virtual bool hasAcquire()
const = 0;
84 virtual bool hasAccumulator()
const = 0;
90 void itemsToGet(
BranchType, std::vector<ProductResolverIndexAndSkipBit>&)
const;
91 void itemsMayGet(
BranchType, std::vector<ProductResolverIndexAndSkipBit>&)
const;
92 std::vector<ProductResolverIndexAndSkipBit>
const& itemsToGetFrom(
BranchType)
const;
97 void modulesWhoseProductsAreConsumed(std::vector<ModuleDescription const*>&
modules,
99 std::map<std::string, ModuleDescription const*>
const& labelsToDesc,
102 void convertCurrentProcessAlias(
std::string const& processName);
104 std::vector<ConsumesInfo> consumesInfo()
const;
107 std::unordered_multimap<std::string, std::tuple<edm::TypeID const*, const char*, edm::ProductResolverIndex>>;
109 void resolvePutIndicies(
BranchType iBranchType,
113 std::vector<edm::ProductResolverIndex>
const& indiciesForPutProducts(
BranchType iBranchType)
const;
116 template <
typename F>
118 for (
auto&
m : m_streamModules) {
120 m->setModuleDescriptionPtr(&moduleDescription_);
126 template <
typename I>
128 iEvent.
commit_(m_streamModules[0]->indiciesForPutProducts(
InEvent), iID);
142 virtual void setupStreamModules() = 0;
144 virtual void doEndJob() = 0;
153 void doStreamBeginLuminosityBlock(
StreamID id,
158 void doStreamEndLuminosityBlock(
StreamID id,
174 void doRespondToOpenInputFile(
FileBlock const&
fb);
175 void doRespondToCloseInputFile(
FileBlock const& fb);
ModuleDescription moduleDescription_
std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >> ModuleToResolverIndicies
void registerProductsAndCallbacks(ProductRegistry *iReg) override
virtual void preallocLumis(unsigned int)
const ProducerBase * producer()
const EDConsumerBase * consumer()
void commit_(std::vector< edm::ProductResolverIndex > const &iShouldPut)
void setModuleDescription(ModuleDescription const &md)
void createStreamModules(F iFunc)
void commit_(std::vector< edm::ProductResolverIndex > const &iShouldPut, ParentageID *previousParentageId=0)
const std::complex< double > I
bool wantsStreamRuns() const
const ModuleDescription & moduleDescription() const
void commit(LuminosityBlock &iLumi)
bool wantsStreamLuminosityBlocks() const
std::vector< T * > m_streamModules
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
void commit(Event &iEvent, I *iID)
void commit_(std::vector< edm::ProductResolverIndex > const &iShouldPut)