17 typedef std::vector<edm::BranchDescription const*>
VCBDP;
27 std::vector<BranchSelectState> branchstates;
29 branchstates.reserve(branchDescriptions.size());
31 VCBDP::const_iterator it = branchDescriptions.begin();
32 VCBDP::const_iterator
end = branchDescriptions.end();
33 for (; it !=
end; ++it) branchstates.emplace_back(*it);
45 std::vector<BranchSelectState>::const_iterator it = branchstates.begin();
46 std::vector<BranchSelectState>::const_iterator
end = branchstates.end();
47 for (; it !=
end; ++it) {
58 <<
"ProductSelector::selected() called prematurely\n"
59 <<
"before the product registry has been frozen.\n";
68 os <<
"ProductSelector at: "
69 <<
static_cast<void const*
>(
this)
72 <<
" products to select:\n";
78 std::map<BranchID, BranchDescription const*>& trueBranchIDToKeptBranchDesc) {
83 std::map<BranchID, BranchDescription const*>::const_iterator iter = trueBranchIDToKeptBranchDesc.find(trueBranchID);
84 if(iter != trueBranchIDToKeptBranchDesc.end()) {
86 <<
"Two (or more) equivalent branches have been selected for output.\n"
88 <<
"#2: " <<
BranchKey(*iter->second) <<
"\n"
89 <<
"Please drop at least one of them.\n";
91 trueBranchIDToKeptBranchDesc.insert(std::make_pair(trueBranchID, &desc));
98 std::map<BranchID, BranchDescription const*>
const& trueBranchIDToKeptBranchDesc,
99 std::map<BranchID::value_type, BranchID::value_type>& droppedBranchIDToKeptBranchID_) {
104 std::map<BranchID, BranchDescription const*>::const_iterator iter = trueBranchIDToKeptBranchDesc.find(branchID);
105 if(iter != trueBranchIDToKeptBranchDesc.end()) {
107 BranchID const& keptBranchID = iter->second->branchID();
108 if(keptBranchID != branchID) {
110 droppedBranchIDToKeptBranchID_.insert(std::make_pair(branchID.
id(), keptBranchID.
id()));
std::string const & branchName() const
bool selected(BranchDescription const &desc) const
static void fillDroppedToKept(ProductRegistry const &preg, std::map< BranchID, BranchDescription const * > const &trueBranchIDToKeptBranchDesc, std::map< BranchID::value_type, BranchID::value_type > &droppedBranchIDToKeptBranchID_)
std::vector< std::string > productsToSelect_
void applyToAll(std::vector< BranchSelectState > &branchstates) const
ProductList const & productList() const
BranchID const & branchID() const
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
std::vector< edm::BranchDescription const * > VCBDP
Func copy_all(ForwardSequence &s, Func f)
wrappers for copy
void initialize(ProductSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions)
bool binary_search_all(ForwardSequence const &s, Datum const &d)
wrappers for std::binary_search
BranchID const & originalBranchID() const
void print(std::ostream &os) const
volatile std::atomic< bool > shutdown_flag false
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
static void checkForDuplicateKeptBranch(BranchDescription const &desc, std::map< BranchID, BranchDescription const * > &trueBranchIDToKeptBranchDesc)