MaCh3  2.6.0
Reference Guide
Classes | Public Member Functions | Public Attributes | List of all members
M3::detail::Functional Struct Reference

Helper object for storing/updating information related to functional shift parameters. More...

#include <Samples/SampleHandlerFunctional.h>

Collaboration diagram for M3::detail::Functional:
[legend]

Classes

struct  Shift
 

Public Member Functions

void update_vals ()
 

Public Attributes

std::vector< Shiftshifts
 
std::vector< std::vector< int > > event_shifts
 

Detailed Description

Helper object for storing/updating information related to functional shift parameters.

Author
Luke Pickering

For each shift (which may consume multiple parameters) this class stores the function that applies the shift to a given event index given the current vector of parameter values (Functional::Shift::apply), which is supplied by the an experiment sample calling RegisterIndividualFunctionalParameter. It also stores the last parameter values for all parameters consumed by a given shift (Functional::Shift::par_vals) and a function that will get the current parameter values from the ParHandler object (Functional::Shift::update_vals). For each event managed by the SampleHandlerBase instance, a vector of indexes of functional shifts that are applicable is stored (Functional::event_shifts). i.e. to iterate over the relevant Functional::Shift instance for event ev_it you might do for(auto & fs_it : functional.event_shifts[ev_it]){ // do something with functional.shifts[fs_it] } functional.update_vals() will update the current parameter values for all registered shifts.

Definition at line 30 of file SampleHandlerFunctional.h.

Member Function Documentation

◆ update_vals()

void M3::detail::Functional::update_vals ( )
inline

Definition at line 37 of file SampleHandlerFunctional.h.

37  {
38  for (auto &shift : shifts) {
39  shift.update_vals(shift.par_vals);
40  }
41  }
std::vector< Shift > shifts

Member Data Documentation

◆ event_shifts

std::vector<std::vector<int> > M3::detail::Functional::event_shifts

Definition at line 42 of file SampleHandlerFunctional.h.

◆ shifts

std::vector<Shift> M3::detail::Functional::shifts

Definition at line 36 of file SampleHandlerFunctional.h.


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