ATLAS Offline Software
AFP_TDSensitiveDetectorTool.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 
6 // Class header
8 
9 // For the SD itself
11 
12 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
13 
14 AFP_TDSensitiveDetectorTool::AFP_TDSensitiveDetectorTool(const std::string& type, const std::string& name, const IInterface* parent)
16 {
17 }
18 
19 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
20 
22 {
23  if(!getSD())
24  {
25  ATH_MSG_ERROR ("SetupEvent: AFP_TDSensitiveDetector never created!");
26  return StatusCode::FAILURE;
27  }
28  else
29  {
30  AFP_TDSensitiveDetector *localSD = dynamic_cast<AFP_TDSensitiveDetector*>(getSD());
31  if(!localSD)
32  {
33  ATH_MSG_ERROR ("SetupEvent: Failed to cast m_SD into AFP_TDSensitiveDetector.");
34  return StatusCode::FAILURE;
35  }
36  localSD->StartOfAthenaEvent();
37  }
38  return StatusCode::SUCCESS;
39 }
40 
41 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
42 
44 {
45  ATH_MSG_VERBOSE( "AFP_TDSensitiveDetectorTool::Gather()" );
46  if(!getSD())
47  {
48  ATH_MSG_ERROR ("Gather: AFP_TDSensitiveDetector never created!");
49  return StatusCode::FAILURE;
50  }
51  else
52  {
53  AFP_TDSensitiveDetector *localSD = dynamic_cast<AFP_TDSensitiveDetector*>(getSD());
54  if(!localSD)
55  {
56  ATH_MSG_ERROR ("Gather: Failed to cast m_SD into AFP_TDSensitiveDetector.");
57  return StatusCode::FAILURE;
58  }
59  localSD->EndOfAthenaEvent();
60  }
61  return StatusCode::SUCCESS;
62 }
63 
64 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
65 
66 G4VSensitiveDetector* AFP_TDSensitiveDetectorTool::makeSD() const
67 {
68  ATH_MSG_DEBUG( "Initializing SD" );
69  // Create a fresh SD
71 }
72 
AFP_TDSensitiveDetector::EndOfAthenaEvent
void EndOfAthenaEvent()
Definition: AFP_TDSensitiveDetector.cxx:439
AFP_TDSensitiveDetectorTool::Gather
StatusCode Gather() override final
End of an athena event.
Definition: AFP_TDSensitiveDetectorTool.cxx:43
AFP_TDSensitiveDetectorTool::makeSD
G4VSensitiveDetector * makeSD() const override final
Definition: AFP_TDSensitiveDetectorTool.cxx:66
AFP_TDSensitiveDetectorTool.h
SensitiveDetectorBase
Common base class for tools that create and manage Geant4 sensitive detectors.
Definition: SensitiveDetectorBase.h:42
AFP_TDSensitiveDetector::StartOfAthenaEvent
void StartOfAthenaEvent()
Definition: AFP_TDSensitiveDetector.cxx:44
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SensitiveDetectorBase::getSD
G4VSensitiveDetector * getSD()
Retrieve the current SD.
Definition: SensitiveDetectorBase.cxx:123
AFP_TDSensitiveDetectorTool::AFP_TDSensitiveDetectorTool
AFP_TDSensitiveDetectorTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: AFP_TDSensitiveDetectorTool.cxx:14
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AFP_TDSensitiveDetectorTool::SetupEvent
StatusCode SetupEvent() override final
Beginning of an athena event.
Definition: AFP_TDSensitiveDetectorTool.cxx:21
AFP_TDSensitiveDetector.h
SensitiveDetectorBase::m_outputCollectionNames
Gaudi::Property< std::vector< std::string > > m_outputCollectionNames
Names of all output collections written out by this SD.
Definition: SensitiveDetectorBase.h:84
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AFP_TDSensitiveDetector
Definition: AFP_TDSensitiveDetector.h:24