![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef TRIGNAVSTRUCTURE_TYPEDHOLDER_H
8 #define TRIGNAVSTRUCTURE_TYPEDHOLDER_H
11 #include <type_traits>
18 #ifdef XAOD_STANDALONE
36 std::string
formatSGkey(
const std::string&
prefix,
const std::string& containername,
const std::string&
label);
42 template<
typename FEATURE,
typename CONTAINER>
class TypedHolder;
54 template<
typename FEATURE,
typename CONTAINER>
68 asg::AsgMessaging(
"TypedHolder"),
81 asg::AsgMessaging(
"TypedHolder"),
101 ATH_MSG_ERROR(
"accessing holder with key: " <<
key() <<
" sync with store failed ");
102 return StatusCode::FAILURE;
105 ATH_MSG_ERROR(
"accessing holder with key: " <<
key() <<
" index past range " <<
"idx range is: " <<
idx.objectsBegin() <<
":" <<
idx.objectsEnd() <<
" container size: " <<
m_cont->size());
106 return StatusCode::FAILURE;
112 return StatusCode::FAILURE;
118 CONTAINER*
src =
const_cast<CONTAINER*
>(
m_cont);
122 std::advance(
beg,
idx.objectsBegin());
123 std::advance(
end,
idx.objectsEnd());
124 nonConstDestination->insert(nonConstDestination->end(),
beg,
end);
127 destination = nonConstDestination;
128 return StatusCode::SUCCESS;
136 if((
idx.objectsEnd() -
idx.objectsBegin())!=1){
138 return StatusCode::FAILURE;
142 return StatusCode::FAILURE;
146 return StatusCode::FAILURE;
150 destination =
m_cont->at(
idx.objectsBegin());
151 return StatusCode::SUCCESS;
160 if(
m_cont)
return StatusCode::SUCCESS;
165 if(
sc.isFailure())
return StatusCode::FAILURE;
166 if(!
m_cont)
return StatusCode::FAILURE;
168 return StatusCode::SUCCESS;
JetConstituentVector::iterator iterator
typename std::enable_if< std::is_same< T, CONTAINER >::value==value, StatusCode >::type StatusCode_if
shorthand for enable_if with returning StatusCode base on comparison with CONTAINER type
Helper class for conversion from/to int stored in TE and pair of ints used in Navigation Object point...
TypedHolder(const TypelessHolder &typeless, const asg::EventStoreType *store, const std::string &container_name=ClassID_traits< CONTAINER >::typeName())
constructor from BaseHolder.
StatusCode_if< T, false > get(const T *&destination, HLT::TriggerElement::ObjectIndex idx)
method retrieves container from storegated and returns pointer at passed ObjectIndex Only enabled for...
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
TypedHolder(const BaseHolder &baseholder, const asg::EventStoreType *store, const std::string &container_name=ClassID_traits< CONTAINER >::typeName())
constructor from BaseHolder.
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
std::string formatSGkey(const std::string &prefix, const std::string &containername, const std::string &label)
declaration of formatting function.
const asg::EventStoreType * m_store
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
StatusCode syncWithStore()
cache container retrieved from StoreGate
The Athena Transient Store API.
File providing the ClassID_traits traits class.
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
::StatusCode StatusCode
StatusCode definition for legacy code.
Default, invalid implementation of ClassID_traits.
std::string key() const
key used to access EventStore
Class mimicking the AthMessaging class from the offline software.
StatusCode_if< T, true > get(const T *&destination, HLT::TriggerElement::ObjectIndex idx)
method creates a new VIEW container containing pointers to the elements pointed to by the ObjectIndex...
doubly templated class interfacing access to feature containers in StoreGate.