ATLAS Offline Software
ThinningToolExample.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // ThinningToolExample.h, (c) ATLAS Detector software
8 
9 #ifndef DERIVATIONFRAMEWORK_THINNINGTOOLEXAMPLE_H
10 #define DERIVATIONFRAMEWORK_THINNINGTOOLEXAMPLE_H 1
11 
12 #include<string>
13 #include<atomic>
14 
15 // Gaudi & Athena basics
17 #include "GaudiKernel/ServiceHandle.h"
20 
21 // DerivationFramework includes
23 
24 
25 namespace DerivationFramework {
26 
31  class ThinningToolExample : public extends<AthAlgTool, IThinningTool> {
32 
33  public:
35  ThinningToolExample( const std::string& t, const std::string& n, const IInterface* p );
36 
38  virtual ~ThinningToolExample();
39 
40  // Athena algtool's Hooks
41  virtual StatusCode initialize() override;
42  virtual StatusCode finalize() override;
43 
45  virtual StatusCode doThinning() const override;
46 
47  private:
48  StringProperty m_streamName
49  { this, "StreamName", "", "Name of the stream being thinned" };
51  { this, "InDetTrackParticlesKey", "InDetTrackParticles", "" };
52 
53  mutable std::atomic<unsigned int> m_ntot;
54  mutable std::atomic<unsigned int> m_npass;
55  double m_trackPtCut;
56  };
57 
58 }
59 
60 
61 #endif
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
SG::ThinningHandleKey
HandleKey object for adding thinning to an object.
Definition: ThinningHandleKey.h:38
IThinningTool.h
DerivationFramework::ThinningToolExample::~ThinningToolExample
virtual ~ThinningToolExample()
Destructor.
Definition: ThinningToolExample.cxx:32
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
DerivationFramework::ThinningToolExample::initialize
virtual StatusCode initialize() override
Definition: ThinningToolExample.cxx:36
DerivationFramework::ThinningToolExample::m_npass
std::atomic< unsigned int > m_npass
Definition: ThinningToolExample.h:54
DerivationFramework::ThinningToolExample::m_inDetSGKey
SG::ThinningHandleKey< xAOD::TrackParticleContainer > m_inDetSGKey
Definition: ThinningToolExample.h:51
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
DerivationFramework::ThinningToolExample::ThinningToolExample
ThinningToolExample(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
Definition: ThinningToolExample.cxx:20
DerivationFramework::ThinningToolExample::m_streamName
StringProperty m_streamName
Definition: ThinningToolExample.h:49
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DerivationFramework::ThinningToolExample::finalize
virtual StatusCode finalize() override
Definition: ThinningToolExample.cxx:42
DerivationFramework::ThinningToolExample::m_ntot
std::atomic< unsigned int > m_ntot
Definition: ThinningToolExample.h:53
DerivationFramework::ThinningToolExample
Definition: ThinningToolExample.h:31
ThinningHandleKey.h
HandleKey object for adding thinning to an object.
DerivationFramework::ThinningToolExample::doThinning
virtual StatusCode doThinning() const override
Check that the current event passes this filter.
Definition: ThinningToolExample.cxx:50
DerivationFramework::ThinningToolExample::m_trackPtCut
double m_trackPtCut
Definition: ThinningToolExample.h:55
TrackParticleContainer.h