33 std::set<ElementLink<TrigRoiDescriptorCollection>> uniqueRoIs;
34 for (
Input& input : inputs) {
37 ATH_MSG_DEBUG(
"Skipping chain because previous step didn't pass");
45 [&input](uint8_t test_tt) { return (test_tt & input.tt) == test_tt; }
52 bool isUnique = uniqueRoIs.insert(input.roiEL).second;
53 ATH_MSG_DEBUG(
"RoI eta/phi = " << (*input.roiEL)->eta() <<
"/" << (*input.roiEL)->phi() <<
" has "
54 << (isUnique ?
"not yet" :
"already") <<
" been processed. So far seen "
55 << uniqueRoIs.size() <<
" unique RoIs including this one");
58 bool maxRoIsReached{
false};
60 ATH_MSG_DEBUG(
"Will attach empty PEB Info to this decision because the number of "
61 <<
"processed RoIs reached MaxRoIs (" <<
m_maxRoIs.value() <<
")");
62 maxRoIsReached =
true;
69 std::vector<uint32_t> previousRobs;
71 pebInfo.
robs.insert(previousRobs.begin(), previousRobs.end());
74 std::vector<uint32_t> previousSubDets;
76 pebInfo.
subdets.insert(previousSubDets.begin(), previousSubDets.end());
79 std::vector<uint32_t> robVec(pebInfo.
robs.begin(), pebInfo.
robs.end());
80 if (not input.decision->setDetail(
robListKey(), robVec)) {
82 return StatusCode::FAILURE;
84 std::vector<uint32_t> subDetVec(pebInfo.
subdets.begin(), pebInfo.
subdets.end());
85 if (not input.decision->setDetail(
subDetListKey(), subDetVec)) {
87 return StatusCode::FAILURE;
90 ATH_MSG_DEBUG(
"Attached PEB Info with " << robVec.size() <<
" ROBs and "
91 << subDetVec.size() <<
" SubDets to the decision object.");
97 return StatusCode::SUCCESS;
105 for (
const uint32_t robid : pebi.
robs) {
106 str <<
"0x" << std::hex << robid << std::dec;
108 if (i!=pebi.
robs.size())
str <<
", ";
110 str <<
"], SubDets = [";
112 for (
const uint32_t subdetid : pebi.
subdets) {
113 str <<
"0x" << std::hex << subdetid << std::dec;
#define ATH_CHECK
Evaluate an expression and check for errors.
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
xAOD::TrigComposite Decision
Decision * newDecisionIn(DecisionContainer *dc, const std::string &name)
Helper method to create a Decision object, place it in the container and return a pointer to it.
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
std::set< DecisionID > DecisionIDContainer
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
xAOD::TrigCompositeContainer DecisionContainer
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.