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
76 virtual bool wantsGlobalRuns()
const = 0;
77 virtual bool wantsGlobalLuminosityBlocks()
const = 0;
78 virtual bool hasAcquire()
const = 0;
79 virtual bool hasAccumulator()
const = 0;
86 void itemsToGet(
BranchType, std::vector<ProductResolverIndexAndSkipBit>&)
const;
87 void itemsMayGet(
BranchType, std::vector<ProductResolverIndexAndSkipBit>&)
const;
88 std::vector<ProductResolverIndexAndSkipBit>
const& itemsToGetFrom(
BranchType)
const;
92 bool iPrefetchMayGet);
94 void modulesWhoseProductsAreConsumed(std::vector<ModuleDescription const*>&
modules,
96 std::map<std::string, ModuleDescription const*>
const& labelsToDesc,
99 void convertCurrentProcessAlias(
std::string const& processName);
101 std::vector<ConsumesInfo> consumesInfo()
const;
104 std::tuple<edm::TypeID const*, const char*, edm::ProductResolverIndex>>;
106 void resolvePutIndicies(
BranchType iBranchType,
108 std::string
const& moduleLabel);
110 std::vector<edm::ProductResolverIndex>
const& indiciesForPutProducts(
BranchType iBranchType)
const;
114 for(
auto&
m: m_streamModules) {
116 m->setModuleDescriptionPtr(&moduleDescription_);
121 iRun.
commit_(m_streamModules[0]->indiciesForPutProducts(
InRun));
124 iLumi.
commit_(m_streamModules[0]->indiciesForPutProducts(
InLumi));
128 iEvent.
commit_(m_streamModules[0]->indiciesForPutProducts(
InEvent), iID);
132 return m_streamModules[0];
136 return m_streamModules[0];
146 virtual void setupStreamModules() = 0;
148 virtual void doEndJob() = 0;
163 void doStreamBeginLuminosityBlock(
StreamID id,
168 void doStreamEndLuminosityBlock(
StreamID id,
187 void doRespondToOpenInputFile(
FileBlock const&
fb);
188 void doRespondToCloseInputFile(
FileBlock const& fb);
194 moduleDescription_ = md;
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)