96 {
97
98 using namespace TrigCompositeUtils;
101 SmartIF<IAlgExecStateSvc> aess = svcLoc()->service<IAlgExecStateSvc>("AlgExecStateSvc", false);
102 if (aess.isValid() && aess->eventStatus(ctx) != EventStatus::Success) {
104 return StatusCode::SUCCESS;
105 }
107 return StatusCode::FAILURE;
108 }
109
110
113 if (passNode==nullptr) {
115 return StatusCode::FAILURE;
116 }
118 return StatusCode::SUCCESS;
119 };
120
121
124 if (passRawIDs.empty()) {
126 return StatusCode::SUCCESS;
127 }
128
129
132
133 std::unordered_map<unsigned int, PEBInfoWriterToolBase::PEBInfo> chainToPEBInfo;
135
136
138
140 continue;
141
142 auto mappingIter =
m_mapping.find( chain );
144 ATH_MSG_ERROR(
"Each chain has to have the StreamTag associated whereas the " << HLT::Identifier( chain ) <<
" does not" );
145 return StatusCode::FAILURE;
146 }
147
148 const std::vector<StreamTagInfo>&
streams = mappingIter->second;
150 const auto& [st_name, st_type, obeysLB, forceFullEvent] = streamTagInfo;
151 ATH_MSG_DEBUG(
"Chain " << HLT::Identifier( chain ) <<
" accepted event into stream " << st_type <<
"_" << st_name
152 << " (obeysLB=" << obeysLB << ", forceFullEvent=" << forceFullEvent << ")");
153
154
155 if (st_type == "express") {
156 const auto activeExpress = std::find(passExpressIDs.begin(), passExpressIDs.end(), chain);
157
158 if (activeExpress == passExpressIDs.end()) continue;
159 }
160
161 std::set<uint32_t>
robs;
162 std::set<eformat::SubDetector> subdets;
163 if (!forceFullEvent) {
164 auto it = chainToPEBInfo.find(chain);
165 if (it != chainToPEBInfo.end()) {
166 ATH_MSG_DEBUG(
"Chain " << HLT::Identifier( chain ) <<
" adds PEBInfo " <<
it->second <<
" to stream " << st_type <<
"_" << st_name);
167
169
170 for (
const uint32_t subdetid :
it->second.subdets) {
171 subdets.insert(static_cast<eformat::SubDetector>( subdetid & 0xFF ));
172 }
173 }
174 }
175
176 eformat::helper::StreamTag streamTag(st_name, st_type, obeysLB, robs, subdets);
178 }
179 }
180
182 return StatusCode::SUCCESS;
183}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
const std::vector< eformat::helper::StreamTag > & getStreamTags() const
Const-getter for stream tags.
StatusCode addStreamTag(const eformat::helper::StreamTag &streamTag)
Append one stream tag to the stored list.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
xAOD::TrigComposite Decision
const Decision * getNodeByName(const DecisionContainer &container, const std::string &nodeName)
Returns the navigation node with a given name from a collection or nullptr if missing.
std::set< DecisionID > DecisionIDContainer
const std::string & summaryPassNodeName()
const std::string & summaryPassExpressNodeName()
xAOD::TrigCompositeContainer DecisionContainer
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
bool isLegId(const HLT::Identifier &legIdentifier)
Recognise whether the chain ID is a leg ID.