ATLAS Offline Software
Loading...
Searching...
No Matches
SensitiveDetectorMasterTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef G4ATLASSERVICES_SENSITIVEDETECTORMASTERTOOL_H
6#define G4ATLASSERVICES_SENSITIVEDETECTORMASTERTOOL_H
7
8// Base classes
11
12// Member
13#include "GaudiKernel/ToolHandle.h" // For tool handle array
14#include "G4AtlasInterfaces/ISensitiveDetector.h" // What we have a handle on
15
25class SensitiveDetectorMasterTool : public extends<AthAlgTool, ISensitiveDetectorMasterTool>
26{
27 public:
29 SensitiveDetectorMasterTool(const std::string& type, const std::string& name,
30 const IInterface* parent);
33
35 StatusCode initialize() override final;
36
38 StatusCode initializeSDs() override final;
40 StatusCode BeginOfAthenaEvent(HitCollectionMap&) override final;
42 StatusCode EndOfAthenaEvent(HitCollectionMap&) override final;
43
44 private:
46 ToolHandleArray<ISensitiveDetector> m_senDetTools{this, "SensitiveDetectors", {}, "Tool handle array of all sensitive detector tools"};
47};
48
49#endif
Small wrapper around hit collection map to facilitate accessing the hit collection.
Abstract interface to service for Geant4 sensitive detector classes.
StatusCode initialize() override final
Retrieve the SD tools. SD creation is deferred until initializeSDs.
StatusCode initializeSDs() override final
Calls initializeSD on each SD tool to create the SDs for the current worker thread.
StatusCode EndOfAthenaEvent(HitCollectionMap &) override final
Calls Gather on each SD tool.
ToolHandleArray< ISensitiveDetector > m_senDetTools
Private array of tool handles pointing to all SD tools.
StatusCode BeginOfAthenaEvent(HitCollectionMap &) override final
Calls SetupEvent on each SD tool.
virtual ~SensitiveDetectorMasterTool()
Empty virtual destructor.
SensitiveDetectorMasterTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
#define private