Belle II Software development
CDCWireHitVarSet.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#pragma once
9
10#include <tracking/trackingUtilities/varsets/VarSet.h>
11#include <tracking/trackingUtilities/varsets/VarNames.h>
12#include <tracking/trackingUtilities/varsets/FixedSizeNamedFloatTuple.h>
13
14namespace Belle2 {
19 namespace TrackingUtilities {
20 class CDCWireHit;
21 }
22
23 namespace TrackFindingCDC {
24
26 constexpr
27 static char const* const cdcWireHitVarNames[] = {
28 "adc",
29 "tot",
30 "tdc",
31 "slayer",
32 };
33
35 class CDCWireHitVarNames : public TrackingUtilities::VarNames<TrackingUtilities::CDCWireHit> {
36
37 public:
39 // we shouldn't use public member variables but we do want to rewrite all related code using setters/getters
40 // at least tell cppcheck that everything is fine
41 // cppcheck-suppress duplInheritedMember
42 static const size_t nVars = TrackingUtilities::size(cdcWireHitVarNames);
43
45 constexpr
46 static char const* getName(int iName)
47 {
48 return cdcWireHitVarNames[iName];
49 }
50 };
51
56 class CDCWireHitVarSet : public TrackingUtilities::VarSet<CDCWireHitVarNames> {
59
60 public:
61 CDCWireHitVarSet();
62
63 void initialize() override;
64
66 bool extract(const TrackingUtilities::CDCWireHit* object) final;
67
68 private:
69 };
70 }
72}
Vehicle class to transport the variable names.
static const size_t nVars
Number of variables to be generated.
static constexpr char const * getName(int iName)
Get the name of the column.
void initialize() override
Receive signal before the start of the event processing.
bool extract(const TrackingUtilities::CDCWireHit *object) final
Generate and assign the variables from the object.
TrackingUtilities::VarSet< CDCWireHitVarNames > Super
Type of the base class.
Class representing a hit wire in the central drift chamber.
Definition CDCWireHit.h:58
Class that specifies the names of the variables.
Definition VarNames.h:21
Generic class that generates some named float values from a given object.
Definition VarSet.h:36
Abstract base class for different kinds of events.