The Gaudi Framework
master (37c0b60a)
|
#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/SharedObjectsContainer.h>
Public Types | |
typedef std::vector< const TYPE * > | ConstVector |
the actual container type More... | |
typedef ConstVector::value_type | value_type |
various types (to make STL happy) More... | |
typedef ConstVector::size_type | size_type |
typedef ConstVector::reference | reference |
typedef ConstVector::const_reference | const_reference |
typedef ConstVector::iterator | iterator |
typedef ConstVector::const_iterator | const_iterator |
typedef ConstVector::reverse_iterator | reverse_iterator |
typedef ConstVector::const_reverse_iterator | const_reverse_iterator |
Public Types inherited from ObjectContainerBase | |
typedef size_t | size_type |
size_type, to conform the STL container interface More... | |
Public Member Functions | |
SharedObjectsContainer ()=default | |
SharedObjectsContainer (SharedObjectsContainer &&)=default | |
SharedObjectsContainer & | operator= (SharedObjectsContainer &&)=default |
SharedObjectsContainer (const ConstVector &data) | |
SharedObjectsContainer (ConstVector &&data) | |
template<class DATA > | |
SharedObjectsContainer (DATA first, DATA last) | |
the templated constructor from the pair of iterators More... | |
template<class DATA , class PREDICATE > | |
SharedObjectsContainer (DATA first, DATA last, const PREDICATE &cut) | |
the templated constructor from the pair of iterators and the predicate. More... | |
const CLID & | clID () const override |
Retrieve the unique class ID (virtual) More... | |
const ConstVector & | data () const |
get the access to the underlying container (const) More... | |
operator const ConstVector & () const | |
cast to the underlying container More... | |
size_type | size () const |
get the actual size of the container More... | |
bool | empty () const |
empty container? More... | |
void | push_back (const TYPE *object) |
insert one object into the container More... | |
void | insert (const TYPE *object) |
insert one object into the container More... | |
template<class DATA > | |
void | insert (DATA first, DATA last) |
add the sequence of objects into the container More... | |
template<class DATA , class PREDICATE > | |
void | insert (DATA first, DATA last, const PREDICATE &cut) |
add the sequence of 'good'objects into the container More... | |
template<class OUTPUT , class PREDICATE > | |
OUTPUT | get (const PREDICATE &cut, OUTPUT output) const |
get from the container all objects which satisfy the certain criteria More... | |
void | erase (iterator i) |
erase the object by iterator More... | |
template<class PREDICATE > | |
void | erase (const PREDICATE &cut) |
erase the objects which satisfy the criteria More... | |
bool | erase (const TYPE *object) |
erase the first occurance of the certain element More... | |
reference | operator[] (size_type index) |
index access More... | |
const_reference | operator[] (size_type index) const |
index access (const-version) More... | |
reference | operator() (size_type index) |
'functional'-access More... | |
const_reference | operator() (size_type index) const |
'functional'-access (const version) More... | |
reference | at (size_type index) |
checked access More... | |
const_reference | at (size_type index) const |
checked access (const-version) More... | |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
reverse_iterator | rbegin () |
reverse_iterator | rend () |
const_reverse_iterator | rbegin () const |
const_reverse_iterator | rend () const |
reference | front () |
the first element (only for non-empty vectors) More... | |
const_reference | front () const |
the first element (only for non-empty vectors) (const-version) More... | |
reference | back () |
the last element (only for non-empty vectors) More... | |
const_reference | back () const |
the last element (only for non-empty vectors) (const-version) More... | |
bool | operator== (const SharedObjectsContainer &right) const |
equal content with other container ? More... | |
bool | operator== (const ConstVector &right) const |
equal content with corresponding vector ? More... | |
bool | operator< (const SharedObjectsContainer &right) const |
comparisons with other container More... | |
bool | operator< (const ConstVector &right) const |
comparisons with corresponding vector More... | |
long | index (const ContainedObject *object) const override |
Distance of a given object from the beginning of its container. More... | |
const ContainedObject * | containedObject (long index) const override |
Pointer to an object of a given distance. More... | |
ContainedObject * | containedObject (long index) override |
size_type | numberOfObjects () const override |
Number of objects in the container. More... | |
long | add (ContainedObject *object) override |
Virtual functions (forwards to the concrete container definitions) Add an object to the container. More... | |
long | remove (ContainedObject *value) override |
Release object from the container (the pointer will be removed from the container, but the object itself will remain alive). More... | |
Public Member Functions inherited from DataObject | |
DataObject () | |
Standard Constructor. More... | |
DataObject (const DataObject &rhs) | |
Copy Constructor. More... | |
DataObject & | operator= (const DataObject &rhs) |
Assignment Operator. More... | |
DataObject (DataObject &&rhs) | |
Move Constructor. More... | |
DataObject & | operator= (DataObject &&rhs) |
Move Assignment Operator. More... | |
virtual | ~DataObject () |
Standard Destructor. More... | |
virtual unsigned long | addRef () |
Add reference to object. More... | |
virtual unsigned long | release () |
release reference to object More... | |
const std::string & | name () const |
Retreive DataObject name. It is the name when registered in the store. More... | |
virtual StatusCode | update () |
Provide empty placeholder for internal object reconfiguration callback. More... | |
void | setRegistry (IRegistry *pRegistry) |
Set pointer to Registry. More... | |
IRegistry * | registry () const |
Get pointer to Registry. More... | |
LinkManager * | linkMgr () |
Retrieve Link manager. More... | |
const LinkManager * | linkMgr () const |
unsigned char | version () const |
Retrieve version number of this object representation. More... | |
void | setVersion (unsigned char vsn) |
Set version number of this object representation. More... | |
unsigned long | refCount () const |
Return the refcount. More... | |
virtual std::ostream & | fillStream (std::ostream &s) const |
Fill the output stream (ASCII) More... | |
Static Public Member Functions | |
static const CLID & | classID () |
Retrieve the unuqie class ID (static) More... | |
Static Public Member Functions inherited from DataObject | |
static const CLID & | classID () |
Retrieve reference to class definition structure (static access) More... | |
Private Attributes | |
ConstVector | m_data |
Additional Inherited Members | |
Protected Member Functions inherited from ObjectContainerBase | |
ObjectContainerBase ()=default | |
Constructor. More... | |
ObjectContainerBase (ObjectContainerBase &&)=default | |
ObjectContainerBase & | operator= (ObjectContainerBase &&)=default |
~ObjectContainerBase () override=default | |
Very simple class to represent the container of objects which are not owned by this container. This concept seem to be very useful for LHCb HLT, DaVinci, tracking, alignments.
Definition at line 39 of file SharedObjectsContainer.h.
typedef ConstVector::const_iterator SharedObjectsContainer< TYPE >::const_iterator |
Definition at line 50 of file SharedObjectsContainer.h.
typedef ConstVector::const_reference SharedObjectsContainer< TYPE >::const_reference |
Definition at line 48 of file SharedObjectsContainer.h.
typedef ConstVector::const_reverse_iterator SharedObjectsContainer< TYPE >::const_reverse_iterator |
Definition at line 52 of file SharedObjectsContainer.h.
typedef std::vector<const TYPE*> SharedObjectsContainer< TYPE >::ConstVector |
the actual container type
Definition at line 43 of file SharedObjectsContainer.h.
typedef ConstVector::iterator SharedObjectsContainer< TYPE >::iterator |
Definition at line 49 of file SharedObjectsContainer.h.
typedef ConstVector::reference SharedObjectsContainer< TYPE >::reference |
Definition at line 47 of file SharedObjectsContainer.h.
typedef ConstVector::reverse_iterator SharedObjectsContainer< TYPE >::reverse_iterator |
Definition at line 51 of file SharedObjectsContainer.h.
typedef ConstVector::size_type SharedObjectsContainer< TYPE >::size_type |
Definition at line 46 of file SharedObjectsContainer.h.
typedef ConstVector::value_type SharedObjectsContainer< TYPE >::value_type |
various types (to make STL happy)
Definition at line 45 of file SharedObjectsContainer.h.
|
default |
|
default |
|
inline |
Definition at line 62 of file SharedObjectsContainer.h.
|
inline |
Definition at line 63 of file SharedObjectsContainer.h.
|
inline |
the templated constructor from the pair of iterators
first | 'begin'-iterator of the input sequence |
last | 'last'-iterator of the input sequence |
Definition at line 70 of file SharedObjectsContainer.h.
|
inline |
the templated constructor from the pair of iterators and the predicate.
Only the elements which satisfy the criteria goes into the container e.g. create the container only with "basic" particles:
first | 'begin'-iterator if the input sequence |
last | 'last'-iterator of the input sequence |
cut | pre predicate |
Definition at line 95 of file SharedObjectsContainer.h.
|
inlineoverridevirtual |
Virtual functions (forwards to the concrete container definitions) Add an object to the container.
On success the object's index is returned.
Implements ObjectContainerBase.
Definition at line 327 of file SharedObjectsContainer.h.
|
inline |
checked access
Definition at line 262 of file SharedObjectsContainer.h.
|
inline |
checked access (const-version)
Definition at line 264 of file SharedObjectsContainer.h.
|
inline |
the last element (only for non-empty vectors)
Definition at line 284 of file SharedObjectsContainer.h.
|
inline |
the last element (only for non-empty vectors) (const-version)
Definition at line 286 of file SharedObjectsContainer.h.
|
inline |
Definition at line 268 of file SharedObjectsContainer.h.
|
inline |
Definition at line 270 of file SharedObjectsContainer.h.
|
inlinestatic |
|
inlineoverridevirtual |
Retrieve the unique class ID (virtual)
Reimplemented from DataObject.
Definition at line 102 of file SharedObjectsContainer.h.
|
inlineoverridevirtual |
Pointer to an object of a given distance.
index | th eindex to be checked |
Implements ObjectContainerBase.
Definition at line 313 of file SharedObjectsContainer.h.
|
inlineoverridevirtual |
Implements ObjectContainerBase.
Definition at line 317 of file SharedObjectsContainer.h.
|
inline |
get the access to the underlying container (const)
Definition at line 118 of file SharedObjectsContainer.h.
|
inline |
empty container?
Definition at line 127 of file SharedObjectsContainer.h.
|
inline |
Definition at line 269 of file SharedObjectsContainer.h.
|
inline |
Definition at line 271 of file SharedObjectsContainer.h.
|
inline |
erase the objects which satisfy the criteria
E.g. remove all particles with small transverse momentum
cut | predicate |
Definition at line 223 of file SharedObjectsContainer.h.
|
inline |
erase the first occurance of the certain element
To remove all occurances one can use:
object | the element to be removed |
Definition at line 244 of file SharedObjectsContainer.h.
|
inline |
erase the object by iterator
Definition at line 204 of file SharedObjectsContainer.h.
|
inline |
the first element (only for non-empty vectors)
Definition at line 280 of file SharedObjectsContainer.h.
|
inline |
the first element (only for non-empty vectors) (const-version)
Definition at line 282 of file SharedObjectsContainer.h.
|
inline |
get from the container all objects which satisfy the certain criteria
E.g. get all particles with transverse momentum in excess of 1 * GeV
cut | the predicate |
outptut | the output iterator |
Definition at line 200 of file SharedObjectsContainer.h.
|
inlineoverridevirtual |
Distance of a given object from the beginning of its container.
object | the object to be checked |
Implements ObjectContainerBase.
Definition at line 305 of file SharedObjectsContainer.h.
|
inline |
insert one object into the container
object | object to be added |
Definition at line 135 of file SharedObjectsContainer.h.
|
inline |
add the sequence of objects into the container
first | 'begin'-iterator for the sequnce |
last | 'end'-iterator for the sequence |
Definition at line 141 of file SharedObjectsContainer.h.
|
inline |
add the sequence of 'good'objects into the container
Only the objects which satisfy the predicate go to the container, e.g. put into container only particles which transverse momentum in excess of 1 * GeV:
first | 'begin'-iterator for the sequnce |
last | 'end'-iterator for the sequence |
cut | the predicate to be applied |
Definition at line 171 of file SharedObjectsContainer.h.
|
inlineoverridevirtual |
Number of objects in the container.
Implements ObjectContainerBase.
Definition at line 322 of file SharedObjectsContainer.h.
|
inline |
|
inline |
'functional'-access
Definition at line 258 of file SharedObjectsContainer.h.
|
inline |
'functional'-access (const version)
Definition at line 260 of file SharedObjectsContainer.h.
|
inline |
comparisons with corresponding vector
Definition at line 297 of file SharedObjectsContainer.h.
|
inline |
comparisons with other container
Definition at line 295 of file SharedObjectsContainer.h.
|
default |
|
inline |
equal content with corresponding vector ?
Definition at line 293 of file SharedObjectsContainer.h.
|
inline |
equal content with other container ?
Definition at line 291 of file SharedObjectsContainer.h.
|
inline |
|
inline |
index access (const-version)
Definition at line 256 of file SharedObjectsContainer.h.
|
inline |
insert one object into the container
object | object to be added |
Definition at line 131 of file SharedObjectsContainer.h.
|
inline |
Definition at line 272 of file SharedObjectsContainer.h.
|
inline |
Definition at line 274 of file SharedObjectsContainer.h.
|
inlineoverridevirtual |
Release object from the container (the pointer will be removed from the container, but the object itself will remain alive).
If the object was found it's index is returned.
Implements ObjectContainerBase.
Definition at line 339 of file SharedObjectsContainer.h.
|
inline |
Definition at line 273 of file SharedObjectsContainer.h.
|
inline |
Definition at line 275 of file SharedObjectsContainer.h.
|
inline |
get the actual size of the container
Definition at line 125 of file SharedObjectsContainer.h.
|
private |
Definition at line 350 of file SharedObjectsContainer.h.