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& itemsToGetFromEvent()
const;
85 bool iPrefetchMayGet);
87 void modulesWhoseProductsAreConsumed(std::vector<ModuleDescription const*>&
modules,
89 std::map<std::string, ModuleDescription const*>
const& labelsToDesc,
92 std::vector<ConsumesInfo> consumesInfo()
const;
94 void resolvePutIndicies(
BranchType iBranchType,
95 std::unordered_multimap<std::string, edm::ProductResolverIndex>
const& iIndicies,
98 std::vector<edm::ProductResolverIndex>
const& indiciesForPutProducts(
BranchType iBranchType)
const;
102 for(
auto&
m: m_streamModules) {
104 m->setModuleDescriptionPtr(&moduleDescription_);
109 iRun.
commit_(m_streamModules[0]->indiciesForPutProducts(
InRun));
112 iLumi.
commit_(m_streamModules[0]->indiciesForPutProducts(
InLumi));
114 template<
typename L,
typename I>
116 iEvent.
commit_(m_streamModules[0]->indiciesForPutProducts(
InEvent), iList,iID);
120 return m_streamModules[0];
128 virtual void setupStreamModules() = 0;
130 virtual void doEndJob() = 0;
145 void doStreamBeginLuminosityBlock(
StreamID id,
150 void doStreamEndLuminosityBlock(
StreamID id,
168 void doPreForkReleaseResources();
169 void doPostForkReacquireResources(
unsigned int iChildIndex,
unsigned int iNumberOfChildren);
172 void doRespondToOpenInputFile(
FileBlock const&
fb);
173 void doRespondToCloseInputFile(
FileBlock const& fb);
179 moduleDescription_ = md;
ModuleDescription moduleDescription_
void commit(Event &iEvent, L *iList, I *iID)
void registerProductsAndCallbacks(ProductRegistry *iReg) override
void commit_(std::vector< edm::ProductResolverIndex > const &iShouldPut, std::vector< BranchID > *previousParentage=0, ParentageID *previousParentageId=0)
const EDConsumerBase * consumer()
void commit_(std::vector< edm::ProductResolverIndex > const &iShouldPut)
void setModuleDescription(ModuleDescription const &md)
void createStreamModules(F iFunc)
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_(std::vector< edm::ProductResolverIndex > const &iShouldPut)