CbmRoot
Loading...
Searching...
No Matches
TimeClusterTrigger.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], Dominik Smith */
4
5#ifndef CBM_ALGO_TIMECLUSTERTRIGGER_H
6#define CBM_ALGO_TIMECLUSTERTRIGGER_H 1
7
8#include "Definitions.h"
9#include "DigiTriggerConfig.h"
10
11#include <cstddef>
12#include <cstdint>
13#include <vector>
14
15#include <xpu/host.h>
16
17namespace cbm::algo::evbuild
18{
19
26 size_t numInTrigger = 0;
27 size_t num = 0;
28 size_t nTriggers = 0;
29 xpu::timings time;
30 };
31
44
45 public:
46 typedef std::pair<std::vector<double>, TimeClusterTriggerMonitorData> resultType;
47
53 TimeClusterTrigger(double winSize, u32 minNumData, double deadTime)
54 : fWinSize(winSize)
55 , fMinNumData(minNumData)
56 , fDeadTime(deadTime)
57 {
58 }
59
64 resultType operator()(const std::vector<double>& dataVec) const;
65
67 std::string ToString() const;
68
69
70 private:
71 double fWinSize = 0.;
72 int32_t fMinNumData = 0;
73 double fDeadTime = 0.;
74 };
75
76
77} // namespace cbm::algo::evbuild
78
79#endif /* CBM_ALGO_TIMECLUSTERTRIGGER_H */
Finds clusters in time-series data.
TimeClusterTrigger(double winSize, u32 minNumData, double deadTime)
Constructor.
resultType operator()(const std::vector< double > &dataVec) const
Execution.
std::string ToString() const
Info to string.
std::pair< std::vector< double >, TimeClusterTriggerMonitorData > resultType
std::uint32_t u32
Definition Definitions.h:21
Monitoring data for time cluster trigger algorithm.
size_t numInTrigger
Time stamps used for trigger building.
xpu::timings time
Time for trigger building.