42 remainingEvents_(maxEvents_),
44 hasNewlyDroppedBranch_(),
46 productSelectorRules_(pset,
"outputCommands",
"OutputModule"),
49 wantAllEvents_(
false),
51 selector_config_id_(),
52 droppedBranchIDToKeptBranchID_(),
93 std::map<BranchID, BranchDescription const*> trueBranchIDToKeptBranchDesc;
94 std::vector<BranchDescription const*> associationDescriptions;
95 std::set<BranchID> keptProductsInEvent;
105 associationDescriptions.push_back(&desc);
107 keepThisBranch(desc, trueBranchIDToKeptBranchDesc, keptProductsInEvent);
119 for(
auto association : associationDescriptions) {
121 keepThisBranch(*association, trueBranchIDToKeptBranchDesc, keptProductsInEvent);
134 std::map<BranchID, BranchDescription const*>& trueBranchIDToKeptBranchDesc,
135 std::set<BranchID>& keptProductsInEvent) {
138 trueBranchIDToKeptBranchDesc);
146 keptProductsInEvent.insert(desc.
branchID());
184 bool seenFirst =
false;
332 branchID = iter->second;
336 return branchIDLists_.get();
382 bool anyProductProduced) {
385 outputModulePathPositions,
static const std::string kBaseType("EDAnalyzer")
std::string process_name_
virtual void writeLuminosityBlock(LuminosityBlockPrincipal const &, ModuleCallingContext const *)=0
bool selected(BranchDescription const &desc) const
virtual void postForkReacquireResources(unsigned int, unsigned int)
void doCloseFile()
Tell the OutputModule that is must end the current file.
void keepThisBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc, std::set< BranchID > &keptProductsInEvent)
ModuleDescription const & description() const
BranchIDLists const * origBranchIDLists_
static void fillDescription(ParameterSetDescription &desc, char const *parameterName)
void doRespondToOpenInputFile(FileBlock const &fb)
void selectProducts(ProductRegistry const &preg, ThinnedAssociationsHelper const &)
BranchType const & branchType() const
std::vector< BranchIDList > BranchIDLists
void doWriteLuminosityBlock(LuminosityBlockPrincipal const &lbp, ModuleCallingContext const *)
static void fillDroppedToKept(ProductRegistry const &preg, std::map< BranchID, BranchDescription const * > const &trueBranchIDToKeptBranchDesc, std::map< BranchID::value_type, BranchID::value_type > &droppedBranchIDToKeptBranchID_)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
virtual bool isFileOpen() const
OutputModuleBase(ParameterSet const &pset)
ParameterSetID id() const
virtual void reallyOpenFile()
ParameterSet const & getParameterSet(ParameterSetID const &id)
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
std::vector< detail::TriggerResultsBasedEventSelector > selectors_
virtual void openFile(FileBlock const &)
void doPreForkReleaseResources()
ParameterSetID selector_config_id_
virtual void doRespondToOpenInputFile_(FileBlock const &)
std::string const & processName() const
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
SelectedProductsForBranchType keptProducts_
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
BranchIDLists const * branchIDLists()
ParameterSet selectEvents_
bool doEvent(EventPrincipal const &ep, EventSetup const &c, ActivityRegistry *, ModuleCallingContext const *)
BranchIDLists const * branchIDLists_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
ThinnedAssociationsHelper const * thinnedAssociationsHelper() const
ModuleDescription moduleDescription_
int remainingEvents() const
ProductList const & productList() const
void selectAssociationProducts(std::vector< BranchDescription const * > const &associationDescriptions, std::set< BranchID > const &keptProductsInEvent, std::map< BranchID, bool > &keepAssociation) const
edm::propagate_const< std::unique_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
bool prePrefetchSelection(StreamID id, EventPrincipal const &, ModuleCallingContext const *)
virtual ~OutputModuleBase()
void addDefault(ParameterSetDescription const &psetDescription)
virtual void doEndRun_(RunPrincipal const &, ModuleCallingContext const *)
void setEventSelectionInfo(std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced)
std::string const & moduleLabel() const
std::string const & productInstanceName() const
void doPreallocate(PreallocationConfiguration const &)
std::map< BranchID, bool > keepAssociation_
bool selected(BranchDescription const &desc) const
TypeID unwrappedTypeID() const
edm::propagate_const< std::unique_ptr< BranchIDLists > > branchIDLists_
static void prevalidate(ConfigurationDescriptions &)
std::vector< BranchDescription const * > allBranchDescriptions() const
static const std::string & baseType()
BranchID const & branchID() const
TypeWithDict const & unwrappedType() const
void configure(OutputModuleDescription const &desc)
static void fillDescription(ParameterSetDescription &desc)
static void fillDescription(ParameterSetDescription &desc)
ProductSelector productSelector_
static void fillDescriptions(ConfigurationDescriptions &descriptions)
virtual void doBeginRun_(RunPrincipal const &, ModuleCallingContext const *)
ProductSelectorRules productSelectorRules_
void doRespondToCloseInputFile(FileBlock const &fb)
std::atomic< int > remainingEvents_
virtual void reallyCloseFile()
virtual void write(EventPrincipal const &e, ModuleCallingContext const *)=0
bool doBeginRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
bool doEndRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
std::vector< BranchID::value_type > BranchIDList
std::vector< std::string > const & getAllTriggerNames()
void initialize(ProductSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions)
unsigned int numberOfStreams() const
void doWriteRun(RunPrincipal const &rp, ModuleCallingContext const *)
bool doEndLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
BranchID const & originalBranchID() const
volatile std::atomic< bool > shutdown_flag false
virtual void doRespondToCloseInputFile_(FileBlock const &)
ParameterSetID registerProperSelectionInfo(edm::ParameterSet const &iInitial, std::string const &iLabel, std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced)
virtual void preForkReleaseResources()
bool doBeginLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
void doOpenFile(FileBlock const &fb)
bool configureEventSelector(edm::ParameterSet const &iPSet, std::string const &iProcessName, std::vector< std::string > const &iAllTriggerNames, edm::detail::TriggerResultsBasedEventSelector &oSelector)
ParameterSet const & registerIt()
virtual void doBeginLuminosityBlock_(LuminosityBlockPrincipal const &, ModuleCallingContext const *)
void doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
virtual void writeRun(RunPrincipal const &, ModuleCallingContext const *)=0
static void checkForDuplicateKeptBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc)
virtual void doEndLuminosityBlock_(LuminosityBlockPrincipal const &, ModuleCallingContext const *)