Belle II Software development
SensitiveDetectorBase.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 <simulation/kernel/SensitiveDetectorBase.h>
10#include <framework/logging/Logger.h>
11
12using namespace std;
13namespace Belle2 {
18 namespace Simulation {
20 map<string, RelationArray::EConsolidationAction> SensitiveDetectorBase::s_mcRelations;
21
23 {
24 std::pair<std::map<std::string, RelationArray::EConsolidationAction>::iterator, bool> insert = s_mcRelations.insert(std::make_pair(
25 name, ignoreAction));
26 //If the relation already exists and the ignoreAction is different we do have a problem
27 if (!insert.second && insert.first->second != ignoreAction) {
28 B2FATAL("MCParticle Relation " << name << " already registered with different ignore action.");
29 }
30 }
31 }
33}
EConsolidationAction
Modification actions for the consolidate member.
Definition: RelationArray.h:77
static std::map< std::string, RelationArray::EConsolidationAction > s_mcRelations
Static set holding all relations which have to be updated at the end of the Event.
static void registerMCParticleRelation(const std::string &name, RelationArray::EConsolidationAction ignoreAction=RelationArray::c_negativeWeight)
Register an relation involving MCParticles.
static bool s_active
Static bool which indicates wether recording of hits is enabled.
Abstract base class for different kinds of events.
STL namespace.