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;
54 template<
typename T>
class ModuleHolderT;
59 class ProducingModuleAdaptorBase
79 void itemsToGet(
BranchType, std::vector<ProductResolverIndexAndSkipBit>&)
const;
80 void itemsMayGet(
BranchType, std::vector<ProductResolverIndexAndSkipBit>&)
const;
81 std::vector<ProductResolverIndexAndSkipBit>
const& itemsToGetFrom(
BranchType)
const;
85 bool iPrefetchMayGet);
87 void modulesWhoseProductsAreConsumed(std::vector<ModuleDescription const*>&
modules,
89 std::map<std::string, ModuleDescription const*>
const& labelsToDesc,
92 void convertCurrentProcessAlias(
std::string const& processName);
94 std::vector<ConsumesInfo> consumesInfo()
const;
97 std::tuple<edm::TypeID const*, const char*, edm::ProductResolverIndex>>;
99 void resolvePutIndicies(
BranchType iBranchType,
101 std::string
const& moduleLabel);
103 std::vector<edm::ProductResolverIndex>
const& indiciesForPutProducts(
BranchType iBranchType)
const;
107 for(
auto&
m: m_streamModules) {
109 m->setModuleDescriptionPtr(&moduleDescription_);
114 iRun.
commit_(m_streamModules[0]->indiciesForPutProducts(
InRun));
117 iLumi.
commit_(m_streamModules[0]->indiciesForPutProducts(
InLumi));
121 iEvent.
commit_(m_streamModules[0]->indiciesForPutProducts(
InEvent), iID);
125 return m_streamModules[0];
129 return m_streamModules[0];
138 virtual void setupStreamModules() = 0;
140 virtual void doEndJob() = 0;
155 void doStreamBeginLuminosityBlock(
StreamID id,
160 void doStreamEndLuminosityBlock(
StreamID id,
179 void doRespondToOpenInputFile(
FileBlock const&
fb);
180 void doRespondToCloseInputFile(
FileBlock const& fb);
186 moduleDescription_ = md;
ModuleDescription moduleDescription_
std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >> ModuleToResolverIndicies
void registerProductsAndCallbacks(ProductRegistry *iReg) override
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
const ModuleDescription & moduleDescription() const
void commit(LuminosityBlock &iLumi)
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)