ATLAS Offline Software
Loading...
Searching...
No Matches
D3PD::Root::Cleartable Class Reference

Table giving information on how to clear all variables in a tree. More...

Collaboration diagram for D3PD::Root::Cleartable:

Public Member Functions

 ~Cleartable ()
 Destructor.
StatusCode add (TBranch *br, char *defval, size_t defsize)
 Initialize for clearing a variable.
void clear ()
 Clear all branches.

Private Attributes

std::vector< Clearinfom_info

Detailed Description

Table giving information on how to clear all variables in a tree.

Definition at line 355 of file RootD3PD.cxx.

Constructor & Destructor Documentation

◆ ~Cleartable()

D3PD::Root::Cleartable::~Cleartable ( )

Destructor.

Definition at line 387 of file RootD3PD.cxx.

388{
389 for (size_t i = 0; i < m_info.size(); i++)
390 m_info[i].free();
391}
std::vector< Clearinfo > m_info
Definition RootD3PD.cxx:380

Member Function Documentation

◆ add()

StatusCode D3PD::Root::Cleartable::add ( TBranch * br,
char * defval,
size_t defsize )

Initialize for clearing a variable.

Add a new branch to the table.

Parameters
brThe branch containing the variable.
defvalPointer to the default value to use for this variable. Null for no default (generally means to fill with zeros). Of the type given by ti. Only works for basic types. We take ownership of this.
defsizeSize of the object pointed at by defval.
brThe branch to be cleared.
defvalPointer to the default value to use for this variable. Null for no default (generally means to fill with zeros). Of the type given by ti. Only works for basic types. We take ownership of this.
defsizeSize of the object pointed at by defval.

Definition at line 404 of file RootD3PD.cxx.

405{
406 m_info.push_back (Clearinfo());
407 CHECK( m_info.back().init (br, defval, defsize) );
408 m_info.back().clear(); // Make sure the variable is clear at the start.
409 return StatusCode::SUCCESS;
410}
#define CHECK(...)
Evaluate an expression and check for errors.

◆ clear()

void D3PD::Root::Cleartable::clear ( )

Clear all branches.

Clear all variables.

Definition at line 416 of file RootD3PD.cxx.

417{
418 for (size_t i = 0; i < m_info.size(); i++)
419 m_info[i].clear();
420}
void clear()
Clear all branches.
Definition RootD3PD.cxx:416

Member Data Documentation

◆ m_info

std::vector<Clearinfo> D3PD::Root::Cleartable::m_info
private

Definition at line 380 of file RootD3PD.cxx.


The documentation for this class was generated from the following file: