ATLAS Offline Software
Loading...
Searching...
No Matches
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.
 ~CaloClusterChangeSignalState ()
 Destructor.
const xAOD::CaloClustercluster ()
 Return a ptr to the cluster we are managing.

Private Attributes

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

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}
xAOD::CaloCluster * m_clus
The cluster that we're managing.
xAOD::CaloCluster::State m_oldstate
The previous signal state for the cluster.
State signalState() const
Get the current signal state.
bool setSignalState(const State s)
Switch signal state.

◆ ~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)
21 m_clus->setSignalState(m_oldstate);
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: