41 remainingEvents_(maxEvents_),
43 hasNewlyDroppedBranch_(),
45 productSelectorRules_(pset,
"outputCommands",
"OutputModule"),
48 wantAllEvents_(
false),
50 selector_config_id_(),
51 droppedBranchIDToKeptBranchID_(),
87 std::map<BranchID, BranchDescription const*> trueBranchIDToKeptBranchDesc;
102 std::map<BranchID, BranchDescription const*>::const_iterator iter = trueBranchIDToKeptBranchDesc.find(trueBranchID);
103 if(iter != trueBranchIDToKeptBranchDesc.end()) {
105 <<
"Two (or more) equivalent branches have been selected for output.\n"
107 <<
"#2: " <<
BranchKey(*iter->second) <<
"\n"
108 <<
"Please drop at least one of them.\n";
110 trueBranchIDToKeptBranchDesc.insert(std::make_pair(trueBranchID, &desc));
154 std::map<BranchID, BranchDescription const*>::const_iterator iter = trueBranchIDToKeptBranchDesc.find(branchID);
155 if(iter != trueBranchIDToKeptBranchDesc.end()) {
157 BranchID const& keptBranchID = iter->second->branchID();
158 if(keptBranchID != branchID) {
299 branchID = iter->second;
303 return branchIDLists_.get();
344 bool anyProductProduced) {
347 outputModulePathPositions,
354 if((*
i) && (*i)->productProvenancePtr() != 0) {
355 BranchID const& bid = (*i)->branchDescription().branchID();
358 it =
branchParents_.insert(std::make_pair(bid, std::set<ParentageID>())).first;
360 it->second.insert((*i)->productProvenancePtr()->parentageID());
371 std::set<ParentageID>
const& eIds =
i->second;
372 for(std::set<ParentageID>::const_iterator it = eIds.begin(), itEnd = eIds.end();
377 for(std::vector<BranchID>::const_iterator
j = parents.begin(), jEnd = parents.end();
BranchIDLists const * branchIDLists() const
static const std::string kBaseType("EDAnalyzer")
std::unique_ptr< BranchIDLists > branchIDLists_
bool selected(BranchDescription const &desc) const
void doPreForkReleaseResources()
static void fillDescription(ParameterSetDescription &desc, char const *parameterName)
ModuleDescription const & description() const
BranchType const & branchType() const
std::vector< BranchIDList > BranchIDLists
SelectedProductsForBranchType keptProducts_
void doWriteLuminosityBlock(LuminosityBlockPrincipal const &lbp, ModuleCallingContext const *)
ModuleDescription moduleDescription_
void doWriteRun(RunPrincipal const &rp, ModuleCallingContext const *)
static void prevalidate(ConfigurationDescriptions &)
const_iterator end() const
BranchParents branchParents_
ParameterSetID id() const
void configure(OutputModuleDescription const &desc)
ParameterSet const & getParameterSet(ParameterSetID const &id)
virtual void doEndRun_(RunPrincipal const &, ModuleCallingContext const *)
void insertEmpty(BranchID parent)
void insertChild(BranchID parent, BranchID child)
bool doBeginRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
std::string const & processName() const
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
BranchChildren branchChildren_
void selectProducts(ProductRegistry const &preg)
ProductSelectorRules productSelectorRules_
virtual void doBeginRun_(RunPrincipal const &, ModuleCallingContext const *)
BranchIDLists const * branchIDLists_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Trig getTriggerResults(EventPrincipal const &ep, ModuleCallingContext const *) const
std::vector< BranchID > const & parents() const
virtual void doRespondToCloseInputFile_(FileBlock const &)
ProductList const & productList() const
virtual void doRespondToOpenInputFile_(FileBlock const &)
bool doEvent(EventPrincipal const &ep, EventSetup const &c, ModuleCallingContext const *)
virtual void openFile(FileBlock const &)
void addDefault(ParameterSetDescription const &psetDescription)
bool getMapped(key_type const &k, value_type &result) const
std::string const & moduleLabel() const
std::string const & productInstanceName() const
bool selected(BranchDescription const &desc) const
virtual void reallyCloseFile()
virtual void reallyOpenFile()
TypeID unwrappedTypeID() const
void setEventSelectionInfo(std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced)
std::vector< BranchDescription const * > allBranchDescriptions() const
virtual void writeRun(RunPrincipal const &, ModuleCallingContext const *)=0
BranchID const & branchID() const
virtual void preForkReleaseResources()
static void fillDescription(ParameterSetDescription &desc)
virtual void doBeginLuminosityBlock_(LuminosityBlockPrincipal const &, ModuleCallingContext const *)
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
OutputModuleBase(ParameterSet const &pset)
virtual void doEndLuminosityBlock_(LuminosityBlockPrincipal const &, ModuleCallingContext const *)
void doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
void doRespondToCloseInputFile(FileBlock const &fb)
const_iterator begin() const
handle_t getOneTriggerResults(EventPrincipal const &e, ModuleCallingContext const *)
void doRespondToOpenInputFile(FileBlock const &fb)
bool wantEvent(EventPrincipal const &e, ModuleCallingContext const *)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
virtual void write(EventPrincipal const &e, ModuleCallingContext const *)=0
std::vector< BranchID::value_type > BranchIDList
bool doEndRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
std::vector< std::string > const & getAllTriggerNames()
boost::filter_iterator< FilledProductPtr, ProductHolderCollection::const_iterator > const_iterator
void initialize(ProductSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions)
static const std::string & baseType()
std::string process_name_
void doOpenFile(FileBlock const &fb)
virtual void writeLuminosityBlock(LuminosityBlockPrincipal const &, ModuleCallingContext const *)=0
virtual void postForkReacquireResources(unsigned int, unsigned int)
BranchIDLists const * origBranchIDLists_
BranchID const & originalBranchID() const
bool doBeginLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
volatile std::atomic< bool > shutdown_flag false
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 doCloseFile()
Tell the OutputModule that is must end the current file.
static void fillDescription(ParameterSetDescription &desc)
virtual bool isFileOpen() const
std::map< BranchID::value_type, BranchID::value_type > droppedBranchIDToKeptBranchID_
void updateBranchParents(EventPrincipal const &ep)
static ParentageRegistry * instance()
ProductSelector productSelector_
bool configureEventSelector(edm::ParameterSet const &iPSet, std::string const &iProcessName, std::vector< std::string > const &iAllTriggerNames, edm::detail::TriggerResultsBasedEventSelector &oSelector)
ParameterSet const & registerIt()
virtual ~OutputModuleBase()
detail::TriggerResultsBasedEventSelector selectors_
ParameterSetID selector_config_id_
void fillDependencyGraph()
bool doEndLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)