ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
G4Utilities
G4UserActions
src
VolumeDumper.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
VolumeDumper.h
"
6
#include "
G4DebuggingTools/G4DebuggingHelper.h
"
7
8
// Geant4
9
#include "G4PhysicalVolumeStore.hh"
10
#include "G4LogicalVolume.hh"
11
12
// Gaudi
13
#include "GaudiKernel/Bootstrap.h"
14
#include "GaudiKernel/ISvcLocator.h"
15
#include "GaudiKernel/IMessageSvc.h"
16
17
namespace
G4UA
18
{
19
20
//---------------------------------------------------------------------------
21
VolumeDumper::VolumeDumper
() :
22
AthMessaging
(
Gaudi
::svcLocator()->service<IMessageSvc>(
"MessageSvc"
),
23
"VolumeDumper"
)
24
{
25
}
26
27
//---------------------------------------------------------------------------
28
void
VolumeDumper::BeginOfEventAction
(
const
G4Event*)
29
{
30
ATH_MSG_INFO
(
"Dumping G4PhysicalVolumeStore"
);
31
ATH_MSG_INFO
(
"-----------------------------"
);
32
33
G4PhysicalVolumeStore* store = G4PhysicalVolumeStore::GetInstance();
34
std::set<std::pair<G4String, G4String>> volumes;
35
36
ATH_MSG_INFO
(
"Size: "
<< store->size());
37
38
for
(
unsigned
int
i = 0; i < store->size(); i++) {
39
volumes.insert(
40
std::pair<G4String, G4String>(
41
(*store)[i]->GetName(), (*store)[i]->GetLogicalVolume()->GetName()
42
));
43
}
44
45
for
(
auto
& vol : volumes) {
46
std::cout <<
"short: "
<<
G4DebuggingHelpers::ClassifyVolume
(vol.first)
47
<<
" full: "
<< vol.first
48
<<
" logical: "
<< vol.second
49
<< std::endl;
50
}
51
52
ATH_MSG_INFO
(
"Finished dumbing G4PhysicalVolumeStore"
);
53
ATH_MSG_INFO
(
"-----------------------------"
);
54
}
55
56
}
// namespace G4UA
ATH_MSG_INFO
#define ATH_MSG_INFO(x,...)
Definition
AthMsgStreamMacros.h:45
G4DebuggingHelper.h
VolumeDumper.h
AthMessaging::AthMessaging
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
Definition
AthMessaging.cxx:13
G4UA::VolumeDumper::VolumeDumper
VolumeDumper()
Definition
VolumeDumper.cxx:21
G4UA::VolumeDumper::BeginOfEventAction
virtual void BeginOfEventAction(const G4Event *) override
Definition
VolumeDumper.cxx:28
G4DebuggingHelpers::ClassifyVolume
const G4String ClassifyVolume(const G4String &nom)
Definition
G4DebuggingHelper.cxx:74
G4UA
for nSW
Definition
CalibrationDefaultProcessing.h:19
Gaudi
=============================================================================
Definition
CaloGPUClusterAndCellDataMonitorOptions.h:273
Generated on
for ATLAS Offline Software by
1.17.0