From 3cf89b9b5e51a382b4eef48b18d4b6e400fd9bf9 Mon Sep 17 00:00:00 2001 From: sshively <savannah.rose.shively@cern.ch> Date: Fri, 3 Sep 2021 16:10:25 +0200 Subject: [PATCH] initial draft --- .../TrackerEfficiencyExample/CMakeLists.txt | 2 +- .../src/TrackerEfficiencyAlg.cxx | 12 ++++++-- .../src/TrackerEfficiencyAlg.h | 28 +++++++++---------- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/Control/CalypsoExample/TrackerEfficiencyExample/CMakeLists.txt b/Control/CalypsoExample/TrackerEfficiencyExample/CMakeLists.txt index c6313afb..32154874 100644 --- a/Control/CalypsoExample/TrackerEfficiencyExample/CMakeLists.txt +++ b/Control/CalypsoExample/TrackerEfficiencyExample/CMakeLists.txt @@ -9,7 +9,7 @@ atlas_subdir( TrackerEfficiencyExample ) atlas_add_component( TrackerEfficiencyExample src/*.cxx src/*.h src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps xAODFaserWaveform ScintRawEvent + LINK_LIBRARIES AthenaBaseComps xAODFaserWaveform WaveRawEvent GaudiKernel AthViews StoreGateLib SGtests ) diff --git a/Control/CalypsoExample/TrackerEfficiencyExample/src/TrackerEfficiencyAlg.cxx b/Control/CalypsoExample/TrackerEfficiencyExample/src/TrackerEfficiencyAlg.cxx index 033918d1..807948e0 100644 --- a/Control/CalypsoExample/TrackerEfficiencyExample/src/TrackerEfficiencyAlg.cxx +++ b/Control/CalypsoExample/TrackerEfficiencyExample/src/TrackerEfficiencyAlg.cxx @@ -15,6 +15,7 @@ #include <TBranch.h> + //static const std::string moduleFailureReason{"TrackerEfficiencyAlg: Exceeds max clusters"}; // Constructor with parameters: @@ -24,12 +25,16 @@ TrackerEfficiencyAlg::TrackerEfficiencyAlg(const std::string& name, ISvcLocator* m_idHelper{nullptr}, m_histSvc ( "THistSvc/THistSvc", name ){} +//TrackerEfficiencyAlg::~TrackerEfficiencyAlg(){} + // Initialize method: StatusCode TrackerEfficiencyAlg::initialize() { ATH_MSG_INFO("TrackerEfficiencyAlg::initialize()"); + ATH_CHECK( m_CaloWaveformContainer.initialize() ); + // Tree - m_tree = new TTree("residTree","Cosmics residuals"); + m_tree = new TTree("TrackerTree","PH_Varname"); //hist test m_hist = new TH1D("Stations", "Stations hit", 4, 0, 3); @@ -40,7 +45,10 @@ StatusCode TrackerEfficiencyAlg::initialize() { StatusCode TrackerEfficiencyAlg::execute(const EventContext& ctx) const { -// Done + SG::ReadHandle<RawWaveformContainer> caloHandle(m_CaloWaveformContainer, ctx); + ATH_MSG_INFO("Found ReadHandle for CaloWaveforms"); + ATH_MSG_INFO(*caloHandle); + return StatusCode::SUCCESS; } diff --git a/Control/CalypsoExample/TrackerEfficiencyExample/src/TrackerEfficiencyAlg.h b/Control/CalypsoExample/TrackerEfficiencyExample/src/TrackerEfficiencyAlg.h index cfaf444f..650d9d56 100644 --- a/Control/CalypsoExample/TrackerEfficiencyExample/src/TrackerEfficiencyAlg.h +++ b/Control/CalypsoExample/TrackerEfficiencyExample/src/TrackerEfficiencyAlg.h @@ -29,16 +29,17 @@ #include <math.h> #include <TProfile.h> +//Waveform +#include "xAODFaserWaveform/WaveformHitContainer.h" +#include "WaveRawEvent/RawWaveformContainer.h" + class FaserSCT_ID; class ISvcLocator; class StatusCode; class TH1; class TTree; -namespace Trk -{ - class TrackStateOnSurface; -} + class TrackerEfficiencyAlg : public AthReentrantAlgorithm, AthHistogramming { @@ -46,26 +47,23 @@ class TrackerEfficiencyAlg : public AthReentrantAlgorithm, AthHistogramming /// Constructor with parameters: TrackerEfficiencyAlg(const std::string& name, ISvcLocator* pSvcLocator); virtual ~TrackerEfficiencyAlg(){}; - /** @name Usual algorithm methods */ - //@{ + ///Retrieve the tools used and initialize variables virtual StatusCode initialize() override; ///Form clusters and record them in StoreGate (detector store) virtual StatusCode execute(const EventContext& ctx) const override; ///Clean up and release the collection containers virtual StatusCode finalize() override; - //Make this algorithm clonable. - virtual bool isClonable() const override { return true; } - //@} + + const ServiceHandle<ITHistSvc>& histSvc() const; private: - /** @name Disallow default instantiation, copy, assignment */ - //@{ - TrackerEfficiencyAlg() = delete; - TrackerEfficiencyAlg(const TrackerEfficiencyAlg&) = delete; - TrackerEfficiencyAlg &operator=(const TrackerEfficiencyAlg&) = delete; - //@} + SG::ReadHandleKey<RawWaveformContainer> m_CaloWaveformContainer + { this, "CaloWaveformContainerKey", "CaloWaveforms", "ReadHandleKey for CaloWaveforms Container"}; + //SG::ReadHandleKey<Waveform> m_WaveformHitContainer + //{ this, "CaloWaveformContainerKey", "CaloWaveforms", "ReadHandleKey for CaloWaveforms Container"}; + const FaserSCT_ID* m_idHelper; ServiceHandle<ITHistSvc> m_histSvc; -- GitLab