3 #include "cetlib/container_algorithms.h" 18 p_and_e_selectors_.emplace_back(
"", ES);
23 vector<pair<string, string>>
const& path_specs,
24 vector<string>
const& triggernames,
25 string const& process_name)
29 map<string, vector<string>> paths_for_process;
30 for (
auto const& pr : path_specs) {
31 auto const& pname = pr.first.empty() ? process_name : pr.first;
32 paths_for_process[pname].push_back(pr.second);
37 for (
auto const& pr : paths_for_process) {
38 auto const& pname = pr.first;
39 auto const& paths = pr.second;
40 if (pname == process_name) {
42 p_and_e_selectors_.emplace_back(pname,
60 loadTriggerResults(ev);
62 return any_of(
begin(p_and_e_selectors_),
63 end(p_and_e_selectors_),
64 [](
auto&
s) {
return s.match(); });
71 if (numberFound_ == 1) {
72 return p_and_e_selectors_[0].triggerResults();
74 if (numberFound_ == 0) {
76 <<
"CachedProducts::getOneTriggerResults: " 77 <<
"too few products found, exepcted one, got zero\n";
80 <<
"CachedProducts::getOneTriggerResults: " 81 <<
"too many products found, expected one, got " << numberFound_ <<
'\n';
87 for_all(p_and_e_selectors_, [](
auto& p) { p.clearTriggerResults(); });
103 for_all(p_and_e_selectors_, [&,
this](
auto&
s) {
104 s.loadTriggerResults(ev);
art::Handle< art::TriggerResults > getOneTriggerResults(Event const &) const
void clearTriggerResults()
void setup(std::vector< std::pair< std::string, std::string >> const &path_specs, std::vector< std::string > const &trigger_names, std::string const &process_name)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
std::vector< evd::details::RawDigitInfo_t >::const_iterator begin(RawDigitCacheDataClass const &cache)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
void loadTriggerResults(Event const &)
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
void setupDefault(std::vector< std::string > const &trigger_names)
bool wantEvent(Event const &)