|
ATLAS Offline Software
|
Go to the documentation of this file.
20 #ifndef XAOD_STANDALONE
28 : std::runtime_error (
msg)
52 bool TrigComposite_v1::s_throwOnCopyError =
false;
62 if(
this == &rhs)
return *
this;
92 this->linkColNamesNC().push_back(
newName );
93 this->linkColClidsNC().push_back(
other.linkColClids().at(
index) );
94 if (
other.isRemapped()) {
95 this->linkColKeysNC().push_back(
other.linkColKeysRemap().at(
index) );
96 this->linkColIndicesNC().push_back(
other.linkColIndicesRemap().at(
index) );
98 this->linkColKeysNC().push_back(
other.linkColKeys().at(
index) );
99 this->linkColIndicesNC().push_back(
other.linkColIndices().at(
index) );
107 bool didCopy =
false;
109 std::vector<std::string>::const_iterator locationIt;
111 if (locationIt !=
other.linkColNames().end()) {
114 if (s_throwOnCopyError)
throw std::runtime_error(
"Already have link with name " +
newName);
120 if (!didCopy && s_throwOnCopyError)
throw std::runtime_error(
"Could not find link with name " +
name);
129 bool didCopy =
false;
136 if (
other.hasObjectLink(mangledName)) {
138 if (s_throwOnCopyError)
throw std::runtime_error(
"Already have link collection with name " +
newName);
142 if (
other.linkColNames().at(
index) == mangledName) {
149 if (!didCopy && s_throwOnCopyError)
throw std::runtime_error(
"Could not find link with name " +
name);
158 bool didCopy =
false;
159 for (
const std::string&
name :
other.linkColNames()) {
191 bool removed =
false;
192 const std::vector< std::string >& names =
linkColNames();
193 for(
size_t i = 0;
i < names.size(); ++
i ) {
194 if( names.at(
i) !=
name )
continue;
208 bool removed =
false;
209 const std::vector< std::string >& names =
linkColNames();
211 for(
size_t i = 0;
i < names.size(); ) {
212 if( names.at(
i) == mangledName ) {
237 const std::vector< std::string >& names = accNames( *
this );
238 const std::vector< uint32_t >& clids = accCLIDs( *
this );
240 std::vector<std::string>::const_iterator vecIt =
std::find( names.begin(), names.end(),
name );
241 if (vecIt == names.end()) {
245 if (clid != CLID_NULL) {
249 }
else if (storedCLID != clid) {
275 #ifndef XAOD_STANDALONE
294 return acc_builtin( *
this );
299 return acc_builtin( *
this );
341 if ( endIndex - beginIndex > 1 ) {
345 const std::vector< std::string >& names =
linkColNames();
348 for(
size_t nameIndex = 0; nameIndex < names.size(); ++nameIndex ) {
351 if( names[ nameIndex ] == mangledName ) {
352 oldEnd = nameIndex + 1;
353 if ( oldStart == -1 ) oldStart = nameIndex;
355 else if ( oldStart != -1 ) {
362 if ( oldStart != -1 ) {
392 const std::vector< std::string >& names =
linkColNames();
393 for(
size_t nameIndex = 0; nameIndex < names.size(); ++nameIndex ) {
395 if( names[ nameIndex ] ==
name ) {
427 std::vector<sgkey_t>& keyVec, std::vector<uint32_t>& clidVec, std::vector<uint16_t>& indexVec )
const
453 size_t nDecorations = 0;
454 if (key_remap.
isAvailable( *
this )) ++nDecorations;
455 if (index_remap.
isAvailable( *
this )) ++nDecorations;
456 if (nDecorations == 1) {
457 throw std::runtime_error(
"TrigComposite_v1::isRemapped Only one of the 'remap_linkColKeys' and 'remap_linkColIndices' "
458 "decorations were found on this object. This should never happen, a remapped element link must have both of these collections.");
460 return static_cast<bool>(nDecorations);
469 os <<
"TrigComposite_v1 name:'" << tc.
name() <<
"'" << std::endl;
471 os <<
" N Links:" << tc.
linkColNames().size() <<
", isRemapped:" << (isRemapped ?
"YES" :
"NO");
473 if (!
i)
os << std::endl;
483 os << std::endl <<
" N Decisions:" << tc.
decisions().size() << std::endl <<
" ";
const std::vector< sgkey_t > & linkColKeysRemap() const
Raw access to the persistent link labels. Will attempt to access remapped link data.
ExcNotIParticleContainer(const std::string &msg)
static const std::string s_collectionSuffix
std::string find(const std::string &s)
return a remapped string
Helper class to provide type-safe access to aux data.
bool hasObjectLink(const std::string &name, const CLID clid=CLID_NULL) const
Check if a link to an object with a given name and type exists. CLID_NULL to not check type.
bool typelessGetObjectCollectionLinks(const std::string &name, std::vector< sgkey_t > &keyVec, std::vector< uint32_t > &clidVec, std::vector< uint16_t > &indexVec) const
Fetches a collection of links without type.
static const std::string s_featureString
Constant used to identify a feature.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Helper class to provide constant type-safe access to aux data.
static const std::string s_seedString
Constant used to identify a seed (parent)
bool hasObjectCollectionLinks(const std::string &collectionName, const CLID clid=CLID_NULL) const
Check if links exist to a collection of objects with given name and type. CLID_NULL to not check type...
static const std::string s_initialRoIString
Constant used to identify an initial ROI from L1.
bool const RAWDATA *ch2 const
std::vector< std::string > & linkColNamesNC()
Raw access to the persistent link names (non-const)
const std::vector< uint16_t > & linkColIndicesRemap() const
Raw access to the persistent link indices. Will attempt to access remapped link data.
const std::vector< uint32_t > & linkColClids() const
Raw access to the persistent link CLIDs.
static const std::string s_hypoAlgNodeNameString
Constant used to identify a navigation graph node as being from a Hypo Alg.
bool equal(double a, double b)
Compare two FP numbers, working around x87 precision issues.
static const std::string s_summaryPassNodeNameString
Constant used to identify the single terminus graph node the end point of all chains which accept the...
size_t index() const
Return the index of this element within its container.
bool hasObjectLinkExact(const std::string &name, const sgkey_t key, const uint16_t index, const uint32_t clid) const
bool copyLinkCollectionFrom(const xAOD::TrigComposite_v1 &other, const std::string &name, std::string newName="")
Copy one named link collection from another object.
void typelessSetObjectLink(const std::string &name, const sgkey_t key, const uint32_t clid, const uint16_t beginIndex, const uint16_t endIndex=0)
Add a link without type.
static const std::string s_comboHypoAlgNodeNameString
Constant used to identify a navigation graph node as being from a Combo Hypo Alg.
Provide an interface for finding inheritance information at run time.
static const std::string s_filterNodeNameString
Constant used to identify a navigation graph node as being from a Filter.
bool copyLinkFrom(const xAOD::TrigComposite_v1 &other, const std::string &name, std::string newName="")
Copy one named link from another object.
TrigComposite_v1 & operator=(const TrigComposite_v1 &rhs)
Assignment operator.
bool copyAllLinksFrom(const xAOD::TrigComposite_v1 &other)
Copy all single links and collections of links from another object.
std::vector< sgkey_t > & linkColKeysNC()
Raw access to the persistent link labels (non-const)
Default, invalid implementation of ClassID_traits.
bool typelessGetObjectLink(const std::string &name, sgkey_t &key, uint32_t &clid, uint16_t &index) const
Fetches a single link without type.
std::vector< uint16_t > & linkColIndicesNC()
Raw access to the persistent link indices (non-const)
static const std::string s_summaryFilterNodeNameString
Constant used to identify a navigation graph node as being from a final Filter created by the Decisio...
const std::vector< TrigCompositeUtils::DecisionID > & decisions() const
Get positive HLT chain decisions associated with this TrigComposite. Navigation use.
Class used to describe composite objects in the HLT.
uint32_t CLID
The Class ID type.
static const std::string s_hltSeedingNodeNameString
Constant used to identify a navigation graph node as being from the HLTSeeding.
static const BaseInfoBase * find(CLID clid)
Find the BaseInfoBase instance for clid.
static const std::string s_initialRecRoIString
Constant used to identify an initial HLT ROI derived from L1.
void copyLinkInternal(const xAOD::TrigComposite_v1 &other, const size_t index, const std::string &newName)
Helper function, copy one link into this object.
void makePrivateStore()
Create a new (empty) private store for this object.
AuxElement & operator=(const AuxElement &other)
Assignment.
bool removeObjectCollectionLinks(const std::string &name)
Delete any stored collection of element links with the given name.
const std::vector< std::string > & linkColNames() const
Raw access to the persistent link names.
const std::string & name() const
Get a human-readable name for the object.
bool hasStore() const
Return true if this object has an associated store.
TrigComposite_v1()
Default constructor.
const std::vector< sgkey_t > & linkColKeys() const
Raw access to the persistent link labels.
bool isRemapped() const
Information on if linkColKeys() and linkColIndices() are able to access remapped link data Remapping ...
AUXSTORE_OBJECT_GETTER(TrigComposite_v1, std::vector< std::string >, linkColNames) AUXSTORE_OBJECT_GETTER(TrigComposite_v1
The non-template portion of the BaseInfo implementation.
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
static const std::string s_viewString
Constant used to identify a view.
bool removeObjectLink(const std::string &name)
Delete any stored element link with the given name.
static const std::string s_inputMakerNodeNameString
Constant used to identify a navigation graph node as being from a Input Maker.
static const std::string s_summaryPrescaledNodeNameString
Constant used to identify the single prescaled graph node.
const SG::AuxVectorData * container() const
Return the container holding this element.
static const std::string s_summaryPassExpressNodeNameString
Constant used to identify the single express-accept graph node.
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
const std::vector< uint16_t > & linkColIndices() const
Raw access to the persistent link indices.
constexpr bool sgkeyEqual(const sgkey_t a, const sgkey_t b)
Compare two sgkeys for equality.
bool derivesFromIParticle(const CLID clid) const
Helper function. Check if the requested type can be down cast to an IParticle transient interface.
std::ostream & operator<<(std::ostream &out, const std::pair< FIRST, SECOND > &pair)
Helper print operator.
static const std::string s_roiString
Constant used to identify an (explicitly) updated HLT ROI.
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
std::vector< uint32_t > & linkColClidsNC()
Raw access to the persistent link CLIDs (non-const)
bool is_base(CLID clid) const
Return true if clid is the ID of a class that is known to be a base of T.