Iguana 1.2.0
Implementation Guardian of Analysis Algorithms
Loading...
Searching...
No Matches
iguana::Keysmith< Ts > Class Template Reference

#include <ConcurrentParam.h>

Detailed Description

template<typename... Ts>
class iguana::Keysmith< Ts >

key generation for ConcurrentParam objects

Definition at line 157 of file ConcurrentParam.h.

Public Member Functions

 Keysmith ()
 constructor
concurrent_key_t MakeKey (Ts const &... args)
 make a new key

Constructor & Destructor Documentation

◆ Keysmith()

template<typename... Ts>
iguana::Keysmith< Ts >::Keysmith ( )
inline

constructor

The key-generation function will be set depending on the GlobalConcurrencyModel

  • if it's "single", the key generation function will just return 0
  • otherwise it will be a hash function, with parameter types set by your template type arguments

For example, to instantiate a Keysmith to make keys based on an int run number and float torus:

// instantiate with template type arguments `int`,`float`
auto keysmith = std::make_unique<Keysmith<int,float>>();
// when you want to make a key (e.g., in an algorithm's action function), feed the `int run_num` and `float torus` to `MakeKey`
auto key = keysmith->MakeKey(run_number, torus);

Definition at line 176 of file ConcurrentParam.h.

Member Function Documentation

◆ MakeKey()

template<typename... Ts>
concurrent_key_t iguana::Keysmith< Ts >::MakeKey ( Ts const &... args)
inline

make a new key

Parameters
argsthe key generation arguments (see Keysmith::Keysmith for details)
Returns
the generated key

Definition at line 194 of file ConcurrentParam.h.


The documentation for this class was generated from the following file: