ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonG4
MuonG4SD
src
sTGCSensitiveDetectorTool.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 "
sTGCSensitiveDetectorTool.h
"
6
#include "
sTGCSensitiveDetector.h
"
7
8
#include "
HitManagement/HitCollectionMap.h
"
9
#include "
MuonSimEvent/sTGCSimHitCollection.h
"
10
11
sTGCSensitiveDetectorTool::sTGCSensitiveDetectorTool
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent)
12
:
SensitiveDetectorBase
(
type
, name , parent )
13
{
14
}
15
16
G4VSensitiveDetector*
sTGCSensitiveDetectorTool::makeSD
()
const
17
{
18
ATH_MSG_DEBUG
(
"Initializing SD"
);
19
return
new
sTGCSensitiveDetector
(name(),
m_outputCollectionNames
[0],
m_onSqLite
);
20
}
21
22
StatusCode
sTGCSensitiveDetectorTool::SetupEvent
(
HitCollectionMap
& hitCollections)
23
{
24
hitCollections.
Emplace
<
sTGCSimHitCollection
>(
m_outputCollectionNames
[0]);
25
return
StatusCode::SUCCESS;
26
}
27
28
StatusCode
sTGCSensitiveDetectorTool::Gather
(
HitCollectionMap
& hitCollections)
29
{
30
return
hitCollections.
Record
<
sTGCSimHitCollection
>(
m_outputCollectionNames
[0]);
31
}
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
HitCollectionMap.h
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
sTGCSensitiveDetectorTool::SetupEvent
virtual StatusCode SetupEvent(HitCollectionMap &hitCollections) override
Beginning of an athena event.
Definition
sTGCSensitiveDetectorTool.cxx:22
sTGCSensitiveDetectorTool::Gather
virtual StatusCode Gather(HitCollectionMap &hitCollections) override
End of an athena event.
Definition
sTGCSensitiveDetectorTool.cxx:28
sTGCSensitiveDetectorTool::makeSD
G4VSensitiveDetector * makeSD() const override final
Definition
sTGCSensitiveDetectorTool.cxx:16
sTGCSensitiveDetectorTool::m_onSqLite
Gaudi::Property< bool > m_onSqLite
Definition
sTGCSensitiveDetectorTool.h:19
sTGCSensitiveDetectorTool::sTGCSensitiveDetectorTool
sTGCSensitiveDetectorTool(const std::string &type, const std::string &name, const IInterface *parent)
construction/destruction
Definition
sTGCSensitiveDetectorTool.cxx:11
sTGCSensitiveDetector
Definition
sTGCSensitiveDetector.h:19
sTGCSensitiveDetectorTool.h
sTGCSensitiveDetector.h
sTGCSimHitCollection.h
sTGCSimHitCollection
AtlasHitsVector< sTGCSimHit > sTGCSimHitCollection
Definition
sTGCSimHitCollection.h:15
type
Generated on
for ATLAS Offline Software by
1.17.0