|
ATLAS Offline Software
|
Auxiliary store for xAOD::ZdcModuleContainer_v1.
More...
#include <ZdcModuleAuxContainer_v1.h>
|
| ZdcModuleAuxContainer_v1 () |
| Default constructor. More...
|
|
virtual const void * | getData (SG::auxid_t auxid) const=0 |
| Pick up the const version from the base class. More...
|
|
virtual bool | insertMove (size_t pos, IAuxStore &other, const SG::auxid_set_t &ignore=SG::auxid_set_t())=0 |
| Move all elements from other to this store. More...
|
|
template<typename T , typename ALLOC > |
auxid_t | getAuxID (const std::string &name, std::vector< T, ALLOC > &, SG::AuxVarFlags flags=SG::AuxVarFlags::None) |
| Get the auxiliary ID for one of the persistent variables. More...
|
|
template<typename T > |
auxid_t | getAuxID (const std::string &name, SG::PackedContainer< T > &, SG::AuxTypeRegistry::Flags flags=SG::AuxTypeRegistry::Flags::None) |
| Get the auxiliary ID for one of the persistent variables. More...
|
|
template<typename T , typename ALLOC > |
void | regAuxVar (auxid_t auxid, const std::string &name, std::vector< T, ALLOC > &vec) |
| Register one of the persistent variables internally. More...
|
|
template<typename T > |
void | regAuxVar (auxid_t auxid, const std::string &name, SG::PackedContainer< T > &vec) |
| Register one of the persistent variables internally. More...
|
|
|
typedef AthContainers_detail::mutex | mutex_t |
| Mutex for multithread synchronization. More...
|
|
typedef AthContainers_detail::lock_guard< mutex_t > | guard_t |
|
Auxiliary store for xAOD::ZdcModuleContainer_v1.
This is a custom auxiliary container for xAOD::ZdcModuleContainer_v1, to be used in the main reconstruction code.
- Author
- Peter Steinberg peter.nosp@m..ste.nosp@m.inber.nosp@m.g@bn.nosp@m.l.gov
- Revision
- 693858
- Date
- 2015-09-09 12:30:15 +0200 (Wed, 09 Sep 2015)
Definition at line 31 of file ZdcModuleAuxContainer_v1.h.
◆ auxid_set_t
◆ auxid_t
◆ AuxVariable_t
template<class T , class ALLOC = std::allocator<T>>
◆ guard_t
◆ mutex_t
◆ AuxStoreType
Type of the auxiliary store.
In the xAOD EDM we use auxiliary store objects in some cases to describe a single object, and in most cases to describe a container of objects. This enumeration declares which type the object implementing this interface is.
Enumerator |
---|
AST_ObjectStore | The store describes a single object.
|
AST_ContainerStore | The store describes a container.
|
Definition at line 66 of file IAuxStoreHolder.h.
◆ ZdcModuleAuxContainer_v1()
xAOD::ZdcModuleAuxContainer_v1::ZdcModuleAuxContainer_v1 |
( |
| ) |
|
◆ clearDecorations()
bool xAOD::AuxContainerBase::clearDecorations |
( |
| ) |
|
|
overridevirtualinherited |
◆ getAuxID() [1/2]
Get the auxiliary ID for one of the persistent variables.
◆ getAuxID() [2/2]
template<typename T , typename ALLOC >
auxid_t xAOD::AuxContainerBase::getAuxID |
( |
const std::string & |
name, |
|
|
std::vector< T, ALLOC > & |
, |
|
|
SG::AuxVarFlags |
flags = SG::AuxVarFlags::None |
|
) |
| |
|
inherited |
Get the auxiliary ID for one of the persistent variables.
◆ getAuxIDs()
◆ getData() [1/3]
const void * xAOD::AuxContainerBase::getData |
( |
auxid_t |
auxid | ) |
const |
|
overridevirtualinherited |
Get a pointer to a given array.
Implements SG::IConstAuxStore.
Definition at line 227 of file AuxContainerBase.cxx.
232 if( ( auxid >=
m_vecs.size() ) || ( !
m_vecs[ auxid ] ) ) {
238 auxids_nc.
insert( auxid );
242 std::cout <<
"ERROR xAOD::AuxContainerBase::getData "
243 <<
"Unknown variable ("
245 <<
") requested" << std::endl;
254 return m_vecs[ auxid ]->toPtr();
◆ getData() [2/3]
void * xAOD::AuxContainerBase::getData |
( |
auxid_t |
auxid, |
|
|
size_t |
size, |
|
|
size_t |
capacity |
|
) |
| |
|
overridevirtualinherited |
Get a pointer to a given array, creating the array if necessary.
Implements SG::IAuxStore.
Definition at line 395 of file AuxContainerBase.cxx.
401 if( ( auxid >=
m_vecs.size() ) || ( !
m_vecs[ auxid ] ) ) {
410 std::cout <<
"ERROR xAOD::AuxContainerBase::getData "
411 <<
"Unknown variable ("
413 <<
") requested" << std::endl;
417 m_vecs[ auxid ]->reserve( capacity );
420 return m_vecs[ auxid ]->toPtr();
◆ getData() [3/3]
virtual const void* SG::IConstAuxStore::getData |
|
inherited |
Pick up the const version from the base class.
◆ getDecoration()
void * xAOD::AuxContainerBase::getDecoration |
( |
auxid_t |
auxid, |
|
|
size_t |
size, |
|
|
size_t |
capacity |
|
) |
| |
|
overridevirtualinherited |
◆ getDynamicAuxIDs()
◆ getIOData()
const void * xAOD::AuxContainerBase::getIOData |
( |
auxid_t |
auxid | ) |
const |
|
overridevirtualinherited |
Get a pointer to the data being stored for one aux data item.
Implements SG::IAuxStoreIO.
Definition at line 586 of file AuxContainerBase.cxx.
592 if( ( auxid >=
m_vecs.size() ) || ( !
m_vecs[ auxid ] ) ) {
596 std::cout <<
"ERROR xAOD::AuxContainerBase::getIOData "
597 <<
"Unknown variable ("
599 <<
") requested" << std::endl;
608 return m_vecs[ auxid ]->toVector();
◆ getIOType()
const std::type_info * xAOD::AuxContainerBase::getIOType |
( |
auxid_t |
auxid | ) |
const |
|
overridevirtualinherited |
◆ getSelectedAuxIDs()
◆ getStore() [1/2]
◆ getStore() [2/2]
◆ getStoreType()
virtual AuxStoreType xAOD::AuxContainerBase::getStoreType |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ getWritableAuxIDs()
◆ insertMove() [1/2]
Insert contents of another store via move.
Definition at line 510 of file AuxContainerBase.cxx.
523 size_t other_size =
other.size();
534 if (
other.getData (
id)) {
535 void* src_ptr =
other.getData (
id, other_size, other_size);
538 reinterpret_cast<char*
>(src_ptr) + other_size*
r.getEltSize(
id),
544 const void* orig = v_dst->
toPtr();
546 if (orig != v_dst->
toPtr())
◆ insertMove() [2/2]
Move all elements from other
to this store.
- Parameters
-
pos | The starting index of the insertion. |
other | Store from which to do the move. |
ignore | Set of variables that should not be added to the store. |
Let len
be the size of other
. The store will be increased in size by len
elements, with the elements at pos
being copied to pos+len
. Then, for each auxiliary variable, the entire contents of that variable for other
will be moved to this store at index pos
. This will be done via move semantics if possible; otherwise, it will be done with a copy. Variables present in this store but not in other
will have the corresponding elements default-initialized. Variables in other
but not in this store will be added unless they are in ignore
.
Returns true if it is known that none of the vectors' memory moved, false otherwise.
Implemented in SG::AuxStoreInternal.
◆ isDecoration()
bool xAOD::AuxContainerBase::isDecoration |
( |
auxid_t |
auxid | ) |
const |
|
overridevirtualinherited |
◆ lock()
void xAOD::AuxContainerBase::lock |
( |
| ) |
|
|
overridevirtualinherited |
◆ lockDecoration()
void xAOD::AuxContainerBase::lockDecoration |
( |
SG::auxid_t |
auxid | ) |
|
|
overridevirtualinherited |
◆ memResource()
std::pmr::memory_resource * xAOD::AuxContainerBase::memResource |
( |
| ) |
|
|
inherited |
Return the memory resource to use.
Definition at line 156 of file AuxContainerBase.cxx.
158 const std::pmr::memory_resource* cptr = m_memResource.get();
159 std::pmr::memory_resource* ptr
ATLAS_THREAD_SAFE =
const_cast<std::pmr::memory_resource*
>( cptr );
161 #ifndef XAOD_STANDALONE
162 const EventContext& ctx = Gaudi::Hive::currentContext();
169 ptr = std::pmr::get_default_resource();
172 m_memResource.set( ptr );
◆ name()
const char * xAOD::AuxContainerBase::name |
( |
| ) |
const |
|
inherited |
◆ regAuxVar() [1/2]
Register one of the persistent variables internally.
◆ regAuxVar() [2/2]
template<typename T , typename ALLOC >
void xAOD::AuxContainerBase::regAuxVar |
( |
auxid_t |
auxid, |
|
|
const std::string & |
name, |
|
|
std::vector< T, ALLOC > & |
vec |
|
) |
| |
|
inherited |
Register one of the persistent variables internally.
◆ regAuxVar1()
template<typename ELT , typename CONT >
void xAOD::AuxContainerBase::regAuxVar1 |
( |
auxid_t |
auxid, |
|
|
const std::string & |
name, |
|
|
CONT & |
vec |
|
) |
| |
|
privateinherited |
Common code between regAuxVar cases.
◆ reserve()
void xAOD::AuxContainerBase::reserve |
( |
size_t |
size | ) |
|
|
overridevirtualinherited |
◆ resize()
bool xAOD::AuxContainerBase::resize |
( |
size_t |
size | ) |
|
|
overridevirtualinherited |
◆ setName()
void xAOD::AuxContainerBase::setName |
( |
const char * |
name | ) |
|
|
inherited |
◆ setOption()
◆ setStore()
Set a different internal store object.
This function is used by the I/O infrastructure to possibly put a store object into this one, which can interact with dynamic variables directly.
Note that the object takes ownership of the received store.
- Parameters
-
store | The store that should be used for dynamic variable handling inside the object from now on |
Implements SG::IAuxStoreHolder.
Definition at line 192 of file AuxContainerBase.cxx.
◆ shift()
void xAOD::AuxContainerBase::shift |
( |
size_t |
pos, |
|
|
ptrdiff_t |
offs |
|
) |
| |
|
overridevirtualinherited |
◆ size()
size_t xAOD::AuxContainerBase::size |
( |
| ) |
const |
|
overridevirtualinherited |
◆ amplitude
std::vector<float> xAOD::ZdcModuleAuxContainer_v1::amplitude |
|
private |
◆ amplitudeG0
std::vector<float> xAOD::ZdcModuleAuxContainer_v1::amplitudeG0 |
|
private |
◆ amplitudeG1
std::vector<float> xAOD::ZdcModuleAuxContainer_v1::amplitudeG1 |
|
private |
◆ ATLAS_THREAD_SAFE
◆ channel
std::vector<int> xAOD::ZdcModuleAuxContainer_v1::channel |
|
private |
◆ energy
std::vector<float> xAOD::ZdcModuleAuxContainer_v1::energy |
|
private |
◆ energyG0
std::vector<float> xAOD::ZdcModuleAuxContainer_v1::energyG0 |
|
private |
◆ energyG1
std::vector<float> xAOD::ZdcModuleAuxContainer_v1::energyG1 |
|
private |
◆ id
std::vector<int> xAOD::ZdcModuleAuxContainer_v1::id |
|
private |
◆ m_auxids
◆ m_locked
bool xAOD::AuxContainerBase::m_locked |
|
privateinherited |
◆ m_mutex
mutex_t xAOD::AuxContainerBase::m_mutex |
|
mutableprivateinherited |
◆ m_name
std::string xAOD::AuxContainerBase::m_name |
|
privateinherited |
◆ m_ownsStore
bool xAOD::AuxContainerBase::m_ownsStore |
|
privateinherited |
Flag deciding if the object owns the dynamic store or not.
Definition at line 225 of file AuxContainerBase.h.
◆ m_store
◆ m_storeIO
◆ m_vecs
◆ qual
std::vector<float> xAOD::ZdcModuleAuxContainer_v1::qual |
|
private |
◆ qualG0
std::vector<float> xAOD::ZdcModuleAuxContainer_v1::qualG0 |
|
private |
◆ qualG1
std::vector<float> xAOD::ZdcModuleAuxContainer_v1::qualG1 |
|
private |
◆ side
std::vector<int> xAOD::ZdcModuleAuxContainer_v1::side |
|
private |
◆ supportsThinning
constexpr bool SG::IAuxStore::supportsThinning = true |
|
staticconstexprinherited |
Mark that this type supports thinning operations.
See AthContainers/supportsThinning.h and AthenaPoolCnvSvc/T_AthenaPoolCnv.h. Helps guide which pool converter template will be used. If false, the default pool converter will be used rather than the aux store-specific one. Ordinary xAOD type should not touch this, but may be overridden in a derived class to handle certain special cases.
Definition at line 189 of file IAuxStore.h.
◆ time
std::vector<float> xAOD::ZdcModuleAuxContainer_v1::time |
|
private |
◆ timeG0
std::vector<float> xAOD::ZdcModuleAuxContainer_v1::timeG0 |
|
private |
◆ timeG1
std::vector<float> xAOD::ZdcModuleAuxContainer_v1::timeG1 |
|
private |
◆ TTg0d0Link
◆ TTg0d1Link
◆ TTg1d0Link
◆ TTg1d1Link
◆ type
std::vector<int> xAOD::ZdcModuleAuxContainer_v1::type |
|
private |
◆ waveformADC
std::vector< std::vector<float> > xAOD::ZdcModuleAuxContainer_v1::waveformADC |
|
private |
◆ waveformADCG0
std::vector< std::vector<float> > xAOD::ZdcModuleAuxContainer_v1::waveformADCG0 |
|
private |
◆ waveformADCG1
std::vector< std::vector<float> > xAOD::ZdcModuleAuxContainer_v1::waveformADCG1 |
|
private |
◆ waveformTime
std::vector< std::vector<float> > xAOD::ZdcModuleAuxContainer_v1::waveformTime |
|
private |
◆ waveformTimeG0
std::vector< std::vector<float> > xAOD::ZdcModuleAuxContainer_v1::waveformTimeG0 |
|
private |
◆ waveformTimeG1
std::vector< std::vector<float> > xAOD::ZdcModuleAuxContainer_v1::waveformTimeG1 |
|
private |
◆ zdcModule
std::vector<int> xAOD::ZdcModuleAuxContainer_v1::zdcModule |
|
private |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
std::string m_name
Name of the container in memory. Set externally.
virtual bool shift(size_t pos, ptrdiff_t offs)=0
Shift the elements of the vector.
std::vector< std::vector< float > > waveformTime
const char * name() const
Get the name of the container instance.
virtual bool insertMove(size_t pos, IAuxStore &other, const SG::auxid_set_t &ignore=SG::auxid_set_t())=0
Move all elements from other to this store.
virtual void lockDecoration(SG::auxid_t auxid)=0
Lock a decoration.
ReadStats & stats()
Access the object belonging to the current thread.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
SG::IAuxStore * m_store
Internal dynamic auxiliary store object.
std::vector< ElementLink< TriggerTowerContainer > > TTg0d0Link
std::string getName(SG::auxid_t auxid) const
Return the name of an aux data item.
AthContainers_detail::lock_guard< mutex_t > guard_t
Exception — Attempted to modify auxiliary data in a locked store.
bool hasExtendedEventContext(const EventContext &ctx)
Test whether a context object has an extended context installed.
std::vector< float > timeG0
std::vector< float > amplitudeG0
std::vector< std::vector< float > > waveformTimeG0
std::vector< std::vector< float > > waveformTimeG1
virtual const std::type_info * getIOType(SG::auxid_t auxid) const =0
Return the type of the data to be stored for one aux data item.
virtual size_t size() const =0
Return the number of elements in the store.
virtual void shift(size_t pos, ptrdiff_t offs)=0
Shift the elements of the container.
std::vector< float > amplitudeG1
Interface providing I/O for a generic auxiliary store.
std::vector< std::vector< float > > waveformADC
std::vector< float > qualG0
Handle mappings between names and auxid_t.
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
std::vector< int > channel
virtual size_t size() const override
Get the size of the container.
std::vector< float > timeG1
virtual bool setOption(auxid_t, const AuxDataOption &)
Set an option for a given auxiliary variable.
size_t auxid_t
Identifier for a particular aux data item.
std::vector< ElementLink< TriggerTowerContainer > > TTg1d1Link
virtual bool clearDecorations()=0
Clear all decorations.
SG::auxid_set_t auxid_set_t
The aux ID set type definition.
auxid_set_t m_auxids
Internal list of all available variables.
std::vector< SG::IAuxTypeVector * > m_vecs
Internal list of all managed variables.
ConcurrentBitset & insert(bit_t bit, bit_t new_nbits=0)
Set a bit to 1.
#define AUX_VARIABLE(VAR,...)
Convenience macro for declaring an auxiliary variable.
std::vector< int > zdcModule
std::vector< ElementLink< TriggerTowerContainer > > TTg0d1Link
std::vector< float > qual
virtual void * getDecoration(auxid_t auxid, size_t size, size_t capacity)=0
Return the data vector for one aux data decoration item.
const std::type_info * getVecType(SG::auxid_t auxid) const
Return the type of the STL vector used to hold an aux data item.
static IOStats & instance()
Singleton object accessor.
std::vector< float > energy
std::vector< std::vector< float > > waveformADCG1
std::vector< float > qualG1
virtual const auxid_set_t & getWritableAuxIDs() const override
Return a set of writable data identifiers.
virtual const void * getIOData(SG::auxid_t auxid) const =0
Return a pointer to the data to be stored for one aux data item.
virtual const void * getData(auxid_t auxid) const override
Get a pointer to a given array.
void readBranch(const std::string &prefix, SG::auxid_t auxid)
Function incrementing the read counter on a specific branch.
SG::auxid_t auxid_t
The aux ID type definition.
std::vector< ElementLink< TriggerTowerContainer > > TTg1d0Link
CxxUtils::CachedPointer< std::pmr::memory_resource > m_memResource ATLAS_THREAD_SAFE
Memory resource to use for this container.
std::vector< float > energyG0
virtual bool insertMove(size_t pos, void *beg, void *end, IAuxStore &srcStore)=0
Insert elements into the vector via move semantics.
virtual void * getData(auxid_t auxid, size_t size, size_t capacity)=0
Return the data vector for one aux data item.
bool m_locked
Has the container been locked?
Abstract interface for manipulating vectors of arbitrary types.
bool m_ownsStore
Flag deciding if the object owns the dynamic store or not.
virtual void lock()=0
Lock the container.
SG::IAuxStoreIO * m_storeIO
The IO interface to the internal auxiliary store.
AuxContainerBase(bool allowDynamicVars=true)
Default constructor.
std::vector< float > time
virtual bool resize(size_t sz)=0
Change the size of all aux data vectors.
A set of aux data identifiers.
virtual bool isDecoration(auxid_t auxid) const =0
Test if a particular variable is tagged as a decoration.
std::vector< std::vector< float > > waveformADCG0
@ AST_ObjectStore
The store describes a single object.
std::vector< float > energyG1
std::vector< float > amplitude
virtual const SG::auxid_set_t & getAuxIDs() const =0
Return a set of identifiers for existing data items in this store.
virtual void * toPtr()=0
Return a pointer to the start of the vector's data.
virtual void reserve(size_t sz)=0
Change the capacity of all aux data vectors.
@ AST_ContainerStore
The store describes a container.