File tree Expand file tree Collapse file tree 4 files changed +35
-5
lines changed
physics/InclusiveKinematics Expand file tree Collapse file tree 4 files changed +35
-5
lines changed Original file line number Diff line number Diff line change @@ -251,6 +251,15 @@ namespace iguana {
251
251
252
252
// /////////////////////////////////////////////////////////////////////////////
253
253
254
+ hipo::bank Algorithm::CreateBank (std::string const & bank_name) const noexcept (false ) {
255
+ hipo::banklist new_banks;
256
+ hipo::banklist::size_type new_bank_idx;
257
+ CreateBank (new_banks, new_bank_idx, bank_name);
258
+ return new_banks.at (0 );
259
+ }
260
+
261
+ // /////////////////////////////////////////////////////////////////////////////
262
+
254
263
void Algorithm::ShowBanks (hipo::banklist& banks, std::string_view message, Logger::Level const level) const
255
264
{
256
265
if (m_log->GetLevel () <= level) {
Original file line number Diff line number Diff line change @@ -164,6 +164,11 @@ namespace iguana {
164
164
hipo::banklist::size_type& bank_idx,
165
165
std::string const & bank_name) const noexcept (false );
166
166
167
+ // / Create a new bank. The bank must be defined in `src/iguana/bankdefs/iguana.json`.
168
+ // / @param [in] bank_name the new bank name
169
+ // / @returns the new bank
170
+ hipo::bank CreateBank (std::string const & bank_name) const noexcept (false );
171
+
167
172
// / Dump all banks in a `hipo::banklist`
168
173
// / @param banks the banks to show
169
174
// / @param message if specified, print a header message
Original file line number Diff line number Diff line change @@ -76,9 +76,17 @@ namespace iguana::physics {
76
76
77
77
void InclusiveKinematics::Run (hipo::banklist& banks) const
78
78
{
79
- auto & particle_bank = GetBank (banks, b_particle, " REC::Particle" );
80
- auto & config_bank = GetBank (banks, b_config, " RUN::config" );
81
- auto & result_bank = GetBank (banks, b_result, GetClassName ());
79
+ Run (
80
+ GetBank (banks, b_particle, " REC::Particle" ),
81
+ GetBank (banks, b_config, " RUN::config" ),
82
+ GetBank (banks, b_result, GetClassName ()));
83
+ }
84
+
85
+ void InclusiveKinematics::Run (
86
+ hipo::bank& particle_bank,
87
+ hipo::bank& config_bank,
88
+ hipo::bank& result_bank) const
89
+ {
82
90
ShowBank (particle_bank, Logger::Header (" INPUT PARTICLES" ));
83
91
84
92
auto key = PrepareEvent (config_bank.getInt (" run" ,0 ));
Original file line number Diff line number Diff line change @@ -10,8 +10,7 @@ namespace iguana::physics {
10
10
// / @brief_algo Calculate inclusive kinematics quantities
11
11
// /
12
12
// / @begin_doc_algo{physics::InclusiveKinematics | Creator}
13
- // / @input_banks{REC::Particle, RUN::config}
14
- // / @output_banks{%physics::InclusiveKinematics}
13
+ // / see this algorithm's Run function(s) for the input and output bank names
15
14
// / @end_doc
16
15
// /
17
16
// / @begin_doc_config{physics/InclusiveKinematics}
@@ -34,6 +33,15 @@ namespace iguana::physics {
34
33
void Run (hipo::banklist& banks) const override ;
35
34
void Stop () override ;
36
35
36
+ // / run function
37
+ // / @param [in] particle_bank `REC::Particle`
38
+ // / @param [in] config_bank `RUN::config`
39
+ // / @param [out] result_bank `%physics::InclusiveKinematics`
40
+ void Run (
41
+ hipo::bank& particle_bank,
42
+ hipo::bank& config_bank,
43
+ hipo::bank& result_bank) const ;
44
+
37
45
// / @action_function{reload} prepare the event
38
46
// / @when_to_call{for each event}
39
47
// / @param runnum the run number
You can’t perform that action at this time.
0 commit comments