ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
InDetPerfNtupleBranchBase Class Referenceabstract

#include <InDetPerfNtupleBranch.h>

Inheritance diagram for InDetPerfNtupleBranchBase:
Collaboration diagram for InDetPerfNtupleBranchBase:

Public Types

enum  attachmentOutcome { attachmentOutcome::Success, attachmentOutcome::InvalidTree, attachmentOutcome::FailedToBranch }
 

Public Member Functions

 InDetPerfNtupleBranchBase (const std::string &branchName, InDetPerfNtuple &mgr)
 
virtual ~InDetPerfNtupleBranchBase ()
 
void fill ()
 
virtual void setDummy ()=0
 
const std::string & getName () const
 
TBranch * getBranch () const
 
attachmentOutcome attach (TTree *targetTree)
 

Protected Member Functions

virtual TBranch * addPayloadAsBranch (TTree *targetTree)=0
 

Private Attributes

const std::string m_branchName
 
TBranch * m_branch {nullptr}
 

Detailed Description

Definition at line 17 of file InDetPerfNtupleBranch.h.

Member Enumeration Documentation

◆ attachmentOutcome

Enumerator
Success 
InvalidTree 
FailedToBranch 

Definition at line 36 of file InDetPerfNtupleBranch.h.

36  {
37  Success,
38  InvalidTree,
39  FailedToBranch
40  };

Constructor & Destructor Documentation

◆ InDetPerfNtupleBranchBase()

InDetPerfNtupleBranchBase::InDetPerfNtupleBranchBase ( const std::string &  branchName,
InDetPerfNtuple mgr 
)

Definition at line 4 of file InDetPerfNtupleBranch.cxx.

4  :
5  m_branchName(branchName) {
6  mgr.addBranch(this);
7 }

◆ ~InDetPerfNtupleBranchBase()

virtual InDetPerfNtupleBranchBase::~InDetPerfNtupleBranchBase ( )
inlinevirtual

Definition at line 20 of file InDetPerfNtupleBranch.h.

20 {};

Member Function Documentation

◆ addPayloadAsBranch()

virtual TBranch* InDetPerfNtupleBranchBase::addPayloadAsBranch ( TTree *  targetTree)
protectedpure virtual

◆ attach()

InDetPerfNtupleBranchBase::attachmentOutcome InDetPerfNtupleBranchBase::attach ( TTree *  targetTree)

Definition at line 9 of file InDetPerfNtupleBranch.cxx.

9  {
10  if (targetTree) {
11  m_branch = this->addPayloadAsBranch(targetTree);
13  }
14  else {
16  }
17 }

◆ fill()

void InDetPerfNtupleBranchBase::fill ( )
inline

Definition at line 23 of file InDetPerfNtupleBranch.h.

23 { if (m_branch) m_branch->Fill(); }

◆ getBranch()

TBranch* InDetPerfNtupleBranchBase::getBranch ( ) const
inline

Definition at line 33 of file InDetPerfNtupleBranch.h.

33 { return m_branch; }

◆ getName()

const std::string& InDetPerfNtupleBranchBase::getName ( ) const
inline

Definition at line 30 of file InDetPerfNtupleBranch.h.

30 { return m_branchName; }

◆ setDummy()

virtual void InDetPerfNtupleBranchBase::setDummy ( )
pure virtual

Member Data Documentation

◆ m_branch

TBranch* InDetPerfNtupleBranchBase::m_branch {nullptr}
private

Definition at line 54 of file InDetPerfNtupleBranch.h.

◆ m_branchName

const std::string InDetPerfNtupleBranchBase::m_branchName
private

Definition at line 52 of file InDetPerfNtupleBranch.h.


The documentation for this class was generated from the following files:
InDetPerfNtupleBranchBase::attachmentOutcome::FailedToBranch
@ FailedToBranch
InDetPerfNtupleBranchBase::m_branchName
const std::string m_branchName
Definition: InDetPerfNtupleBranch.h:52
InDetPerfNtupleBranchBase::attachmentOutcome::InvalidTree
@ InvalidTree
InDetPerfNtupleBranchBase::addPayloadAsBranch
virtual TBranch * addPayloadAsBranch(TTree *targetTree)=0
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
InDetPerfNtupleBranchBase::m_branch
TBranch * m_branch
Definition: InDetPerfNtupleBranch.h:54
InDetPerfNtupleBranchBase::attachmentOutcome::Success
@ Success