31 std::set<ElementLink<TrigRoiDescriptorCollection>> uniqueRoIs;
32 for (
Input& input : inputs) {
35 ATH_MSG_DEBUG(
"Skipping chain because previous step didn't pass");
43 [&input](uint8_t test_tt) { return (test_tt & input.tt) == test_tt; }
50 bool isUnique = uniqueRoIs.insert(input.roiEL).second;
51 ATH_MSG_DEBUG(
"RoI eta/phi = " << (*input.roiEL)->eta() <<
"/" << (*input.roiEL)->phi() <<
" has "
52 << (isUnique ?
"not yet" :
"already") <<
" been processed. So far seen "
53 << uniqueRoIs.size() <<
" unique RoIs including this one");
56 bool maxRoIsReached{
false};
58 ATH_MSG_DEBUG(
"Will attach empty PEB Info to this decision because the number of "
59 <<
"processed RoIs reached MaxRoIs (" <<
m_maxRoIs.value() <<
")");
60 maxRoIsReached =
true;
67 std::vector<uint32_t> previousRobs;
69 pebInfo.
robs.insert(previousRobs.begin(), previousRobs.end());
72 std::vector<uint32_t> previousSubDets;
74 pebInfo.
subdets.insert(previousSubDets.begin(), previousSubDets.end());
77 std::vector<uint32_t> robVec(pebInfo.
robs.begin(), pebInfo.
robs.end());
78 if (not input.decision->setDetail(
robListKey(), robVec)) {
80 return StatusCode::FAILURE;
82 std::vector<uint32_t> subDetVec(pebInfo.
subdets.begin(), pebInfo.
subdets.end());
83 if (not input.decision->setDetail(
subDetListKey(), subDetVec)) {
85 return StatusCode::FAILURE;
88 ATH_MSG_DEBUG(
"Attached PEB Info with " << robVec.size() <<
" ROBs and "
89 << subDetVec.size() <<
" SubDets to the decision object.");
95 return StatusCode::SUCCESS;
103 for (
const uint32_t robid : pebi.
robs) {
104 str <<
"0x" << std::hex << robid << std::dec;
106 if (i!=pebi.
robs.size())
str <<
", ";
108 str <<
"], SubDets = [";
110 for (
const uint32_t subdetid : pebi.
subdets) {
111 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.