File indexing completed on 2025-08-05 08:17:48
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include "PHG4GDMLSubsystem.h"
0012
0013 #include "PHG4GDMLDetector.h"
0014
0015 #include <phparameter/PHParameters.h>
0016
0017 #include <iostream> // for operator<<, basic_ostream, endl
0018
0019 class PHCompositeNode;
0020 class PHG4Detector;
0021
0022 PHG4GDMLSubsystem::PHG4GDMLSubsystem(const std::string &name)
0023 : PHG4DetectorSubsystem(name, 0)
0024 {
0025 InitializeParameters();
0026 }
0027
0028 PHG4GDMLSubsystem::~PHG4GDMLSubsystem() = default;
0029
0030
0031 int PHG4GDMLSubsystem::InitRunSubsystem(PHCompositeNode *topNode)
0032 {
0033
0034
0035
0036
0037 m_Detector = new PHG4GDMLDetector(this, topNode, Name(), GetParams());
0038 m_Detector->OverlapCheck(CheckOverlap());
0039
0040 return 0;
0041 }
0042
0043
0044 int PHG4GDMLSubsystem::process_event(PHCompositeNode * )
0045 {
0046 return 0;
0047 }
0048
0049 void PHG4GDMLSubsystem::Print(const std::string &what) const
0050 {
0051 std::cout << Name() << " Parameters: " << std::endl;
0052 GetParams()->Print();
0053 if (m_Detector)
0054 {
0055 m_Detector->Print(what);
0056 }
0057
0058 return;
0059 }
0060
0061
0062 PHG4Detector *PHG4GDMLSubsystem::GetDetector() const
0063 {
0064 return m_Detector;
0065 }
0066
0067 void PHG4GDMLSubsystem::SetDefaultParameters()
0068 {
0069 set_default_double_param("place_x", 0.);
0070 set_default_double_param("place_y", 0.);
0071 set_default_double_param("place_z", 0.);
0072 set_default_double_param("rot_x", 0.);
0073 set_default_double_param("rot_y", 0.);
0074 set_default_double_param("rot_z", 0.);
0075
0076 set_default_string_param("GDMPath", "DefaultParameters-InvadPath");
0077 set_default_string_param("TopVolName", "DefaultParameters-InvadVol");
0078
0079 set_default_int_param("skip_DST_geometry_export", 0.);
0080 }