162 <<
"EventSelector::acceptEvent cannot find the trigger names for\n" 163 <<
"a process for which the configuration has requested that the\n" 164 <<
"OutputModule use TriggerResults to select events from. This " 166 <<
"be impossible, please send information to reproduce this problem " 168 <<
"the art developers at artists@fnal.gov.\n";
170 auto const trigger_path_specs =
171 pset.
get<vector<string>>(
"trigger_paths", {});
172 if (trigger_path_specs.size() != tr.size()) {
174 <<
"EventSelector::acceptEvent: Trigger names vector and\n" 175 <<
"TriggerResults are different sizes. This should be impossible,\n" 176 <<
"please send information to reproduce this problem to\n" 177 <<
"the art developers.\n";
180 std::vector<BitInfo> absolute_acceptors;
181 std::vector<BitInfo> conditional_acceptors;
182 std::vector<BitInfo> exception_acceptors;
183 std::vector<std::vector<BitInfo>> all_must_fail;
184 std::vector<std::vector<BitInfo>> all_must_fail_noex;
187 string specifier{pathSpecifier};
189 bool const noex_demanded = remove_noexception(pathSpecifier, specifier);
190 bool const negative_criterion = remove_negation(specifier);
191 bool const exception_spec = remove_exception(pathSpecifier, specifier);
193 if (negative_criterion && exception_spec) {
195 <<
"EventSelector::init, A module is using SelectEvents\n" 196 <<
"to request a trigger name starting with !exception@.\n" 197 <<
"This is not supported.\n" 198 <<
"The improper trigger name is: " << pathSpecifier <<
"\n";
201 if (noex_demanded && exception_spec) {
203 <<
"EventSelector::init, A module is using SelectEvents\n" 204 <<
"to request a trigger name starting with exception@ " 205 <<
"and also demanding &noexception.\n" 206 <<
"The improper trigger name is: " << pathSpecifier <<
"\n";
214 string const& realname{specifier};
219 <<
"EventSelector::init, A module is using SelectEvents\n" 220 "to request a wildcarded trigger name that " 221 "does not match any trigger.\n" 222 "The wildcarded trigger name is: " 224 <<
" (from trigger-path specification: " << pathSpecifier <<
") \n";
227 <<
"EventSelector::init, A module is using SelectEvents\n" 228 "to request a trigger name that does not exist.\n" 229 "The unknown trigger name is: " 231 <<
" (from trigger-path specification: " << pathSpecifier <<
") \n";
235 auto makeBitInfoPass = [&trigger_path_specs](
auto m) {
236 return BitInfo{path_position(trigger_path_specs,
m),
true};
238 auto makeBitInfoFail = [&trigger_path_specs](
auto m) {
239 return BitInfo{path_position(trigger_path_specs,
m),
false};
242 if (!negative_criterion && !noex_demanded && !exception_spec) {
244 matches, back_inserter(absolute_acceptors), makeBitInfoPass);
248 if (!negative_criterion && noex_demanded) {
250 matches, back_inserter(conditional_acceptors), makeBitInfoPass);
254 if (exception_spec) {
256 matches, back_inserter(exception_acceptors), makeBitInfoPass);
260 if (negative_criterion && !noex_demanded) {
263 <<
"EventSelector::init, A module is using SelectEvents\n" 264 "to request all fails on a set of trigger names that do not " 266 <<
"The problematic name is: " << pathSpecifier <<
"\n";
271 absolute_acceptors.push_back(bi);
274 auto must_fail =
matches | ranges::views::transform(makeBitInfoFail) |
276 all_must_fail.push_back(
move(must_fail));
281 if (negative_criterion && noex_demanded) {
284 <<
"EventSelector::init, A module is using SelectEvents\n" 285 "to request all fails on a set of trigger names that do not " 287 <<
"The problematic name is: " << pathSpecifier <<
"\n";
292 conditional_acceptors.push_back(bi);
294 auto must_fail =
matches | ranges::views::transform(makeBitInfoFail) |
296 all_must_fail_noex.push_back(
move(must_fail));
300 return ScheduleData{tr.parameterSetID(),
302 conditional_acceptors,
std::vector< std::string > const path_specs_
static collection_type const & get() noexcept
std::vector< std::vector< std::string >::const_iterator > regexMatch(std::vector< std::string > const &strings, std::string const &pattern)
T get(std::string const &key) const
auto transform_all(Container &, OutputIt, UnaryOp)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
bool is_glob(std::string const &pattern)