Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.

Commit 55704b0

Browse files
EinarElentomeichlersmith
authored andcommitted
Pure clang-format
1 parent 9ca9ab6 commit 55704b0

17 files changed

Lines changed: 82 additions & 66 deletions

include/SimCore/Generators/GeneralParticleSource.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ class GeneralParticleSource : public simcore::PrimaryGenerator {
3737
* Parameters:
3838
* initCommands : vector of Geant4 strings to initialize the GPS
3939
*/
40-
GeneralParticleSource(const std::string& name, const framework::config::Parameters& parameters);
40+
GeneralParticleSource(const std::string& name,
41+
const framework::config::Parameters& parameters);
4142

4243
/// Destructor
4344
virtual ~GeneralParticleSource() = default;
@@ -64,7 +65,7 @@ class GeneralParticleSource : public simcore::PrimaryGenerator {
6465

6566
}; // GeneralParticleSource
6667

67-
} // namesapce generators
68+
} // namespace generators
6869
} // namespace simcore
6970

7071
#endif // SIMCORE_GENERALPARTICLESOURCE_H

include/SimCore/Generators/LHEPrimaryGenerator.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ class LHEPrimaryGenerator : public simcore::PrimaryGenerator {
2727
* Class constructor.
2828
* @param reader The LHE reader with the event data.
2929
*/
30-
LHEPrimaryGenerator(const std::string& name, const framework::config::Parameters& parameters);
30+
LHEPrimaryGenerator(const std::string& name,
31+
const framework::config::Parameters& parameters);
3132

3233
/**
3334
* Class destructor.

include/SimCore/Generators/ParticleGun.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* @author Omar Moreno, SLAC National Accelerator Laboratory
55
* @author Tom Eichlersmith, University of Minnesota
66
*/
7-
87
#ifndef SIMCORE_PARTICLE_GUN_H
98
#define SIMCORE_PARTICLE_GUN_H
109

@@ -43,7 +42,8 @@ class ParticleGun : public simcore::PrimaryGenerator {
4342
* time : time to shoot at (ns)
4443
* direction: direction to shoot in (unitless three-vector)
4544
*/
46-
ParticleGun(const std::string& name, const framework::config::Parameters& parameters);
45+
ParticleGun(const std::string& name,
46+
const framework::config::Parameters& parameters);
4747

4848
/// Destructor
4949
virtual ~ParticleGun() = default;

include/SimCore/Generators/RootSimFromEcalSP.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ class RootSimFromEcalSP : public PrimaryGenerator {
5656
* collection for Ecal Scoring Plane hits ecalSPHitsPassName : name of pass
5757
* for Ecal Scoring Plane hits
5858
*/
59-
RootSimFromEcalSP(const std::string& name, const framework::config::Parameters& parameters);
59+
RootSimFromEcalSP(const std::string& name,
60+
const framework::config::Parameters& parameters);
6061

6162
/**
6263
* Class destructor.

include/SimCore/LHE/LHEParticle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,6 @@ class LHEParticle {
137137
int spinup_;
138138
};
139139

140-
} // namespace simcore
140+
} // namespace simcore::lhe
141141

142142
#endif

include/SimCore/TrackMap.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
// LDMX
1212
#include "SimCore/Event/SimParticle.h"
13-
#include "SimCore/UserTrackInformation.h"
1413
#include "SimCore/UserPrimaryParticleInformation.h"
14+
#include "SimCore/UserTrackInformation.h"
1515

1616
namespace simcore {
1717

@@ -92,9 +92,7 @@ class TrackMap {
9292
/**
9393
* Get the map of particles to be stored in output event.
9494
*/
95-
std::map<int,ldmx::SimParticle> &getParticleMap() {
96-
return particle_map_;
97-
}
95+
std::map<int, ldmx::SimParticle>& getParticleMap() { return particle_map_; }
9896

9997
private:
10098
/**
@@ -125,13 +123,13 @@ class TrackMap {
125123
* @see isInCalorimeterRegion for how we check if a track
126124
* originated in the calorimeter region.
127125
*/
128-
std::unordered_map<int,std::pair<int,bool>> ancestry_;
126+
std::unordered_map<int, std::pair<int, bool>> ancestry_;
129127

130128
/// descendents map of particles in event (parent -> children)
131-
std::unordered_map<int,std::vector<int>> descendents_;
129+
std::unordered_map<int, std::vector<int>> descendents_;
132130

133131
/// map of SimParticles that will be stored
134-
std::map<int,ldmx::SimParticle> particle_map_;
132+
std::map<int, ldmx::SimParticle> particle_map_;
135133
};
136134

137135
} // namespace simcore

include/SimCore/UserAction.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
/* Framework */
2121
/*~~~~~~~~~~~~~~~*/
2222
#include "Framework/Configure/Parameters.h"
23-
#include "SimCore/UserEventInformation.h"
2423
#include "SimCore/Event/SimParticle.h"
2524
#include "SimCore/Factory.h"
25+
#include "SimCore/UserEventInformation.h"
2626

2727
// Forward Declarations
2828
class G4Event;
@@ -50,10 +50,9 @@ class UserAction {
5050
framework::config::Parameters& parameters);
5151

5252
/// factory for user actions
53-
using Factory = ::simcore::Factory<UserAction,
54-
std::shared_ptr<UserAction>,
55-
const std::string&,
56-
framework::config::Parameters&>;
53+
using Factory =
54+
::simcore::Factory<UserAction, std::shared_ptr<UserAction>,
55+
const std::string&, framework::config::Parameters&>;
5756

5857
/// Destructor
5958
virtual ~UserAction() = default;
@@ -175,7 +174,7 @@ class UserAction {
175174
* already fully processed and chosen to be saved. The ancestry
176175
* of the particles will not have been traced yet.
177176
*/
178-
const std::map<int,ldmx::SimParticle>& getCurrentParticleMap() const;
177+
const std::map<int, ldmx::SimParticle>& getCurrentParticleMap() const;
179178

180179
protected:
181180
/// Name of the UserAction

include/SimCore/UserEventInformation.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#define SIMCORE_USEREVENTINFORMATION_H
33

44
#include "G4VUserEventInformation.hh"
5-
65
namespace simcore {
76

87
/**

src/SimCore/Generators/GeneralParticleSource.cxx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@
2020
namespace simcore {
2121
namespace generators {
2222

23-
GeneralParticleSource::GeneralParticleSource(const std::string& name,
24-
const framework::config::Parameters& parameters)
23+
GeneralParticleSource::GeneralParticleSource(
24+
const std::string& name, const framework::config::Parameters& parameters)
2525
: PrimaryGenerator(name, parameters) {
26-
init_commands_ = parameters.getParameter<std::vector<std::string>>("initCommands");
26+
init_commands_ =
27+
parameters.getParameter<std::vector<std::string>>("initCommands");
2728
for (const auto& cmd : init_commands_) {
2829
int g4Ret = G4UImanager::GetUIpointer()->ApplyCommand(cmd);
2930
if (g4Ret > 0) {
@@ -41,11 +42,14 @@ void GeneralParticleSource::GeneratePrimaryVertex(G4Event* event) {
4142
return;
4243
}
4344

44-
void GeneralParticleSource::RecordConfig(const std::string& id, ldmx::RunHeader& rh) {
45-
rh.setStringParameter(id+" Class", "simcore::generators::GeneralParticleSource");
46-
std::string init_prefix{id+" Init Cmd "};
45+
void GeneralParticleSource::RecordConfig(const std::string& id,
46+
ldmx::RunHeader& rh) {
47+
rh.setStringParameter(id + " Class",
48+
"simcore::generators::GeneralParticleSource");
49+
std::string init_prefix{id + " Init Cmd "};
4750
for (std::size_t i{0}; i < init_commands_.size(); i++) {
48-
rh.setStringParameter(init_prefix+std::to_string(i), init_commands_.at(i));
51+
rh.setStringParameter(init_prefix + std::to_string(i),
52+
init_commands_.at(i));
4953
}
5054
}
5155

src/SimCore/Generators/LHEPrimaryGenerator.cxx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
namespace simcore {
2323
namespace generators {
2424

25-
LHEPrimaryGenerator::LHEPrimaryGenerator(const std::string& name,
26-
const framework::config::Parameters& parameters)
25+
LHEPrimaryGenerator::LHEPrimaryGenerator(
26+
const std::string& name, const framework::config::Parameters& parameters)
2727
: PrimaryGenerator(name, parameters) {
2828
file_path_ = parameters.getParameter<std::string>("filePath");
2929
reader_ = new simcore::lhe::LHEReader(file_path_);
@@ -43,9 +43,9 @@ void LHEPrimaryGenerator::GeneratePrimaryVertex(G4Event* anEvent) {
4343
std::map<simcore::lhe::LHEParticle*, G4PrimaryParticle*> particleMap;
4444

4545
int particleIndex = 0;
46-
const std::vector<simcore::lhe::LHEParticle*>& particles = lheEvent->getParticles();
47-
for (auto it = particles.begin();
48-
it != particles.end(); it++) {
46+
const std::vector<simcore::lhe::LHEParticle*>& particles =
47+
lheEvent->getParticles();
48+
for (auto it = particles.begin(); it != particles.end(); it++) {
4949
simcore::lhe::LHEParticle* particle = (*it);
5050

5151
if (particle->getISTUP() > 0) {
@@ -106,9 +106,11 @@ void LHEPrimaryGenerator::GeneratePrimaryVertex(G4Event* anEvent) {
106106
delete lheEvent;
107107
}
108108

109-
void LHEPrimaryGenerator::RecordConfig(const std::string& id, ldmx::RunHeader& rh) {
110-
rh.setStringParameter(id+" Class", "simcore::generators::LHEPrimaryGenerator");
111-
rh.setStringParameter(id+" LHE File", file_path_);
109+
void LHEPrimaryGenerator::RecordConfig(const std::string& id,
110+
ldmx::RunHeader& rh) {
111+
rh.setStringParameter(id + " Class",
112+
"simcore::generators::LHEPrimaryGenerator");
113+
rh.setStringParameter(id + " LHE File", file_path_);
112114
}
113115

114116
} // namespace generators

0 commit comments

Comments
 (0)