13 : base_class(
type, name, parent)
23 return StatusCode::SUCCESS;
30 for (
Decision* outputDecision : decisions ) {
45 ATH_MSG_ERROR(
"Of the " << myViews.size() <<
" Views in the history of Decision object with index " << outputDecision->index()
47 return StatusCode::FAILURE;
54 if (myView.size() != 1) {
55 ATH_MSG_ERROR(
"Did not find exactly one most-recent '" <<
viewString() <<
"' for Decision object index " << outputDecision->index()
56 <<
", found " << myView.size());
57 if (myView.size() > 1) {
58 ATH_MSG_ERROR(
"Was this Decision Object was merged after having followed different reconstruction paths in previous Steps?");
59 ATH_MSG_ERROR(
"Need more information about which of these Views to look in to find the desired '" <<
m_inViewRoIKey.key() <<
"' TrigRoiDescriptorCollection");
61 return StatusCode::FAILURE;
63 viewToFetchFrom = myView.at(0);
70 if (roiReadHandle->size() != 1) {
72 <<
" has " << roiReadHandle->size() <<
" TrigRoiDescriptor inside. We require exactly one.");
73 return StatusCode::FAILURE;
82 auto oldroi = roiReadHandle->at(0);
83 ATH_MSG_DEBUG(
" Old ROI size " <<
" eta="<< oldroi->eta() <<
" +- " << oldroi->etaPlus()-oldroi->eta() \
84 <<
" phi="<< oldroi->phi() <<
" +- " << oldroi->phiPlus()-oldroi->phi() \
85 <<
" zed="<< oldroi->zed() <<
" +- " << oldroi->zedPlus()-oldroi->zed());
87 const double reta = oldroi->eta();
90 const double rphi = oldroi->phi();
93 const double rzed = oldroi->zed();
96 std::unique_ptr<TrigRoiDescriptor> roi = std::make_unique<TrigRoiDescriptor>(reta, retam, retap, rphi, rphim, rphip, rzed, rzedm, rzedp);
97 ATH_MSG_DEBUG(
" New ROI size " <<
" eta="<< roi->eta() <<
" +- " << roi->etaPlus()-roi->eta() \
98 <<
" phi="<< roi->phi() <<
" +- " << roi->phiPlus()-roi->phi() \
99 <<
" zed="<< roi->zed() <<
" +- " << roi->zedPlus()-roi->zed());
100 roisWriteHandle->push_back( roi.release() );
105 outputDecision->setObjectLink(
roiString(), newRoiEL);
108 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Athena::TPCnvVers::Current TrigRoiDescriptor
ElementLink implementation for ROOT usage.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::WriteHandle< CONT > createAndStoreNoAux(const SG::WriteHandleKey< CONT > &key, const EventContext &ctx)
Creates and right away records the Container CONT with the key.
const std::string & viewString()
xAOD::TrigComposite Decision
const std::string & roiString()
void findLinks(const Decision *start, const std::string &linkName, std::vector< LinkInfo< T > > &links, unsigned int behaviour=TrigDefs::allFeaturesOfType, std::set< const xAOD::TrigComposite * > *fullyExploredFrom=nullptr)
search back the TC links for the object of type T linked to the one of TC (recursively) Populates pro...
xAOD::TrigCompositeContainer DecisionContainer
static const unsigned int lastFeatureOfType
Run 3 "enum". Only return the final feature along each route through the navigation.
static const unsigned int allFeaturesOfType
Run 3 "enum". Return all features along legs (still with type and container checks)
auto makeHandle(const SG::View *view, const KEY &key, const EventContext &ctx)
Create a view handle from a handle key.
Helper to keep a Decision object, ElementLink and ActiveState (with respect to some requested ChainGr...
ElementLink< T > link
Link to the feature.