ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
CaloClusterChangeSignalState Class Reference

Helper to temporarily change the signal state of a cluster. More...

#include <CaloClusterChangeSignalState.h>

Collaboration diagram for CaloClusterChangeSignalState:

Public Member Functions

 CaloClusterChangeSignalState ()=delete
 
 CaloClusterChangeSignalState (const CaloClusterChangeSignalState &)=delete
 
CaloClusterChangeSignalStateoperator= (const CaloClusterChangeSignalState &)=delete
 
 CaloClusterChangeSignalState (xAOD::CaloCluster *pClus, xAOD::CaloCluster::State s)
 Change the signal state of a cluster, remembering the old state. More...
 
 ~CaloClusterChangeSignalState ()
 Destructor. More...
 
const xAOD::CaloClustercluster ()
 Return a ptr to the cluster we are managing. More...
 

Private Attributes

xAOD::CaloClusterm_clus
 The cluster that we're managing. More...
 
xAOD::CaloCluster::State m_oldstate
 The previous signal state for the cluster. More...
 

Detailed Description

Helper to temporarily change the signal state of a cluster.

Constructing one of these objects will change the signal state of a cluster. When this object is desctructed, the cluster's previous signal state will be restored.

Definition at line 18 of file CaloClusterChangeSignalState.h.

Constructor & Destructor Documentation

◆ CaloClusterChangeSignalState() [1/3]

CaloClusterChangeSignalState::CaloClusterChangeSignalState ( )
delete

◆ CaloClusterChangeSignalState() [2/3]

CaloClusterChangeSignalState::CaloClusterChangeSignalState ( const CaloClusterChangeSignalState )
delete

◆ CaloClusterChangeSignalState() [3/3]

CaloClusterChangeSignalState::CaloClusterChangeSignalState ( xAOD::CaloCluster pClus,
xAOD::CaloCluster::State  s 
)

Change the signal state of a cluster, remembering the old state.

Parameters
pClusThe cluster to change.
sThe new signal state for the cluster.

Definition at line 8 of file CaloClusterChangeSignalState.cxx.

8  :
9  m_clus (pClus),
10  m_oldstate (pClus->signalState())
11 {
12  pClus->setSignalState(s);
13  //std::cout << "SignalStateHelper: Setting state for clu " << pClus << std::endl;
14 }

◆ ~CaloClusterChangeSignalState()

CaloClusterChangeSignalState::~CaloClusterChangeSignalState ( )

Destructor.

Restore the cluster to its previous state.

Definition at line 17 of file CaloClusterChangeSignalState.cxx.

18 {
19  //std::cout << "SignalStateHelper: Resetting state for clu " << m_clus << std::endl;
20  if (m_clus)
22 }

Member Function Documentation

◆ cluster()

const xAOD::CaloCluster* CaloClusterChangeSignalState::cluster ( )
inline

Return a ptr to the cluster we are managing.

Definition at line 42 of file CaloClusterChangeSignalState.h.

42 {return m_clus;}

◆ operator=()

CaloClusterChangeSignalState& CaloClusterChangeSignalState::operator= ( const CaloClusterChangeSignalState )
delete

Member Data Documentation

◆ m_clus

xAOD::CaloCluster* CaloClusterChangeSignalState::m_clus
private

The cluster that we're managing.

Definition at line 47 of file CaloClusterChangeSignalState.h.

◆ m_oldstate

xAOD::CaloCluster::State CaloClusterChangeSignalState::m_oldstate
private

The previous signal state for the cluster.

Definition at line 49 of file CaloClusterChangeSignalState.h.


The documentation for this class was generated from the following files:
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
xAOD::CaloCluster_v1::signalState
State signalState() const
Get the current signal state.
Definition: CaloCluster_v1.h:633
CaloClusterChangeSignalState::m_clus
xAOD::CaloCluster * m_clus
The cluster that we're managing.
Definition: CaloClusterChangeSignalState.h:47
xAOD::CaloCluster_v1::setSignalState
bool setSignalState(const State s)
Switch signal state.
Definition: CaloCluster_v1.cxx:440
CaloClusterChangeSignalState::m_oldstate
xAOD::CaloCluster::State m_oldstate
The previous signal state for the cluster.
Definition: CaloClusterChangeSignalState.h:49