Belle II Software light-2406-ragdoll
FlavorTaggerInfo.cc
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#include <analysis/dataobjects/FlavorTaggerInfo.h>
10#include <framework/datastore/StoreArray.h>
11
12#include <framework/logging/Logger.h>
13
14using namespace Belle2;
15
16/************************SETTER***********************/
17
18void FlavorTaggerInfo::addMethodMap(const std::string& method)
19{
21 if (m_methodMap.find(method) == m_methodMap.end()) {
22 // create FlavorTaggerInfoMap object
23
24 FlavorTaggerInfoMap* flavTagMap = flavTagInfoMap.appendNew();
25 m_methodMap.insert(std::pair<std::string, FlavorTaggerInfoMap*>(method, flavTagMap));
26
27 } else {
28 B2INFO("Method " << method << " already added. ");
29 }
30}
31
32/************************GETTER***********************/
33
34FlavorTaggerInfoMap* FlavorTaggerInfo::getMethodMap(const std::string& method) const
35{
36 auto it = m_methodMap.find(method);
37 if (it == m_methodMap.end()) {
38 B2FATAL("Method " << method << " does not exist in the FlavorTaggerInfoMap. Please add it before to combinerMethods.");
39 } else {
40 return it->second;
41 }
42}
This class stores the Flavor Tagger information for a specific method and particle filled in the Flav...
std::map< std::string, FlavorTaggerInfoMap * > m_methodMap
Map containing the methods used for the FlavorTagger: "TMVA" or "FANN", and the corresponding map.
FlavorTaggerInfoMap * getMethodMap(const std::string &method) const
method used for the FlavorTagger and corresponding FlavorTaggerInfoMap
void addMethodMap(const std::string &method)
Saves the method and the corresponding FlavorTaggerMap.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
T * appendNew()
Construct a new T object at the end of the array.
Definition: StoreArray.h:246
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24