Belle II Software development
VariablesToEventExtraInfoModule.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 <framework/core/Module.h>
12#include <framework/datastore/StoreObjPtr.h>
13
14#include <framework/dataobjects/EventExtraInfo.h>
15#include <analysis/dataobjects/Particle.h>
16#include <analysis/dataobjects/ParticleList.h>
17#include <analysis/VariableManager/Manager.h>
18
19#include <string>
20#include <map>
21#include <vector>
22
23namespace Belle2 {
28 class Particle;
29
35 public:
36
41 virtual ~VariablesToEventExtraInfoModule() override;
42
44 virtual void initialize() override;
46 virtual void event() override;
47
48 private:
50 std::string m_inputListName;
56 std::map<std::string, std::string> m_variables;
58 std::vector<Variable::Manager::FunctionPtr> m_functions;
60 std::vector<std::string> m_extraInfoNames;
61
63 int m_overwrite = 0;
64
69 void addEventExtraInfo(const Particle* source);
70
71 };
72
74} // Belle2 namespace
Base class for Modules.
Definition: Module.h:72
Class to store reconstructed particles.
Definition: Particle.h:75
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
For each particle in the input list the selected variables are saved in an event-extra-info field wit...
void addEventExtraInfo(const Particle *source)
Adds extra info to the event.
virtual void event() override
process event: actually adds the extra info
StoreObjPtr< ParticleList > m_inputList
input particle list
int m_overwrite
-1/0/1/2: Overwrite if lower / don't overwrite / overwrite if higher / always overwrite,...
std::vector< Variable::Manager::FunctionPtr > m_functions
Vector of function pointers corresponding to given variables.
std::map< std::string, std::string > m_variables
Map of variables and extraInfo names to save in the event-extra-info field.
StoreObjPtr< EventExtraInfo > m_eventExtraInfo
event extra info object pointer
std::vector< std::string > m_extraInfoNames
Vector of extra info names.
std::string m_inputListName
name of input particle list.
Abstract base class for different kinds of events.