Skip to content

Commit

Permalink
Committing clang-format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Clang Robot committed May 8, 2024
1 parent f36eda2 commit 52d195e
Show file tree
Hide file tree
Showing 21 changed files with 326 additions and 298 deletions.
14 changes: 7 additions & 7 deletions HKG4EventAction/HKG4EventAction.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include "HKG4EventAction.h"

#include "WCSimDetectorConstruction.hh"
#include "WCSimEventAction.hh"
#include "WCSimPrimaryGeneratorAction.hh"
#include "WCSimDetectorConstruction.hh"
#include "WCSimRunAction.hh"

using namespace HK::Ghost::G4;
using namespace HK::Ghost::G4;

HKG4EventAction::HKG4EventAction() : Tool() {}

Expand All @@ -22,12 +22,12 @@ bool HKG4EventAction::Initialise(std::string configfile, DataModel& data) {
m_verbose = 1;

const WCSimRunAction* cp_run =
static_cast<const WCSimRunAction*>(m_data->m_p_run_manager->GetUserRunAction());
static_cast<const WCSimRunAction*>(m_data->m_p_run_manager->GetUserRunAction());
const WCSimDetectorConstruction* cp_det =
static_cast<const WCSimDetectorConstruction*>(m_data->m_p_run_manager->GetUserDetectorConstruction());
const WCSimPrimaryGeneratorAction* cp_gen =
static_cast<const WCSimPrimaryGeneratorAction*>(m_data->m_p_run_manager->GetUserPrimaryGeneratorAction());
static_cast<const WCSimDetectorConstruction*>(m_data->m_p_run_manager->GetUserDetectorConstruction());
const WCSimPrimaryGeneratorAction* cp_gen = static_cast<const WCSimPrimaryGeneratorAction*>(
m_data->m_p_run_manager->GetUserPrimaryGeneratorAction());

m_data->m_p_run_manager->SetUserAction(new WCSimEventAction(cp_run, cp_det, cp_gen));

return true;
Expand Down
31 changes: 16 additions & 15 deletions HKG4EventAction/HKG4EventAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,22 @@ namespace HK {
namespace G4 {
class HKG4EventAction : public Tool {

public:

HKG4EventAction(); ///< Simple constructor
bool Initialise(std::string configfile,
DataModel& data); ///< Initialise Function for setting up Tool resources. @param
///< configfile The path and name of the dynamic configuration file
///< to read in. @param data A reference to the transient data
///< class used to pass information between Tools.
bool Execute(); ///< Execute function used to perform Tool purpose.
bool Finalise(); ///< Finalise funciton used to clean up resources.

private:
public:

HKG4EventAction(); ///< Simple constructor
bool Initialise(
std::string configfile,
DataModel& data); ///< Initialise Function for setting up Tool resources. @param
///< configfile The path and name of the dynamic configuration file
///< to read in. @param data A reference to the transient data
///< class used to pass information between Tools.
bool Execute(); ///< Execute function used to perform Tool purpose.
bool Finalise(); ///< Finalise funciton used to clean up resources.

private:
};
} // namespace G4
} // namespace Ghost
} // namespace HK
} // namespace G4
} // namespace Ghost
} // namespace HK

#endif
16 changes: 7 additions & 9 deletions HKG4PhysicsList/HKG4PhysicsList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ bool HKG4PhysicsList::Initialise(std::string configfile, DataModel& data) {
if(!m_variables.Get("verbose", m_verbose))
m_verbose = 1;

//m_p_UI = G4UImanager::GetUIpointer();
// m_p_UI = G4UImanager::GetUIpointer();

std::string wcsim_dir = utils::GetEnvironmentVariableWithDefault("WCSIM_BUILD_DIR", "./");
std::string wcsim_mac_job_opt_filename =
HK::Ghost::utils::GetConfigFilename(m_variables, "wcsim_mac_job_opt_filename", (wcsim_dir + "/macros/jobOptions.mac").c_str());
HK::Ghost::utils::GetConfigFilename(m_variables,
"wcsim_mac_job_opt_filename",
(wcsim_dir + "/macros/jobOptions.mac").c_str());

// Set up the messenger hooks here, initialize the actual list after loading jobOptions.mac
WCSimPhysicsListFactory* m_p_phys_factory = new WCSimPhysicsListFactory();
Expand All @@ -37,19 +39,15 @@ bool HKG4PhysicsList::Initialise(std::string configfile, DataModel& data) {
m_data->m_p_run_manager->SetUserInitialization(m_p_phys_factory);

auto p_run_action = static_cast<const WCSimRunAction*>(m_data->m_p_run_manager->GetUserRunAction());
*m_log << ML(0) << "WCSimRunAction pointer is "
<< p_run_action
<< " in Initialise()" << std::endl;
*m_log << ML(0) << "WCSimRunAction pointer is " << p_run_action << " in Initialise()" << std::endl;

return true;
}

bool HKG4PhysicsList::Execute() {

auto p_run_action = static_cast<const WCSimRunAction*>(m_data->m_p_run_manager->GetUserRunAction());
*m_log << ML(0) << "WCSimRunAction pointer is "
<< p_run_action
<< " in Exectute()" << std::endl;
*m_log << ML(0) << "WCSimRunAction pointer is " << p_run_action << " in Exectute()" << std::endl;
return true;
}

Expand All @@ -60,6 +58,6 @@ bool HKG4PhysicsList::Finalise() {
*m_log << ML(0) << "WCSimRunAction pointer is null in destructor" << std::endl;
else
m_p_phys_factory->SaveOptionsToOutput(p_run_action->GetRootOptions());

return true;
}
36 changes: 19 additions & 17 deletions HKG4PhysicsList/HKG4PhysicsList.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,25 @@ namespace HK {

class HKG4PhysicsList : public Tool {

public:

HKG4PhysicsList(); ///< Simple constructor
bool Initialise(std::string configfile,
DataModel& data); ///< Initialise Function for setting up Tool resources. @param
///< configfile The path and name of the dynamic configuration file
///< to read in. @param data A reference to the transient data
///< class used to pass information between Tools.
bool Execute(); ///< Execute function used to perform Tool purpose.
bool Finalise(); ///< Finalise funciton used to clean up resources.

private:
WCSimPhysicsListFactory * m_p_phys_factory;
G4UImanager* m_p_UI;
public:

HKG4PhysicsList(); ///< Simple constructor
bool Initialise(
std::string configfile,
DataModel& data); ///< Initialise Function for setting up Tool resources. @param
///< configfile The path and name of the dynamic configuration file
///< to read in. @param data A reference to the transient data
///< class used to pass information between Tools.
bool Execute(); ///< Execute function used to perform Tool purpose.
bool Finalise(); ///< Finalise funciton used to clean up resources.

private:

WCSimPhysicsListFactory* m_p_phys_factory;
G4UImanager* m_p_UI;
};
} // namespace G4
} // namespace Ghost
} // namespace HK
} // namespace G4
} // namespace Ghost
} // namespace HK

#endif
6 changes: 4 additions & 2 deletions HKG4PrimaryGeneratorAction/HKG4PrimaryGeneratorAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "WCSimPrimaryGeneratorAction.hh"

using namespace HK::Ghost::G4;
using namespace HK::Ghost::G4;

HKG4PrimaryGeneratorAction::HKG4PrimaryGeneratorAction() : Tool() {}

Expand All @@ -18,7 +18,9 @@ bool HKG4PrimaryGeneratorAction::Initialise(std::string configfile, DataModel& d
if(!m_variables.Get("verbose", m_verbose))
m_verbose = 1;

m_data->m_p_run_manager->SetUserAction(new WCSimPrimaryGeneratorAction(static_cast<const WCSimDetectorConstruction*>(m_data->m_p_run_manager->GetUserDetectorConstruction())));
m_data->m_p_run_manager->SetUserAction(
new WCSimPrimaryGeneratorAction(static_cast<const WCSimDetectorConstruction*>(
m_data->m_p_run_manager->GetUserDetectorConstruction())));

return true;
}
Expand Down
31 changes: 16 additions & 15 deletions HKG4PrimaryGeneratorAction/HKG4PrimaryGeneratorAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,22 @@ namespace HK {
namespace G4 {
class HKG4PrimaryGeneratorAction : public Tool {

public:

HKG4PrimaryGeneratorAction(); ///< Simple constructor
bool Initialise(std::string configfile,
DataModel& data); ///< Initialise Function for setting up Tool resources. @param
///< configfile The path and name of the dynamic configuration file
///< to read in. @param data A reference to the transient data
///< class used to pass information between Tools.
bool Execute(); ///< Execute function used to perform Tool purpose.
bool Finalise(); ///< Finalise funciton used to clean up resources.

private:
public:

HKG4PrimaryGeneratorAction(); ///< Simple constructor
bool Initialise(
std::string configfile,
DataModel& data); ///< Initialise Function for setting up Tool resources. @param
///< configfile The path and name of the dynamic configuration file
///< to read in. @param data A reference to the transient data
///< class used to pass information between Tools.
bool Execute(); ///< Execute function used to perform Tool purpose.
bool Finalise(); ///< Finalise funciton used to clean up resources.

private:
};
} // namespace G4
} // namespace Ghost
} // namespace HK
} // namespace G4
} // namespace Ghost
} // namespace HK

#endif
7 changes: 4 additions & 3 deletions HKG4RunAction/HKG4RunAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "WCSimRandomParameters.hh"
#include "WCSimRunAction.hh"

using namespace HK::Ghost::G4;
using namespace HK::Ghost::G4;

HKG4RunAction::HKG4RunAction() : Tool() {}

Expand All @@ -22,8 +22,9 @@ bool HKG4RunAction::Initialise(std::string configfile, DataModel& data) {
// define random number generator parameters
WCSimRandomParameters* randomparameters = new WCSimRandomParameters();

WCSimRunAction* myRunAction = new WCSimRunAction(static_cast<const WCSimDetectorConstruction *>(m_data->m_p_run_manager->GetUserDetectorConstruction()),
randomparameters);
WCSimRunAction* myRunAction = new WCSimRunAction(
static_cast<const WCSimDetectorConstruction*>(m_data->m_p_run_manager->GetUserDetectorConstruction()),
randomparameters);
m_data->m_p_run_manager->SetUserAction(myRunAction);

return true;
Expand Down
31 changes: 16 additions & 15 deletions HKG4RunAction/HKG4RunAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,22 @@ namespace HK {
namespace G4 {
class HKG4RunAction : public Tool {

public:

HKG4RunAction(); ///< Simple constructor
bool Initialise(std::string configfile,
DataModel& data); ///< Initialise Function for setting up Tool resources. @param
///< configfile The path and name of the dynamic configuration file
///< to read in. @param data A reference to the transient data
///< class used to pass information between Tools.
bool Execute(); ///< Execute function used to perform Tool purpose.
bool Finalise(); ///< Finalise funciton used to clean up resources.

private:
public:

HKG4RunAction(); ///< Simple constructor
bool Initialise(
std::string configfile,
DataModel& data); ///< Initialise Function for setting up Tool resources. @param
///< configfile The path and name of the dynamic configuration file
///< to read in. @param data A reference to the transient data
///< class used to pass information between Tools.
bool Execute(); ///< Execute function used to perform Tool purpose.
bool Finalise(); ///< Finalise funciton used to clean up resources.

private:
};
} // namespace G4
} // namespace Ghost
} // namespace HK
} // namespace G4
} // namespace Ghost
} // namespace HK

#endif
4 changes: 3 additions & 1 deletion HKG4StackingAction/HKG4StackingAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ bool HKG4StackingAction::Initialise(std::string configfile, DataModel& data) {
m_verbose = 1;

m_p_UI = G4UImanager::GetUIpointer();
m_data->m_p_run_manager->SetUserAction(new WCSimStackingAction(static_cast<const WCSimDetectorConstruction*>(m_data->m_p_run_manager->GetUserDetectorConstruction())));
m_data->m_p_run_manager->SetUserAction(
new WCSimStackingAction(static_cast<const WCSimDetectorConstruction*>(
m_data->m_p_run_manager->GetUserDetectorConstruction())));

return true;
}
Expand Down
34 changes: 18 additions & 16 deletions HKG4StackingAction/HKG4StackingAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,23 @@ namespace HK {
namespace G4 {
class HKG4StackingAction : public Tool {

public:

HKG4StackingAction(); ///< Simple constructor
bool Initialise(std::string configfile,
DataModel& data); ///< Initialise Function for setting up Tool resources. @param
///< configfile The path and name of the dynamic configuration file
///< to read in. @param data A reference to the transient data
///< class used to pass information between Tools.
bool Execute(); ///< Execute function used to perform Tool purpose.
bool Finalise(); ///< Finalise funciton used to clean up resources.

private:
G4UImanager* m_p_UI;
public:

HKG4StackingAction(); ///< Simple constructor
bool Initialise(
std::string configfile,
DataModel& data); ///< Initialise Function for setting up Tool resources. @param
///< configfile The path and name of the dynamic configuration file
///< to read in. @param data A reference to the transient data
///< class used to pass information between Tools.
bool Execute(); ///< Execute function used to perform Tool purpose.
bool Finalise(); ///< Finalise funciton used to clean up resources.

private:

G4UImanager* m_p_UI;
};
} // namespace G4
} // namespace Ghost
} // namespace HK
} // namespace G4
} // namespace Ghost
} // namespace HK
#endif
5 changes: 4 additions & 1 deletion HKG4SteppingAction/HKG4SteppingAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ bool HKG4SteppingAction::Initialise(std::string configfile, DataModel& data) {
if(!m_variables.Get("verbose", m_verbose))
m_verbose = 1;

m_data->m_p_run_manager->SetUserAction(new WCSimSteppingAction(static_cast<const WCSimRunAction*>(m_data->m_p_run_manager->GetUserRunAction()), static_cast<const WCSimDetectorConstruction*>(m_data->m_p_run_manager->GetUserDetectorConstruction())));
m_data->m_p_run_manager->SetUserAction(new WCSimSteppingAction(
static_cast<const WCSimRunAction*>(m_data->m_p_run_manager->GetUserRunAction()),
static_cast<const WCSimDetectorConstruction*>(
m_data->m_p_run_manager->GetUserDetectorConstruction())));

return true;
}
Expand Down
31 changes: 16 additions & 15 deletions HKG4SteppingAction/HKG4SteppingAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,22 @@ namespace HK {
namespace G4 {
class HKG4SteppingAction : public Tool {

public:

HKG4SteppingAction(); ///< Simple constructor
bool Initialise(std::string configfile,
DataModel& data); ///< Initialise Function for setting up Tool resources. @param
///< configfile The path and name of the dynamic configuration file
///< to read in. @param data A reference to the transient data
///< class used to pass information between Tools.
bool Execute(); ///< Execute function used to perform Tool purpose.
bool Finalise(); ///< Finalise funciton used to clean up resources.

private:
public:

HKG4SteppingAction(); ///< Simple constructor
bool Initialise(
std::string configfile,
DataModel& data); ///< Initialise Function for setting up Tool resources. @param
///< configfile The path and name of the dynamic configuration file
///< to read in. @param data A reference to the transient data
///< class used to pass information between Tools.
bool Execute(); ///< Execute function used to perform Tool purpose.
bool Finalise(); ///< Finalise funciton used to clean up resources.

private:
};
} // namespace G4
} // namespace Ghost
} // namespace HK
} // namespace G4
} // namespace Ghost
} // namespace HK

#endif
Loading

0 comments on commit 52d195e

Please sign in to comment.