![]() |
ATLAS Offline Software
|
Description for a single variable. More...
Public Member Functions | |
| Var (const std::string &name, const std::type_info &ti, void *&ptr, const std::string &dim, char *defval, size_t defsize) | |
| Constructor. More... | |
| StatusCode | init (IAddVariable *tree, const std::string &prefix) |
| Initialize the variable. More... | |
| void | resize (size_t sz, size_t pos) |
| Resize the vector. More... | |
| void | next () |
| Move the variable pointer to the next element. More... | |
| void | free () |
| Free allocated storage. More... | |
Private Attributes | |
| std::string | m_name |
| The variable name. More... | |
| const std::type_info * | m_ti |
| The type of the variable element (for each object). More... | |
| char ** | m_addr |
| Pointer to the variable pointer. More... | |
| std::string | m_docstring |
| Documentation string. More... | |
| TVirtualCollectionProxy * | m_proxy |
| The root collection proxy. More... | |
| size_t | m_valdiff |
| Offset between collection elements. More... | |
| void * | m_contptr |
| Pointer to the vector instance. More... | |
| char * | m_default |
| Pointer to the default value for this variable, if one has been requested. More... | |
| size_t | m_defsize |
| Size of the object pointed to by m_default. More... | |
Description for a single variable.
We need to be able to resize the vector and quickly adjust the pointer to the next entry. So we save the root collection proxy and the element-to-element to offset. So to move to a new element, all we need to do is to add the offset to the variable pointer.
The vector must have a root dictionary (but not necessarily a reflex dictionary).
Definition at line 227 of file VectorFillerToolBase.h.
| D3PD::VectorFillerToolBase::Var::Var | ( | const std::string & | name, |
| const std::type_info & | ti, | ||
| void *& | ptr, | ||
| const std::string & | docstring, | ||
| char * | defval, | ||
| size_t | defsize | ||
| ) |
Constructor.
| name | The variable name (without prefix). |
| ti | The element type of the variable. |
| ptr | The variable pointer provided by the block filler tool. |
| dim | Reserved. |
| defval | Pointer to the default value to use for this variable. Null for no default. Of the type given by ti. Only works for basic types. We take ownership of this. |
| defsize | Size of the object pointed at by defval. |
| name | The variable name (without prefix). |
| ti | The element type of the variable. |
| ptr | The variable pointer provided by the block filler tool. |
| docstring | Documentation string. |
| defval | Pointer to the default value to use for this variable. Null for no default. Of the type given by ti. Only works for basic types. We take ownership of this. |
| defsize | Size of the object pointed at by defval. |
Definition at line 408 of file VectorFillerToolBase.cxx.
| void D3PD::VectorFillerToolBase::Var::free | ( | ) |
Free allocated storage.
Don't do this from the destructor since these guys get used in a vector.
Definition at line 541 of file VectorFillerToolBase.cxx.
| StatusCode D3PD::VectorFillerToolBase::Var::init | ( | IAddVariable * | tree, |
| const std::string & | prefix | ||
| ) |
Initialize the variable.
| tree | The parent tree. |
| prefix | The variable name prefix. |
Definition at line 432 of file VectorFillerToolBase.cxx.
|
inline |
Move the variable pointer to the next element.
Definition at line 32 of file VectorFillerToolBase.cxx.
| void D3PD::VectorFillerToolBase::Var::resize | ( | size_t | sz, |
| size_t | pos | ||
| ) |
Resize the vector.
| sz | The new vector size. |
| pos | After the resize, move the variable pointer to this element. |
Definition at line 494 of file VectorFillerToolBase.cxx.
|
private |
Pointer to the variable pointer.
Definition at line 290 of file VectorFillerToolBase.h.
|
private |
Pointer to the vector instance.
Definition at line 302 of file VectorFillerToolBase.h.
|
private |
Pointer to the default value for this variable, if one has been requested.
We own this object.
Definition at line 306 of file VectorFillerToolBase.h.
|
private |
Size of the object pointed to by m_default.
(Should generally be the same as m_valdiff, but it may possibly be smaller due to alignment considerations.)
Definition at line 311 of file VectorFillerToolBase.h.
|
private |
Documentation string.
Definition at line 293 of file VectorFillerToolBase.h.
|
private |
The variable name.
Definition at line 284 of file VectorFillerToolBase.h.
|
private |
The root collection proxy.
Definition at line 296 of file VectorFillerToolBase.h.
|
private |
The type of the variable element (for each object).
Definition at line 287 of file VectorFillerToolBase.h.
|
private |
Offset between collection elements.
Definition at line 299 of file VectorFillerToolBase.h.
1.8.18