ATLAS Offline Software
ThinNegativeEnergyCaloClustersAlg.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef THINNINGUTILS_ThinNegativeEnergyCaloClustersAlg_H
8 #define THINNINGUTILS_ThinNegativeEnergyCaloClustersAlg_H 1
9 
14 // FrameWork includes
16 #include "GaudiKernel/ServiceHandle.h"
17 #include "GaudiKernel/ToolHandle.h"
19 // STL includes
20 #include <atomic>
21 #include <string>
22 
24 
26 {
27 public:
29  ThinNegativeEnergyCaloClustersAlg(const std::string& name,
30  ISvcLocator* pSvcLocator);
31 
34 
36  virtual StatusCode initialize() override final;
37 
39  StatusCode execute(const EventContext& ctx) const override final;
40 
42  virtual StatusCode finalize() override final;
43 
44 private:
45  StringProperty m_streamName{
46  this,
47  "StreamName",
48  "",
49  "Name of the stream for which thinning is being done."
50  };
51 
53  BooleanProperty m_doThinning{
54  this,
55  "ThinNegativeEnergyCaloClusters",
56  true,
57  "Should the thinning of negative energy calo clusters be run?"
58  };
59 
62  this,
63  "CaloClustersKey",
64  "CaloCalTopoClusters",
65  "StoreGate key for the CaloClustersContainer to be thinned"
66  };
67 
69  mutable std::atomic<unsigned long> m_nEventsProcessed;
70  mutable std::atomic<unsigned long> m_nCaloClustersProcessed;
71  mutable std::atomic<unsigned long> m_nCaloClustersThinned;
72 };
73 
74 #endif //> !THINNINGUTILS_ThinNegativeEnergyCaloClustersAlg_H
ThinNegativeEnergyCaloClustersAlg::m_doThinning
BooleanProperty m_doThinning
Should the thinning run?
Definition: ThinNegativeEnergyCaloClustersAlg.h:53
ThinNegativeEnergyCaloClustersAlg::finalize
virtual StatusCode finalize() override final
Athena algorithm's finalize hook.
Definition: ThinNegativeEnergyCaloClustersAlg.cxx:75
ThinNegativeEnergyCaloClustersAlg::~ThinNegativeEnergyCaloClustersAlg
virtual ~ThinNegativeEnergyCaloClustersAlg()=default
Destructor:
SG::ThinningHandleKey
HandleKey object for adding thinning to an object.
Definition: ThinningHandleKey.h:38
ThinNegativeEnergyCaloClustersAlg::ThinNegativeEnergyCaloClustersAlg
ThinNegativeEnergyCaloClustersAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Definition: ThinNegativeEnergyCaloClustersAlg.cxx:32
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
ThinNegativeEnergyCaloClustersAlg::m_nEventsProcessed
std::atomic< unsigned long > m_nEventsProcessed
Counters.
Definition: ThinNegativeEnergyCaloClustersAlg.h:69
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
ThinNegativeEnergyCaloClustersAlg::m_nCaloClustersThinned
std::atomic< unsigned long > m_nCaloClustersThinned
Definition: ThinNegativeEnergyCaloClustersAlg.h:71
ThinNegativeEnergyCaloClustersAlg
Definition: ThinNegativeEnergyCaloClustersAlg.h:26
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ThinNegativeEnergyCaloClustersAlg::initialize
virtual StatusCode initialize() override final
Athena algorithm's initalize hook.
Definition: ThinNegativeEnergyCaloClustersAlg.cxx:44
AthReentrantAlgorithm.h
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ThinNegativeEnergyCaloClustersAlg::m_caloClustersKey
SG::ThinningHandleKey< xAOD::CaloClusterContainer > m_caloClustersKey
Names of the containers to thin.
Definition: ThinNegativeEnergyCaloClustersAlg.h:61
ThinningHandleKey.h
HandleKey object for adding thinning to an object.
CaloClusterContainer.h
ThinNegativeEnergyCaloClustersAlg::m_streamName
StringProperty m_streamName
Definition: ThinNegativeEnergyCaloClustersAlg.h:45
ThinNegativeEnergyCaloClustersAlg::execute
StatusCode execute(const EventContext &ctx) const override final
Athena algorithm's execute hook.
Definition: ThinNegativeEnergyCaloClustersAlg.cxx:86
ThinNegativeEnergyCaloClustersAlg::m_nCaloClustersProcessed
std::atomic< unsigned long > m_nCaloClustersProcessed
Definition: ThinNegativeEnergyCaloClustersAlg.h:70