|
ATLAS Offline Software
|
Go to the documentation of this file.
20 #ifndef XAOD_STANDALONE
48 : std::runtime_error (
msg)
72 bool TrigComposite_v1::s_throwOnCopyError =
false;
82 if(
this == &rhs)
return *
this;
112 this->linkColNamesNC().push_back(
newName );
113 this->linkColClidsNC().push_back(
other.linkColClids().at(
index) );
114 if (
other.isRemapped()) {
115 this->linkColKeysNC().push_back(
other.linkColKeysRemap().at(
index) );
116 this->linkColIndicesNC().push_back(
other.linkColIndicesRemap().at(
index) );
118 this->linkColKeysNC().push_back(
other.linkColKeys().at(
index) );
119 this->linkColIndicesNC().push_back(
other.linkColIndices().at(
index) );
127 bool didCopy =
false;
129 std::vector<std::string>::const_iterator locationIt;
131 if (locationIt !=
other.linkColNames().end()) {
134 if (s_throwOnCopyError)
throw std::runtime_error(
"Already have link with name " +
newName);
140 if (!didCopy && s_throwOnCopyError)
throw std::runtime_error(
"Could not find link with name " +
name);
149 bool didCopy =
false;
156 if (
other.hasObjectLink(mangledName)) {
158 if (s_throwOnCopyError)
throw std::runtime_error(
"Already have link collection with name " +
newName);
162 if (
other.linkColNames().at(
index) == mangledName) {
169 if (!didCopy && s_throwOnCopyError)
throw std::runtime_error(
"Could not find link with name " +
name);
178 bool didCopy =
false;
179 for (
const std::string&
name :
other.linkColNames()) {
211 bool removed =
false;
212 const std::vector< std::string >& names =
linkColNames();
213 for(
size_t i = 0;
i < names.size(); ++
i ) {
214 if( names.at(
i) !=
name )
continue;
228 bool removed =
false;
229 const std::vector< std::string >& names =
linkColNames();
231 for(
size_t i = 0;
i < names.size(); ) {
232 if( names.at(
i) == mangledName ) {
250 if( ! (acc_linkColNames.isAvailable( *
this ) || acc_linkColClids.isAvailable( *
this) ) ) {
255 const std::vector< std::string >& names = acc_linkColNames( *
this );
256 const std::vector< uint32_t >& clids = acc_linkColClids( *
this );
258 std::vector<std::string>::const_iterator vecIt =
std::find( names.begin(), names.end(),
name );
259 if (vecIt == names.end()) {
263 if (clid != CLID_NULL) {
267 }
else if (storedCLID != clid) {
293 #ifndef XAOD_STANDALONE
311 return acc_linkColKeys( *
this );
315 return acc_linkColIndices( *
this );
319 return acc_remap_linkColKeys( *
this );
323 return acc_remap_linkColIndices( *
this );
329 return acc_linkColNames( *
this );
333 return acc_linkColKeys( *
this );
337 return acc_linkColIndices( *
this );
341 return acc_linkColClids( *
this );
347 if ( int32_t(endIndex) - int32_t(beginIndex) > 1 ) {
351 const std::vector< std::string >& names =
linkColNames();
354 for(
size_t nameIndex = 0; nameIndex < names.size(); ++nameIndex ) {
357 if( names[ nameIndex ] == mangledName ) {
358 oldEnd = nameIndex + 1;
359 if ( oldStart == -1 ) oldStart = nameIndex;
361 else if ( oldStart != -1 ) {
368 if ( oldStart != -1 ) {
396 const std::vector< std::string >& names =
linkColNames();
397 for(
size_t nameIndex = 0; nameIndex < names.size(); ++nameIndex ) {
398 if( names[ nameIndex ] ==
name ) {
431 std::vector<sgkey_t>& keyVec, std::vector<uint32_t>& clidVec, std::vector<TrigComposite_v1::index_type>& indexVec )
const
455 size_t nDecorations = 0;
456 if (acc_remap_linkColKeys.isAvailable( *
this )) ++nDecorations;
457 if (acc_remap_linkColIndices.isAvailable( *
this )) ++nDecorations;
458 if (nDecorations == 1) {
459 throw std::runtime_error(
"TrigComposite_v1::isRemapped Only one of the 'remap_linkColKeys' and 'remap_linkColIndices' "
460 "decorations were found on this object. This should never happen, a remapped element link must have both of these collections.");
462 return static_cast<bool>(nDecorations);
471 os <<
"TrigComposite_v1 name:'" << tc.
name() <<
"'" << std::endl;
473 os <<
" N Links:" << tc.
linkColNames().size() <<
", isRemapped:" << (isRemapped ?
"YES" :
"NO");
475 if (!
i)
os << std::endl;
485 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 typelessGetObjectLink(const std::string &name, sgkey_t &key, uint32_t &clid, index_type &index) const
Fetches a single link without type.
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.
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.
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< 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.
void typelessSetObjectLink(const std::string &name, const sgkey_t key, const uint32_t clid, const index_type beginIndex, const index_type endIndex=0)
Add a link without type.
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 copyLinkCollectionFrom(const xAOD::TrigComposite_v1 &other, const std::string &name, std::string newName="")
Copy one named link collection from another object.
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.
bool hasObjectLinkExact(const std::string &name, const sgkey_t key, const index_type index, const uint32_t clid) const
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)
const std::vector< index_type > & linkColIndicesRemap() const
Raw access to the persistent link indices. Will attempt to access remapped link data.
Default, invalid implementation of ClassID_traits.
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.
std::vector< index_type > & linkColIndicesNC()
Raw access to the persistent link indices (non-const)
Class used to describe composite objects in the HLT.
uint32_t CLID
The Class ID type.
const std::vector< index_type > & linkColIndices() const
Raw access to the persistent link indices.
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.
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
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.
bool typelessGetObjectCollectionLinks(const std::string &name, std::vector< sgkey_t > &keyVec, std::vector< uint32_t > &clidVec, std::vector< index_type > &indexVec) const
Fetches a collection of links without type.
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.