![]() |
![]() |
#include <OutputModule.h>
Definition at line 37 of file OutputModule.h.
typedef std::map<BranchID, std::set<ParentageID> > edm::OutputModule::BranchParents [private] |
Definition at line 160 of file OutputModule.h.
Definition at line 41 of file OutputModule.h.
Definition at line 42 of file OutputModule.h.
edm::OutputModule::OutputModule | ( | ParameterSet const & | pset | ) | [explicit] |
Definition at line 115 of file OutputModule.cc.
References edm::ParameterSet::empty(), edm::getAllTriggerNames(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameterSet(), hasNewlyDroppedBranch_, i, edm::ParameterSet::id(), process_name_, edm::ParameterSet::registerIt(), selector_config_id_, selectors_, edm::detail::CachedProducts::setup(), edm::detail::CachedProducts::setupDefault(), and wantAllEvents_.
: maxEvents_(-1), remainingEvents_(maxEvents_), keptProducts_(), hasNewlyDroppedBranch_(), process_name_(), groupSelectorRules_(pset, "outputCommands", "OutputModule"), groupSelector_(), moduleDescription_(), current_context_(0), prodsValid_(false), wantAllEvents_(false), selectors_(), selector_config_id_(), droppedBranchIDToKeptBranchID_(), branchIDLists_(new BranchIDLists), origBranchIDLists_(0), branchParents_(), branchChildren_() { hasNewlyDroppedBranch_.assign(false); Service<service::TriggerNamesService> tns; process_name_ = tns->getProcessName(); ParameterSet selectevents = pset.getUntrackedParameterSet("SelectEvents", ParameterSet()); selectevents.registerIt(); // Just in case this PSet is not registered selector_config_id_ = selectevents.id(); // If selectevents is an emtpy ParameterSet, then we are to write // all events, or one which contains a vstrig 'SelectEvents' that // is empty, we are to write all events. We have no need for any // EventSelectors. if(selectevents.empty()) { wantAllEvents_ = true; selectors_.setupDefault(getAllTriggerNames()); return; } std::vector<std::string> path_specs = selectevents.getParameter<std::vector<std::string> >("SelectEvents"); if(path_specs.empty()) { wantAllEvents_ = true; selectors_.setupDefault(getAllTriggerNames()); return; } // If we get here, we have the possibility of having to deal with // path_specs that look at more than one process. std::vector<parsed_path_spec_t> parsed_paths(path_specs.size()); for(size_t i = 0; i < path_specs.size(); ++i) { parse_path_spec(path_specs[i], parsed_paths[i]); } selectors_.setup(parsed_paths, getAllTriggerNames(), process_name_); }
edm::OutputModule::~OutputModule | ( | ) | [virtual] |
Definition at line 238 of file OutputModule.cc.
{ }
const std::string & edm::OutputModule::baseType | ( | ) | [static] |
virtual void edm::OutputModule::beginJob | ( | void | ) | [inline, private, virtual] |
Reimplemented in edm::SubProcess, edm::PoolOutputModule, and edm::StreamerOutputModuleBase.
Definition at line 198 of file OutputModule.h.
Referenced by doBeginJob().
{}
virtual void edm::OutputModule::beginLuminosityBlock | ( | LuminosityBlockPrincipal const & | ) | [inline, private, virtual] |
Reimplemented in edm::SubProcess.
Definition at line 203 of file OutputModule.h.
Referenced by doBeginLuminosityBlock().
{}
virtual void edm::OutputModule::beginRun | ( | RunPrincipal const & | ) | [inline, private, virtual] |
Reimplemented in DQMRootOutputModule, edm::SubProcess, FRDEventOutputModule< Consumer >, and edm::StreamerOutputModuleBase.
Definition at line 200 of file OutputModule.h.
Referenced by doBeginRun().
{}
BranchChildren const& edm::OutputModule::branchChildren | ( | ) | const [inline] |
Definition at line 66 of file OutputModule.h.
References branchChildren_.
Referenced by edm::RootOutputFile::writeProductDependencies().
{return branchChildren_;}
BranchIDLists const * edm::OutputModule::branchIDLists | ( | ) | const |
Definition at line 431 of file OutputModule.cc.
References branchIDLists_, droppedBranchIDToKeptBranchID_, and origBranchIDLists_.
Referenced by edm::StreamerOutputModuleBase::serializeRegistry(), and edm::RootOutputFile::writeBranchIDListRegistry().
{ if(!droppedBranchIDToKeptBranchID_.empty()) { // Make a private copy of the BranchIDLists. *branchIDLists_ = *origBranchIDLists_; // Check for branches dropped while an EDAlias was kept. // Replace BranchID of each dropped branch with that of the kept alias. for(BranchIDList& branchIDList : *branchIDLists_) { for(BranchID::value_type& branchID : branchIDList) { std::map<BranchID::value_type, BranchID::value_type>::const_iterator iter = droppedBranchIDToKeptBranchID_.find(branchID); if(iter != droppedBranchIDToKeptBranchID_.end()) { branchID = iter->second; } } } return branchIDLists_.get(); } return origBranchIDLists_; }
void edm::OutputModule::configure | ( | OutputModuleDescription const & | desc | ) | [protected] |
Definition at line 174 of file OutputModule.cc.
References edm::OutputModuleDescription::branchIDLists_, maxEvents_, edm::OutputModuleDescription::maxEvents_, origBranchIDLists_, and remainingEvents_.
Referenced by edm::OutputWorker::configure(), and edm::SubProcess::SubProcess().
{ remainingEvents_ = maxEvents_ = desc.maxEvents_; origBranchIDLists_ = desc.branchIDLists_; }
CurrentProcessingContext const * edm::OutputModule::currentContext | ( | ) | const [protected] |
Definition at line 451 of file OutputModule.cc.
References current_context_.
{ return current_context_; }
ModuleDescription const & edm::OutputModule::description | ( | ) | const [protected] |
Definition at line 456 of file OutputModule.cc.
References moduleDescription_.
Referenced by DQMRootOutputModule::openFile(), edm::StreamerOutputModuleBase::serializeRegistry(), and setEventSelectionInfo().
{ return moduleDescription_; }
void edm::OutputModule::doBeginJob | ( | ) | [protected] |
Definition at line 240 of file OutputModule.cc.
References beginJob(), and selectProducts().
{ selectProducts(); this->beginJob(); }
bool edm::OutputModule::doBeginLuminosityBlock | ( | LuminosityBlockPrincipal const & | lbp, |
EventSetup const & | c, | ||
CurrentProcessingContext const * | cpc | ||
) | [protected] |
Definition at line 349 of file OutputModule.cc.
References beginLuminosityBlock(), current_context_, and FDEBUG.
{ detail::CPCSentry sentry(current_context_, cpc); FDEBUG(2) << "beginLuminosityBlock called\n"; beginLuminosityBlock(lbp); return true; }
bool edm::OutputModule::doBeginRun | ( | RunPrincipal const & | rp, |
EventSetup const & | c, | ||
CurrentProcessingContext const * | cpc | ||
) | [protected] |
Definition at line 323 of file OutputModule.cc.
References beginRun(), current_context_, and FDEBUG.
{ detail::CPCSentry sentry(current_context_, cpc); FDEBUG(2) << "beginRun called\n"; beginRun(rp); return true; }
void edm::OutputModule::doCloseFile | ( | ) | [private] |
Tell the OutputModule that is must end the current file.
Definition at line 407 of file OutputModule.cc.
References isFileOpen(), and reallyCloseFile().
Referenced by edm::OutputWorker::closeFile().
{ if(isFileOpen()) reallyCloseFile(); }
void edm::OutputModule::doEndJob | ( | ) | [protected] |
bool edm::OutputModule::doEndLuminosityBlock | ( | LuminosityBlockPrincipal const & | lbp, |
EventSetup const & | c, | ||
CurrentProcessingContext const * | cpc | ||
) | [protected] |
Definition at line 359 of file OutputModule.cc.
References current_context_, endLuminosityBlock(), and FDEBUG.
{ detail::CPCSentry sentry(current_context_, cpc); FDEBUG(2) << "endLuminosityBlock called\n"; endLuminosityBlock(lbp); return true; }
bool edm::OutputModule::doEndRun | ( | RunPrincipal const & | rp, |
EventSetup const & | c, | ||
CurrentProcessingContext const * | cpc | ||
) | [protected] |
Definition at line 333 of file OutputModule.cc.
References current_context_, endRun(), and FDEBUG.
{ detail::CPCSentry sentry(current_context_, cpc); FDEBUG(2) << "endRun called\n"; endRun(rp); return true; }
bool edm::OutputModule::doEvent | ( | EventPrincipal const & | ep, |
EventSetup const & | c, | ||
CurrentProcessingContext const * | cpc | ||
) | [protected] |
Definition at line 282 of file OutputModule.cc.
References current_context_, alignCSCRings::e, FDEBUG, moduleDescription_, prodsValid_, remainingEvents_, selectors_, updateBranchParents(), wantAllEvents_, edm::detail::CachedProducts::wantEvent(), and write().
{ detail::CPCSentry sentry(current_context_, cpc); PVSentry products_sentry(selectors_, prodsValid_); FDEBUG(2) << "writeEvent called\n"; if(!wantAllEvents_) { // use module description and const_cast unless interface to // event is changed to just take a const EventPrincipal Event e(const_cast<EventPrincipal&>(ep), moduleDescription_); if(!selectors_.wantEvent(e)) { return true; } } write(ep); updateBranchParents(ep); if(remainingEvents_ > 0) { --remainingEvents_; } return true; }
void edm::OutputModule::doOpenFile | ( | FileBlock const & | fb | ) | [private] |
Definition at line 373 of file OutputModule.cc.
References openFile().
Referenced by edm::OutputWorker::openFile().
virtual void edm::OutputModule::doOpenFile | ( | ) | [inline, private, virtual] |
Reimplemented in edm::PoolOutputModule.
Definition at line 216 of file OutputModule.h.
Referenced by maybeOpenFile().
{ }
void edm::OutputModule::doPostForkReacquireResources | ( | unsigned int | iChildIndex, |
unsigned int | iNumberOfChildren | ||
) | [private] |
Definition at line 399 of file OutputModule.cc.
References postForkReacquireResources().
{ postForkReacquireResources(iChildIndex, iNumberOfChildren); }
void edm::OutputModule::doPreForkReleaseResources | ( | ) | [private] |
Definition at line 394 of file OutputModule.cc.
References preForkReleaseResources().
{ preForkReleaseResources(); }
void edm::OutputModule::doRespondToCloseInputFile | ( | FileBlock const & | fb | ) | [private] |
Definition at line 381 of file OutputModule.cc.
References respondToCloseInputFile().
{ respondToCloseInputFile(fb); }
void edm::OutputModule::doRespondToCloseOutputFiles | ( | FileBlock const & | fb | ) | [private] |
Definition at line 389 of file OutputModule.cc.
References respondToCloseOutputFiles().
{ respondToCloseOutputFiles(fb); }
void edm::OutputModule::doRespondToOpenInputFile | ( | FileBlock const & | fb | ) | [private] |
Definition at line 377 of file OutputModule.cc.
References respondToOpenInputFile().
{ respondToOpenInputFile(fb); }
void edm::OutputModule::doRespondToOpenOutputFiles | ( | FileBlock const & | fb | ) | [private] |
Definition at line 385 of file OutputModule.cc.
References respondToOpenOutputFiles().
{ respondToOpenOutputFiles(fb); }
void edm::OutputModule::doWriteLuminosityBlock | ( | LuminosityBlockPrincipal const & | lbp | ) | [private] |
Definition at line 368 of file OutputModule.cc.
References FDEBUG, and writeLuminosityBlock().
Referenced by edm::OutputWorker::writeLumi().
{ FDEBUG(2) << "writeLuminosityBlock called\n"; writeLuminosityBlock(lbp); }
void edm::OutputModule::doWriteRun | ( | RunPrincipal const & | rp | ) | [private] |
Definition at line 343 of file OutputModule.cc.
References FDEBUG, and writeRun().
Referenced by edm::OutputWorker::writeRun().
std::map<BranchID::value_type, BranchID::value_type> const& edm::OutputModule::droppedBranchIDToKeptBranchID | ( | ) | [inline, protected] |
Definition at line 109 of file OutputModule.h.
References droppedBranchIDToKeptBranchID_.
Referenced by edm::SubProcess::beginJob().
{ return droppedBranchIDToKeptBranchID_; }
virtual void edm::OutputModule::endJob | ( | void | ) | [inline, private, virtual] |
Reimplemented in edm::SubProcess, and edm::StreamerOutputModuleBase.
Definition at line 199 of file OutputModule.h.
Referenced by doEndJob().
{}
virtual void edm::OutputModule::endLuminosityBlock | ( | LuminosityBlockPrincipal const & | ) | [inline, private, virtual] |
Reimplemented in edm::SubProcess.
Definition at line 204 of file OutputModule.h.
Referenced by doEndLuminosityBlock().
{}
virtual void edm::OutputModule::endRun | ( | RunPrincipal const & | ) | [inline, private, virtual] |
Reimplemented in edm::SubProcess, FRDEventOutputModule< Consumer >, and edm::StreamerOutputModuleBase.
Definition at line 201 of file OutputModule.h.
Referenced by doEndRun().
{}
void edm::OutputModule::fillDependencyGraph | ( | ) | [private] |
Definition at line 537 of file OutputModule.cc.
References branchChildren_, branchParents_, i, edm::BranchChildren::insertChild(), instance, j, parents, and edm::Parentage::parents().
Referenced by reallyCloseFile().
{ for(BranchParents::const_iterator i = branchParents_.begin(), iEnd = branchParents_.end(); i != iEnd; ++i) { BranchID const& child = i->first; std::set<ParentageID> const& eIds = i->second; for(std::set<ParentageID>::const_iterator it = eIds.begin(), itEnd = eIds.end(); it != itEnd; ++it) { Parentage entryDesc; ParentageRegistry::instance()->getMapped(*it, entryDesc); std::vector<BranchID> const& parents = entryDesc.parents(); for(std::vector<BranchID>::const_iterator j = parents.begin(), jEnd = parents.end(); j != jEnd; ++j) { branchChildren_.insertChild(*j, child); } } } }
void edm::OutputModule::fillDescription | ( | ParameterSetDescription & | desc | ) | [static] |
Reimplemented in edm::StreamerOutputModuleBase.
Definition at line 473 of file OutputModule.cc.
Referenced by edm::PoolOutputModule::fillDescriptions(), edm::XMLOutputModule::fillDescriptions(), edm::ProvenanceCheckerOutputModule::fillDescriptions(), edm::GetProductCheckerOutputModule::fillDescriptions(), and edm::AsciiOutputModule::fillDescriptions().
{ GroupSelectorRules::fillDescription(desc, "outputCommands"); EventSelector::fillDescription(desc); }
void edm::OutputModule::fillDescriptions | ( | ConfigurationDescriptions & | descriptions | ) | [static] |
Reimplemented in DQMRootOutputModule, edm::AsciiOutputModule, edm::GetProductCheckerOutputModule, edm::ProvenanceCheckerOutputModule, edm::XMLOutputModule, edm::PoolOutputModule, and edm::StreamerOutputModule< Consumer >.
Definition at line 466 of file OutputModule.cc.
References edm::ConfigurationDescriptions::addDefault(), and edm::ParameterSetDescription::setUnknown().
{ ParameterSetDescription desc; desc.setUnknown(); descriptions.addDefault(desc); }
virtual void edm::OutputModule::finishEndFile | ( | ) | [inline, private, virtual] |
Reimplemented in DQMRootOutputModule, and edm::PoolOutputModule.
Definition at line 242 of file OutputModule.h.
Referenced by reallyCloseFile().
{}
Trig edm::OutputModule::getTriggerResults | ( | EventPrincipal const & | ep | ) | const [protected] |
Definition at line 254 of file OutputModule.cc.
References current_context_, getTriggerResults(), and edm::CurrentProcessingContext::moduleDescription().
{ // This is bad, because we're returning handles into an Event that // is destructed before the return. It might not fail, because the // actual EventPrincipal is not destroyed, but it still needs to // be cleaned up. Event ev(const_cast<EventPrincipal&>(ep), *current_context_->moduleDescription()); return getTriggerResults(ev); }
Definition at line 250 of file OutputModule.cc.
References edm::detail::CachedProducts::getOneTriggerResults(), and selectors_.
Referenced by getTriggerResults(), and edm::StreamerOutputModuleBase::setHltMask().
{ return selectors_.getOneTriggerResults(ev); }
boost::array<bool, NumBranchTypes> const& edm::OutputModule::hasNewlyDroppedBranch | ( | ) | const [inline] |
Definition at line 59 of file OutputModule.h.
References hasNewlyDroppedBranch_.
{return hasNewlyDroppedBranch_;}
virtual bool edm::OutputModule::isFileOpen | ( | ) | const [inline, private, virtual] |
Reimplemented in DQMRootOutputModule, and edm::PoolOutputModule.
Definition at line 214 of file OutputModule.h.
Referenced by doCloseFile(), and maybeOpenFile().
{ return true; }
SelectionsArray const& edm::OutputModule::keptProducts | ( | ) | const [inline] |
Definition at line 58 of file OutputModule.h.
References keptProducts_.
Referenced by edm::PoolOutputModule::beginJob(), edm::SubProcess::beginJob(), edm::PoolOutputModule::fillSelectedItemList(), edm::RootOutputFile::finishEndFile(), edm::OutputWorker::keptProducts(), edm::SubProcess::propagateProducts(), and edm::XMLOutputModule::write().
{return keptProducts_;}
bool edm::OutputModule::limitReached | ( | ) | const [inline, private] |
Definition at line 225 of file OutputModule.h.
References remainingEvents_.
Referenced by edm::OutputWorker::limitReached().
{return remainingEvents_ == 0;}
int edm::OutputModule::maxEvents | ( | ) | const [inline] |
Accessor for maximum number of events to be written. -1 is used for unlimited.
Definition at line 48 of file OutputModule.h.
References maxEvents_.
Referenced by edm::SubProcess::SubProcess().
{return maxEvents_;}
void edm::OutputModule::maybeOpenFile | ( | ) | [private] |
Tell the OutputModule to open an output file, if one is not already open.
Definition at line 403 of file OutputModule.cc.
References doOpenFile(), and isFileOpen().
Referenced by edm::OutputWorker::openNewFileIfNeeded().
{ if(!isFileOpen()) doOpenFile(); }
virtual void edm::OutputModule::openFile | ( | FileBlock const & | ) | [inline, private, virtual] |
Reimplemented in DQMRootOutputModule, and edm::PoolOutputModule.
Definition at line 206 of file OutputModule.h.
Referenced by doOpenFile().
{}
virtual void edm::OutputModule::postForkReacquireResources | ( | unsigned int | , |
unsigned int | |||
) | [inline, private, virtual] |
Reimplemented in edm::SubProcess, and edm::PoolOutputModule.
Definition at line 212 of file OutputModule.h.
Referenced by doPostForkReacquireResources().
{}
virtual void edm::OutputModule::preForkReleaseResources | ( | ) | [inline, private, virtual] |
Reimplemented in edm::SubProcess.
Definition at line 211 of file OutputModule.h.
Referenced by doPreForkReleaseResources().
{}
void edm::OutputModule::prevalidate | ( | ConfigurationDescriptions & | ) | [static] |
Definition at line 479 of file OutputModule.cc.
{ }
std::string const& edm::OutputModule::processName | ( | ) | const [inline] |
Definition at line 57 of file OutputModule.h.
References process_name_.
Referenced by edm::StreamerOutputModuleBase::serializeRegistry(), and DQMRootOutputModule::startEndFile().
{return process_name_;}
void edm::OutputModule::reallyCloseFile | ( | ) | [private] |
Definition at line 411 of file OutputModule.cc.
References branchChildren_, branchParents_, edm::BranchChildren::clear(), fillDependencyGraph(), finishEndFile(), startEndFile(), writeBranchIDListRegistry(), writeBranchMapper(), writeFileFormatVersion(), writeFileIdentifier(), writeIndexIntoFile(), writeParameterSetRegistry(), writeParentageRegistry(), writeProcessConfigurationRegistry(), writeProcessHistoryRegistry(), writeProductDependencies(), and writeProductDescriptionRegistry().
Referenced by doCloseFile().
{ fillDependencyGraph(); startEndFile(); writeFileFormatVersion(); writeFileIdentifier(); writeIndexIntoFile(); writeProcessConfigurationRegistry(); writeProcessHistoryRegistry(); writeParameterSetRegistry(); writeProductDescriptionRegistry(); writeParentageRegistry(); writeBranchIDListRegistry(); writeProductDependencies(); writeBranchMapper(); finishEndFile(); branchParents_.clear(); branchChildren_.clear(); }
void edm::OutputModule::registerProductsAndCallbacks | ( | OutputModule const * | , |
ProductRegistry const * | |||
) | [inline, private] |
Definition at line 192 of file OutputModule.h.
{}
int edm::OutputModule::remainingEvents | ( | ) | const [inline] |
Accessor for remaining number of events to be written. -1 is used for unlimited.
Definition at line 52 of file OutputModule.h.
References remainingEvents_.
Referenced by edm::PoolOutputModule::beginInputFile().
{return remainingEvents_;}
virtual void edm::OutputModule::respondToCloseInputFile | ( | FileBlock const & | ) | [inline, private, virtual] |
Reimplemented in edm::SubProcess, and edm::PoolOutputModule.
Definition at line 208 of file OutputModule.h.
Referenced by doRespondToCloseInputFile().
{}
virtual void edm::OutputModule::respondToCloseOutputFiles | ( | FileBlock const & | ) | [inline, private, virtual] |
Reimplemented in edm::SubProcess.
Definition at line 210 of file OutputModule.h.
Referenced by doRespondToCloseOutputFiles().
{}
virtual void edm::OutputModule::respondToOpenInputFile | ( | FileBlock const & | ) | [inline, private, virtual] |
Reimplemented in edm::SubProcess, and edm::PoolOutputModule.
Definition at line 207 of file OutputModule.h.
Referenced by doRespondToOpenInputFile().
{}
virtual void edm::OutputModule::respondToOpenOutputFiles | ( | FileBlock const & | ) | [inline, private, virtual] |
Reimplemented in edm::SubProcess.
Definition at line 209 of file OutputModule.h.
Referenced by doRespondToOpenOutputFiles().
{}
bool edm::OutputModule::selected | ( | BranchDescription const & | desc | ) | const |
Definition at line 461 of file OutputModule.cc.
References groupSelector_, and edm::GroupSelector::selected().
Referenced by selectProducts(), and edm::AsciiOutputModule::write().
{ return groupSelector_.selected(desc); }
ParameterSetID edm::OutputModule::selectorConfig | ( | ) | const [inline, protected] |
Definition at line 89 of file OutputModule.h.
References selector_config_id_.
Referenced by edm::StreamerOutputModuleBase::serializeEvent(), edm::SubProcess::write(), and edm::RootOutputFile::writeOne().
{ return selector_config_id_; }
void edm::OutputModule::selectProducts | ( | ) |
Definition at line 179 of file OutputModule.cc.
References edm::BranchDescription::branchID(), edm::BranchDescription::branchType(), edm::errors::Configuration, droppedBranchIDToKeptBranchID_, Exception, edm::getAllBranchDescriptions(), groupSelector_, groupSelectorRules_, hasNewlyDroppedBranch_, edm::BranchID::id(), edm::GroupSelector::initialize(), edm::GroupSelector::initialized(), edm::BranchDescription::isAlias(), keptProducts_, edm::BranchDescription::originalBranchID(), edm::BranchDescription::present(), edm::BranchDescription::produced(), selected(), and edm::BranchDescription::transient().
Referenced by doBeginJob().
{ if(groupSelector_.initialized()) return; groupSelector_.initialize(groupSelectorRules_, getAllBranchDescriptions()); Service<ConstProductRegistry> reg; // TODO: See if we can collapse keptProducts_ and groupSelector_ into a // single object. See the notes in the header for GroupSelector // for more information. std::map<BranchID, BranchDescription const*> trueBranchIDToKeptBranchDesc; for(auto const& it : reg->productList()) { BranchDescription const& desc = it.second; if(desc.transient()) { // if the class of the branch is marked transient, output nothing } else if(!desc.present() && !desc.produced()) { // else if the branch containing the product has been previously dropped, // output nothing } else if(selected(desc)) { // else if the branch has been selected, put it in the list of selected branches. if(desc.produced()) { // First we check if an equivalent branch has already been selected due to an EDAlias. // We only need the check for products produced in this process. BranchID const& trueBranchID = desc.originalBranchID(); std::map<BranchID, BranchDescription const*>::const_iterator iter = trueBranchIDToKeptBranchDesc.find(trueBranchID); if(iter != trueBranchIDToKeptBranchDesc.end()) { throw edm::Exception(errors::Configuration, "Duplicate Output Selection") << "Two (or more) equivalent branches have been selected for output.\n" << "#1: " << BranchKey(desc) << "\n" << "#2: " << BranchKey(*iter->second) << "\n" << "Please drop at least one of them.\n"; } trueBranchIDToKeptBranchDesc.insert(std::make_pair(trueBranchID, &desc)); } // Now put it in the list of selected branches. keptProducts_[desc.branchType()].push_back(&desc); } else { // otherwise, output nothing, // and mark the fact that there is a newly dropped branch of this type. hasNewlyDroppedBranch_[desc.branchType()] = true; } } // Now fill in a mapping needed in the case that a branch was dropped while its EDAlias was kept. for(auto const& it : reg->productList()) { BranchDescription const& desc = it.second; if(!desc.produced() || desc.isAlias()) continue; BranchID const& branchID = desc.branchID(); std::map<BranchID, BranchDescription const*>::const_iterator iter = trueBranchIDToKeptBranchDesc.find(branchID); if(iter != trueBranchIDToKeptBranchDesc.end()) { // This branch, produced in this process, or an alias of it, was persisted. BranchID const& keptBranchID = iter->second->branchID(); if(keptBranchID != branchID) { // An EDAlias branch was persisted. droppedBranchIDToKeptBranchID_.insert(std::make_pair(branchID.id(), keptBranchID.id())); } } } }
void edm::OutputModule::setEventSelectionInfo | ( | std::map< std::string, std::vector< std::pair< std::string, int > > > const & | outputModulePathPositions, |
bool | anyProductProduced | ||
) | [protected] |
Definition at line 490 of file OutputModule.cc.
References edm::ParameterSet::addParameter(), edm::ParameterSet::copyForModify(), description(), alignCSCRings::e, edm::ParameterSet::exists(), edm::getParameterSet(), i, edm::ParameterSet::id(), diffTwoXMLs::label, edm::ModuleDescription::moduleLabel(), edm::ParameterSet::registerIt(), selector_config_id_, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by edm::SubProcess::SubProcess().
{ ParameterSet selectEventsInfo; selectEventsInfo.copyForModify(getParameterSet(selector_config_id_)); selectEventsInfo.addParameter<bool>("InProcessHistory", anyProductProduced); std::string const& label = description().moduleLabel(); std::vector<std::string> endPaths; std::vector<int> endPathPositions; // The label will be empty if and only if this is a SubProcess // SubProcess's do not appear on any end path if (!label.empty()) { std::map<std::string, std::vector<std::pair<std::string, int> > >::const_iterator iter = outputModulePathPositions.find(label); assert(iter != outputModulePathPositions.end()); for (std::vector<std::pair<std::string, int> >::const_iterator i = iter->second.begin(), e = iter->second.end(); i != e; ++i) { endPaths.push_back(i->first); endPathPositions.push_back(i->second); } } selectEventsInfo.addParameter<std::vector<std::string> >("EndPaths", endPaths); selectEventsInfo.addParameter<std::vector<int> >("EndPathPositions", endPathPositions); if (!selectEventsInfo.exists("SelectEvents")) { selectEventsInfo.addParameter<std::vector<std::string> >("SelectEvents", std::vector<std::string>()); } selectEventsInfo.registerIt(); selector_config_id_ = selectEventsInfo.id(); }
void edm::OutputModule::setModuleDescription | ( | ModuleDescription const & | md | ) | [inline, private] |
Definition at line 218 of file OutputModule.h.
References moduleDescription_.
{ moduleDescription_ = md; }
virtual bool edm::OutputModule::shouldWeCloseFile | ( | ) | const [inline, private, virtual] |
Ask the OutputModule if we should end the current file.
Reimplemented in edm::PoolOutputModule, and edm::TimeoutPoolOutputModule.
Definition at line 195 of file OutputModule.h.
Referenced by edm::OutputWorker::shouldWeCloseFile().
{return false;}
virtual void edm::OutputModule::startEndFile | ( | ) | [inline, private, virtual] |
Reimplemented in DQMRootOutputModule, and edm::PoolOutputModule.
Definition at line 230 of file OutputModule.h.
Referenced by reallyCloseFile().
{}
void edm::OutputModule::updateBranchParents | ( | EventPrincipal const & | ep | ) | [private] |
Definition at line 522 of file OutputModule.cc.
References edm::Principal::begin(), branchChildren_, branchParents_, edm::Principal::end(), i, and edm::BranchChildren::insertEmpty().
Referenced by doEvent().
{ for(EventPrincipal::const_iterator i = ep.begin(), iEnd = ep.end(); i != iEnd; ++i) { if((*i) && (*i)->productProvenancePtr() != 0) { BranchID const& bid = (*i)->branchDescription().branchID(); BranchParents::iterator it = branchParents_.find(bid); if(it == branchParents_.end()) { it = branchParents_.insert(std::make_pair(bid, std::set<ParentageID>())).first; } it->second.insert((*i)->productProvenancePtr()->parentageID()); branchChildren_.insertEmpty(bid); } } }
bool edm::OutputModule::wantAllEvents | ( | ) | const [inline] |
Definition at line 68 of file OutputModule.h.
References wantAllEvents_.
Referenced by edm::PoolOutputModule::PoolOutputModule(), edm::OutputWorker::wantAllEvents(), edm::SubProcess::write(), and edm::RootOutputFile::writeOne().
{return wantAllEvents_;}
std::string edm::OutputModule::workerType | ( | ) | const [inline, private] |
Definition at line 178 of file OutputModule.h.
{return "OutputWorker";}
virtual void edm::OutputModule::write | ( | EventPrincipal const & | e | ) | [private, pure virtual] |
Implemented in DQMRootOutputModule, edm::SubProcess, edm::AsciiOutputModule, edm::GetProductCheckerOutputModule, edm::ProvenanceCheckerOutputModule, edm::XMLOutputModule, edm::PoolOutputModule, edm::TimeoutPoolOutputModule, FRDEventOutputModule< Consumer >, and edm::StreamerOutputModuleBase.
Referenced by doEvent().
virtual void edm::OutputModule::writeBranchIDListRegistry | ( | ) | [inline, private, virtual] |
Reimplemented in edm::PoolOutputModule.
Definition at line 237 of file OutputModule.h.
Referenced by reallyCloseFile().
{}
virtual void edm::OutputModule::writeBranchMapper | ( | ) | [inline, private, virtual] |
virtual void edm::OutputModule::writeFileFormatVersion | ( | ) | [inline, private, virtual] |
Reimplemented in edm::PoolOutputModule.
Definition at line 231 of file OutputModule.h.
Referenced by reallyCloseFile().
{}
virtual void edm::OutputModule::writeFileIdentifier | ( | ) | [inline, private, virtual] |
Reimplemented in edm::PoolOutputModule.
Definition at line 232 of file OutputModule.h.
Referenced by reallyCloseFile().
{}
virtual void edm::OutputModule::writeIndexIntoFile | ( | ) | [inline, private, virtual] |
Reimplemented in edm::PoolOutputModule.
Definition at line 233 of file OutputModule.h.
Referenced by reallyCloseFile().
{}
virtual void edm::OutputModule::writeLuminosityBlock | ( | LuminosityBlockPrincipal const & | ) | [private, pure virtual] |
Implemented in DQMRootOutputModule, edm::SubProcess, edm::AsciiOutputModule, edm::GetProductCheckerOutputModule, edm::ProvenanceCheckerOutputModule, edm::XMLOutputModule, edm::PoolOutputModule, FRDEventOutputModule< Consumer >, and edm::StreamerOutputModuleBase.
Referenced by doWriteLuminosityBlock().
virtual void edm::OutputModule::writeParameterSetRegistry | ( | ) | [inline, private, virtual] |
Reimplemented in edm::PoolOutputModule.
Definition at line 236 of file OutputModule.h.
Referenced by reallyCloseFile().
{}
virtual void edm::OutputModule::writeParentageRegistry | ( | ) | [inline, private, virtual] |
Reimplemented in edm::PoolOutputModule.
Definition at line 238 of file OutputModule.h.
Referenced by reallyCloseFile().
{}
virtual void edm::OutputModule::writeProcessConfigurationRegistry | ( | ) | [inline, private, virtual] |
Reimplemented in edm::PoolOutputModule.
Definition at line 234 of file OutputModule.h.
Referenced by reallyCloseFile().
{}
virtual void edm::OutputModule::writeProcessHistoryRegistry | ( | ) | [inline, private, virtual] |
Reimplemented in edm::PoolOutputModule.
Definition at line 235 of file OutputModule.h.
Referenced by reallyCloseFile().
{}
virtual void edm::OutputModule::writeProductDependencies | ( | ) | [inline, private, virtual] |
Reimplemented in edm::PoolOutputModule.
Definition at line 240 of file OutputModule.h.
Referenced by reallyCloseFile().
{}
virtual void edm::OutputModule::writeProductDescriptionRegistry | ( | ) | [inline, private, virtual] |
Reimplemented in edm::PoolOutputModule.
Definition at line 239 of file OutputModule.h.
Referenced by reallyCloseFile().
{}
virtual void edm::OutputModule::writeRun | ( | RunPrincipal const & | ) | [private, pure virtual] |
friend class OutputWorker [friend] |
Definition at line 40 of file OutputModule.h.
friend class WorkerT [friend] |
Definition at line 39 of file OutputModule.h.
Definition at line 163 of file OutputModule.h.
Referenced by branchChildren(), fillDependencyGraph(), reallyCloseFile(), and updateBranchParents().
std::unique_ptr<BranchIDLists> edm::OutputModule::branchIDLists_ [private] |
Definition at line 157 of file OutputModule.h.
Referenced by branchIDLists().
Definition at line 161 of file OutputModule.h.
Referenced by fillDependencyGraph(), reallyCloseFile(), and updateBranchParents().
CurrentProcessingContext const* edm::OutputModule::current_context_ [private] |
Definition at line 142 of file OutputModule.h.
Referenced by currentContext(), doBeginLuminosityBlock(), doBeginRun(), doEndLuminosityBlock(), doEndRun(), doEvent(), and getTriggerResults().
std::map<BranchID::value_type, BranchID::value_type> edm::OutputModule::droppedBranchIDToKeptBranchID_ [private] |
Definition at line 156 of file OutputModule.h.
Referenced by branchIDLists(), droppedBranchIDToKeptBranchID(), and selectProducts().
Definition at line 138 of file OutputModule.h.
Referenced by selected(), and selectProducts().
Definition at line 137 of file OutputModule.h.
Referenced by selectProducts().
boost::array<bool, NumBranchTypes> edm::OutputModule::hasNewlyDroppedBranch_ [private] |
Definition at line 134 of file OutputModule.h.
Referenced by hasNewlyDroppedBranch(), OutputModule(), and selectProducts().
Definition at line 133 of file OutputModule.h.
Referenced by keptProducts(), and selectProducts().
int edm::OutputModule::maxEvents_ [private] |
Definition at line 115 of file OutputModule.h.
Referenced by configure(), and maxEvents().
Definition at line 139 of file OutputModule.h.
Referenced by description(), doEvent(), and setModuleDescription().
BranchIDLists const* edm::OutputModule::origBranchIDLists_ [private] |
Definition at line 158 of file OutputModule.h.
Referenced by branchIDLists(), and configure().
std::string edm::OutputModule::process_name_ [private] |
Definition at line 136 of file OutputModule.h.
Referenced by OutputModule(), and processName().
bool edm::OutputModule::prodsValid_ [mutable, private] |
Definition at line 146 of file OutputModule.h.
Referenced by doEvent().
int edm::OutputModule::remainingEvents_ [private] |
Definition at line 116 of file OutputModule.h.
Referenced by configure(), doEvent(), limitReached(), and remainingEvents().
Definition at line 152 of file OutputModule.h.
Referenced by OutputModule(), selectorConfig(), and setEventSelectionInfo().
detail::CachedProducts edm::OutputModule::selectors_ [mutable, private] |
Definition at line 149 of file OutputModule.h.
Referenced by doEvent(), getTriggerResults(), and OutputModule().
bool edm::OutputModule::wantAllEvents_ [private] |
Definition at line 148 of file OutputModule.h.
Referenced by doEvent(), OutputModule(), and wantAllEvents().