Belle II Software development
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 <analysis/dataobjects/FlavorTaggerInfoMap.h>
11#include <framework/datastore/StoreArray.h>
12
13#include <framework/logging/Logger.h>
14
15using namespace Belle2;
16
17/************************SETTER***********************/
18
19void FlavorTaggerInfo::addMethodMap(const std::string& method)
20{
22 if (m_methodMap.find(method) == m_methodMap.end()) {
23 // create FlavorTaggerInfoMap object
24
25 FlavorTaggerInfoMap* flavTagMap = flavTagInfoMap.appendNew();
26 m_methodMap.insert(std::pair<std::string, FlavorTaggerInfoMap*>(method, flavTagMap));
27
28 } else {
29 B2INFO("Method " << method << " already added. ");
30 }
31}
32
33/************************GETTER***********************/
34
35FlavorTaggerInfoMap* FlavorTaggerInfo::getMethodMap(const std::string& method) const
36{
37 auto it = m_methodMap.find(method);
38 if (it == m_methodMap.end()) {
39 B2FATAL("Method " << method << " does not exist in the FlavorTaggerInfoMap. Please add it before to combinerMethods.");
40 } else {
41 return it->second;
42 }
43}
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.