Belle II Software
development
VariableExtractor.h
1
/**************************************************************************
2
* basf2 (Belle II Analysis Software Framework) *
3
* Author: The Belle II Collaboration *
4
* *
5
* See git log for contributors and copyright holders. *
6
* This file is licensed under LGPL-3.0, see LICENSE.md. *
7
**************************************************************************/
8
9
#pragma once
10
11
#include <tracking/trackingUtilities/utilities/Named.h>
12
13
#include <vector>
14
#include <string>
15
#include <unordered_map>
16
#include <cmath>
17
18
19
namespace
Belle2
{
25
class
VariableExtractor
{
26
public
:
27
28
protected
:
30
void
addVariable
(
const
std::string& identifier, std::vector<
TrackingUtilities::Named<float*>
>& variables)
31
{
32
//todo: verify if it is faster to check explicitly or not
33
auto
value =
m_variables
.emplace(identifier, NAN).first;
34
variables.emplace_back(identifier, &(value->second));
35
}
36
38
std::unordered_map<std::string, float>
m_variables
;
39
};
40
41
}
Belle2::TrackingUtilities::Named
A mixin class to attach a name to an object.
Definition
Named.h:23
Belle2::VariableExtractor
class to extract individual variables
Definition
VariableExtractor.h:25
Belle2::VariableExtractor::m_variables
std::unordered_map< std::string, float > m_variables
unordered_map to associate float value with a string name
Definition
VariableExtractor.h:38
Belle2::VariableExtractor::addVariable
void addVariable(const std::string &identifier, std::vector< TrackingUtilities::Named< float * > > &variables)
add a variable to the variable set
Definition
VariableExtractor.h:30
Belle2
Abstract base class for different kinds of events.
Definition
MillepedeAlgorithm.h:17
tracking
trackFindingVXD
variableExtractors
include
VariableExtractor.h
Generated on Thu Jan 8 2026 02:59:59 for Belle II Software by
1.13.2