CbmRoot
Loading...
Searching...
No Matches
DigiTriggerConfig.h
Go to the documentation of this file.
1/* Copyright (C) 2021 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese [committer] */
4
5#ifndef CBM_ALGO_EVBUILD_DIGITRIGGERCONFIG_H
6#define CBM_ALGO_EVBUILD_DIGITRIGGERCONFIG_H 1
7
8#include "CbmDefs.h"
9
10#include <map>
11
12#include <yaml-cpp/yaml.h>
13
14
15namespace cbm::algo::evbuild
16{
17
24
25 public:
32 DigiTriggerConfig(ECbmModuleId detector, double window, size_t threshold, double deadTime)
33 : fDetector(detector)
34 , fWindow(window)
35 , fThreshold(threshold)
36 , fDeadTime(deadTime)
37 , fIsSet(true)
38 {
39 }
40
42 DigiTriggerConfig(YAML::Node config);
43
45 ~DigiTriggerConfig() = default;
46
48 double DeadTime() const { return fDeadTime; }
49
51 ECbmModuleId Detector() const { return fDetector; }
52
54 bool IsSet() const { return fIsSet; }
55
57 size_t Threshold() const { return fThreshold; }
58
60 YAML::Node ToYaml() const;
61
63 double Window() const { return fWindow; }
64
65
66 private:
68 double fWindow;
69 size_t fThreshold;
70 double fDeadTime;
71 bool fIsSet{false};
72 };
73
74
75} // namespace cbm::algo::evbuild
76
77#endif /* CBM_ALGO_EVBUILD_DIGITRIGGERCONFIG_H */
ECbmModuleId
Definition CbmDefs.h:39
Configuration of the digi trigger class (TimeClusterTrigger)
double Window() const
Trigger window.
size_t Threshold() const
Trigger threshold.
DigiTriggerConfig(ECbmModuleId detector, double window, size_t threshold, double deadTime)
Constructor with parameters.
double fDeadTime
Minimal time between two trigger [ns].
double DeadTime() const
Trigger dead time.
bool fIsSet
Flag config being properly set.
YAML::Node ToYaml() const
Save to YAML.
ECbmModuleId fDetector
Trigger detector.
ECbmModuleId Detector() const
Trigger detector.
bool IsSet() const
Check whether config was set.
size_t fThreshold
Minimum number if digis in trigger window.
double fWindow
Trigger window size [ns].
~DigiTriggerConfig()=default
Destructor.