ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetG4
TRT_G4_SD
src
TRTSensitiveDetectorTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
// Class header
7
#include "
TRTSensitiveDetectorTool.h
"
8
9
// Package headers
10
#include "
InDetSimEvent/TRTUncompressedHitCollection.h
"
11
#include "
TRTSensitiveDetector.h
"
12
#include "
HitManagement/HitCollectionMap.h
"
13
14
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
15
16
TRTSensitiveDetectorTool::TRTSensitiveDetectorTool
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent)
17
:
SensitiveDetectorBase
(
type
, name , parent )
18
{
19
}
20
21
StatusCode
TRTSensitiveDetectorTool::SetupEvent
(
HitCollectionMap
& hitCollections)
22
{
23
hitCollections.
Emplace
<
TRTUncompressedHitCollection
>(
m_outputCollectionNames
[0]);
24
return
StatusCode::SUCCESS;
25
}
26
27
StatusCode
TRTSensitiveDetectorTool::Gather
(
HitCollectionMap
& hitCollections)
28
{
29
return
hitCollections.
Record
<
TRTUncompressedHitCollection
>(
m_outputCollectionNames
[0]);
30
}
31
32
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33
34
G4VSensitiveDetector*
TRTSensitiveDetectorTool::makeSD
()
const
35
{
36
37
ATH_MSG_DEBUG
(
"Initializing SD"
);
38
// Create a fresh SD
39
//Need to set message levels here as the settings are needed in the constructor...
40
int
verboseLevel = 3;
41
if
(msgLvl(MSG::VERBOSE)) { verboseLevel = 10; }
42
else
if
(msgLvl(MSG::DEBUG)) { verboseLevel = 5; }
43
return
new
TRTSensitiveDetector
(name(),
m_outputCollectionNames
[0], verboseLevel);
44
}
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
HitCollectionMap.h
TRTSensitiveDetectorTool.h
TRTSensitiveDetector.h
TRTUncompressedHitCollection.h
TRTUncompressedHitCollection
AtlasHitsVector< TRTUncompressedHit > TRTUncompressedHitCollection
Definition
TRTUncompressedHitCollection.h:16
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
TRTSensitiveDetectorTool::TRTSensitiveDetectorTool
TRTSensitiveDetectorTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
TRTSensitiveDetectorTool.cxx:16
TRTSensitiveDetectorTool::Gather
virtual StatusCode Gather(HitCollectionMap &) override
End of an athena event.
Definition
TRTSensitiveDetectorTool.cxx:27
TRTSensitiveDetectorTool::SetupEvent
virtual StatusCode SetupEvent(HitCollectionMap &) override
Beginning of an athena event.
Definition
TRTSensitiveDetectorTool.cxx:21
TRTSensitiveDetectorTool::makeSD
G4VSensitiveDetector * makeSD() const override final
Definition
TRTSensitiveDetectorTool.cxx:34
TRTSensitiveDetector
Definition
TRTSensitiveDetector.h:26
type
Generated on
for ATLAS Offline Software by
1.17.0