30 remainingEvents_(maxEvents_),
32 hasNewlyDroppedBranch_(),
34 productSelectorRules_(pset,
"outputCommands",
"OutputModule"),
37 wantAllEvents_(
false),
39 selector_config_id_(),
40 droppedBranchIDToKeptBranchID_(),
76 std::map<BranchID, BranchDescription const*> trueBranchIDToKeptBranchDesc;
91 std::map<BranchID, BranchDescription const*>::const_iterator iter = trueBranchIDToKeptBranchDesc.find(trueBranchID);
92 if(iter != trueBranchIDToKeptBranchDesc.end()) {
94 <<
"Two (or more) equivalent branches have been selected for output.\n"
96 <<
"#2: " <<
BranchKey(*iter->second) <<
"\n"
97 <<
"Please drop at least one of them.\n";
99 trueBranchIDToKeptBranchDesc.insert(std::make_pair(trueBranchID, &desc));
143 std::map<BranchID, BranchDescription const*>::const_iterator iter = trueBranchIDToKeptBranchDesc.find(branchID);
144 if(iter != trueBranchIDToKeptBranchDesc.end()) {
146 BranchID const& keptBranchID = iter->second->branchID();
147 if(keptBranchID != branchID) {
178 FDEBUG(2) <<
"writeEvent called\n";
213 FDEBUG(2) <<
"beginRun called\n";
222 FDEBUG(2) <<
"endRun called\n";
230 FDEBUG(2) <<
"writeRun called\n";
238 FDEBUG(2) <<
"beginLuminosityBlock called\n";
247 FDEBUG(2) <<
"endLuminosityBlock called\n";
254 FDEBUG(2) <<
"writeLuminosityBlock called\n";
307 branchID = iter->second;
311 return branchIDLists_.get();
352 bool anyProductProduced) {
355 outputModulePathPositions,
362 if((*
i) && (*i)->productProvenancePtr() != 0) {
363 BranchID const& bid = (*i)->branchDescription().branchID();
366 it =
branchParents_.insert(std::make_pair(bid, std::set<ParentageID>())).first;
368 it->second.insert((*i)->productProvenancePtr()->parentageID());
379 std::set<ParentageID>
const& eIds =
i->second;
380 for(std::set<ParentageID>::const_iterator it = eIds.begin(), itEnd = eIds.end();
385 for(std::vector<BranchID>::const_iterator
j = parents.begin(), jEnd = parents.end();
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
void doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
bool selected(BranchDescription const &desc) const
static void fillDescription(ParameterSetDescription &desc, char const *parameterName)
BranchType const & branchType() const
std::vector< BranchIDList > BranchIDLists
virtual void writeLuminosityBlock(LuminosityBlockPrincipal const &, ModuleCallingContext const *)=0
bool doEvent(EventPrincipal const &ep, EventSetup const &c, ModuleCallingContext const *mcc)
void selectProducts(ProductRegistry const &preg)
virtual void write(EventPrincipal const &e, ModuleCallingContext const *)=0
ModuleDescription moduleDescription_
const_iterator end() const
ParameterSetID id() const
ParameterSet const & getParameterSet(ParameterSetID const &id)
virtual void reallyCloseFile()
void insertEmpty(BranchID parent)
virtual void reallyOpenFile()
void insertChild(BranchID parent, BranchID child)
static const std::string & baseType()
void updateBranchParents(EventPrincipal const &ep)
void doWriteLuminosityBlock(LuminosityBlockPrincipal const &lbp, ModuleCallingContext const *mcc)
std::string const & processName() const
void doOpenFile(FileBlock const &fb)
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
bool selected(BranchDescription const &desc) const
BranchIDLists const * origBranchIDLists_
void doCloseFile()
Tell the OutputModule that is must end the current file.
BranchIDLists const * branchIDLists_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
virtual void endLuminosityBlock(LuminosityBlockPrincipal const &, ModuleCallingContext const *)
std::vector< BranchID > const & parents() const
ProductList const & productList() const
void setEventSelectionInfo(std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced)
std::string process_name_
void addDefault(ParameterSetDescription const &psetDescription)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
bool getMapped(key_type const &k, value_type &result) const
std::string const & moduleLabel() const
std::string const & productInstanceName() const
void doWriteRun(RunPrincipal const &rp, ModuleCallingContext const *mcc)
virtual void beginLuminosityBlock(LuminosityBlockPrincipal const &, ModuleCallingContext const *)
TypeID unwrappedTypeID() const
void doPreForkReleaseResources()
std::unique_ptr< BranchIDLists > branchIDLists_
std::vector< BranchDescription const * > allBranchDescriptions() const
BranchID const & branchID() const
bool doEndLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *mcc)
static void fillDescription(ParameterSetDescription &desc)
detail::TriggerResultsBasedEventSelector selectors_
virtual bool isFileOpen() const
void doRespondToCloseInputFile(FileBlock const &fb)
bool doBeginLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *mcc)
void fillDependencyGraph()
virtual void postForkReacquireResources(unsigned int, unsigned int)
static void prevalidate(ConfigurationDescriptions &)
const_iterator begin() const
handle_t getOneTriggerResults(EventPrincipal const &e, ModuleCallingContext const *)
virtual void beginRun(RunPrincipal const &, ModuleCallingContext const *)
virtual void respondToOpenInputFile(FileBlock const &)
static void fillDescription(ParameterSetDescription &desc)
bool doEndRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *mcc)
bool wantEvent(EventPrincipal const &e, ModuleCallingContext const *)
static const std::string kBaseType("EDAnalyzer")
std::vector< BranchID::value_type > BranchIDList
SelectedProductsForBranchType keptProducts_
ProductSelector productSelector_
std::vector< std::string > const & getAllTriggerNames()
BranchChildren branchChildren_
boost::filter_iterator< FilledProductPtr, ProductHolderCollection::const_iterator > const_iterator
void initialize(ProductSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions)
BranchIDLists const * branchIDLists() const
ProductSelectorRules productSelectorRules_
BranchID const & originalBranchID() const
void doRespondToOpenInputFile(FileBlock const &fb)
virtual void respondToCloseInputFile(FileBlock const &)
volatile std::atomic< bool > shutdown_flag false
bool doBeginRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *mcc)
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)
void configure(OutputModuleDescription const &desc)
virtual void openFile(FileBlock const &)
static ParentageRegistry * instance()
virtual void writeRun(RunPrincipal const &, ModuleCallingContext const *)=0
virtual void endRun(RunPrincipal const &, ModuleCallingContext const *)
bool configureEventSelector(edm::ParameterSet const &iPSet, std::string const &iProcessName, std::vector< std::string > const &iAllTriggerNames, edm::detail::TriggerResultsBasedEventSelector &oSelector)
ParameterSet const & registerIt()
Trig getTriggerResults(EventPrincipal const &ep, ModuleCallingContext const *) const
ModuleDescription const & description() const
BranchParents branchParents_
virtual void preForkReleaseResources()
OutputModule(ParameterSet const &pset)
ParameterSetID selector_config_id_