ATLAS Offline Software
ZDC_FiberSDTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 // Class header
7 #include "ZDC_FiberSDTool.h"
8 
9 // For the SD itself
10 #include "ZDC_FiberSD.h"
11 
12 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
13 
14 ZDC_FiberSDTool::ZDC_FiberSDTool(const std::string& type, const std::string& name, const IInterface* parent)
16 {
17  declareProperty("readoutPos",m_readoutPos = 511.8);
18 }
19 
20 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
21 
23 {
24  ATH_MSG_VERBOSE( "ZDC_FiberSDTool::Gather()" );
25  if(!getSD())
26  {
27  ATH_MSG_ERROR ("Gather: ZDC_FiberSD never created!");
28  return StatusCode::FAILURE;
29  }
30  else
31  {
32  ZDC_FiberSD *localSD = dynamic_cast<ZDC_FiberSD*>(getSD());
33  if(!localSD)
34  {
35  ATH_MSG_ERROR ("Gather: Failed to cast m_SD into ZDC_FiberSD.");
36  return StatusCode::FAILURE;
37  }
38  localSD->EndOfAthenaEvent();
39  }
40  return StatusCode::SUCCESS;
41 }
42 
43 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44 
45 G4VSensitiveDetector* ZDC_FiberSDTool::makeSD() const
46 {
47  ATH_MSG_DEBUG( "Initializing ZDC_FiberSD" );
48 
50 }
ZDC_FiberSD
Definition: ZDC_FiberSD.h:25
SensitiveDetectorBase
Common base class for tools that create and manage Geant4 sensitive detectors.
Definition: SensitiveDetectorBase.h:42
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
ZDC_FiberSD.h
ZDC_FiberSD::EndOfAthenaEvent
void EndOfAthenaEvent()
Definition: ZDC_FiberSD.cxx:164
SensitiveDetectorBase::getSD
G4VSensitiveDetector * getSD()
Retrieve the current SD.
Definition: SensitiveDetectorBase.cxx:123
ZDC_FiberSDTool::m_readoutPos
float m_readoutPos
Definition: ZDC_FiberSDTool.h:31
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ZDC_FiberSDTool.h
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
ZDC_FiberSDTool::Gather
StatusCode Gather() override final
End of an athena event.
Definition: ZDC_FiberSDTool.cxx:22
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
ZDC_FiberSDTool::ZDC_FiberSDTool
ZDC_FiberSDTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: ZDC_FiberSDTool.cxx:14
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ZDC_FiberSDTool::makeSD
G4VSensitiveDetector * makeSD() const override final
Definition: ZDC_FiberSDTool.cxx:45