ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonG4
MuonG4SD
src
TGCSensitiveDetectorTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TGCSensitiveDetectorTool.h
"
6
#include "
TGCSensitiveDetector.h
"
7
8
#include "
HitManagement/HitCollectionMap.h
"
9
#include "
MuonSimEvent/TGCSimHitCollection.h
"
10
11
TGCSensitiveDetectorTool::TGCSensitiveDetectorTool
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent)
12
:
SensitiveDetectorBase
(
type
, name , parent )
13
{
14
}
15
16
StatusCode
TGCSensitiveDetectorTool::SetupEvent
(
HitCollectionMap
& hitCollections)
17
{
18
hitCollections.
Emplace
<
TGCSimHitCollection
>(
m_outputCollectionNames
[0]);
19
return
StatusCode::SUCCESS;
20
}
21
22
StatusCode
TGCSensitiveDetectorTool::Gather
(
HitCollectionMap
& hitCollections)
23
{
24
return
hitCollections.
Record
<
TGCSimHitCollection
>(
m_outputCollectionNames
[0]);
25
}
26
27
G4VSensitiveDetector*
TGCSensitiveDetectorTool::makeSD
()
const
28
{
29
ATH_MSG_DEBUG
(
"Initializing SD"
);
30
return
new
TGCSensitiveDetector
(name(),
m_outputCollectionNames
[0]);
31
}
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
HitCollectionMap.h
TGCSensitiveDetectorTool.h
TGCSensitiveDetector.h
TGCSimHitCollection.h
TGCSimHitCollection
AtlasHitsVector< TGCSimHit > TGCSimHitCollection
Definition
TGCSimHitCollection.h:15
HitCollectionMap
Small wrapper around hit collection map to facilitate accessing the hit collection.
Definition
HitCollectionMap.h:23
HitCollectionMap::Record
StatusCode Record(std::string const &sgKey, std::string const &hitCollectionName, EventContext const &ctx)
Record the hit collection hitCollectionName to the StoreGate sgKey.
Definition
HitCollectionMap.h:83
HitCollectionMap::Emplace
std::pair< StorageIterator, bool > Emplace(std::string const &hitCollectionName, CollectionArgs &&... args)
Insert a container in the map with in-place construction.
Definition
HitCollectionMap.h:40
SensitiveDetectorBase::m_outputCollectionNames
Gaudi::Property< std::vector< std::string > > m_outputCollectionNames
Names of all output collections written out by this SD.
Definition
SensitiveDetectorBase.h:80
SensitiveDetectorBase::SensitiveDetectorBase
SensitiveDetectorBase(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Definition
SensitiveDetectorBase.cxx:17
TGCSensitiveDetectorTool::SetupEvent
virtual StatusCode SetupEvent(HitCollectionMap &hitCollections) override
Beginning of an athena event.
Definition
TGCSensitiveDetectorTool.cxx:16
TGCSensitiveDetectorTool::TGCSensitiveDetectorTool
TGCSensitiveDetectorTool(const std::string &type, const std::string &name, const IInterface *parent)
constructor
Definition
TGCSensitiveDetectorTool.cxx:11
TGCSensitiveDetectorTool::Gather
virtual StatusCode Gather(HitCollectionMap &hitCollections) override
End of an athena event.
Definition
TGCSensitiveDetectorTool.cxx:22
TGCSensitiveDetectorTool::makeSD
G4VSensitiveDetector * makeSD() const override final
Definition
TGCSensitiveDetectorTool.cxx:27
TGCSensitiveDetector
Definition
TGCSensitiveDetector.h:73
type
Generated on
for ATLAS Offline Software by
1.17.0