CbmRoot
Loading...
Searching...
No Matches
CbmMatchEvents.h
Go to the documentation of this file.
1/* Copyright (C) 2020-2021 Physikalisches Institut, Eberhard Karls Universität Tuebingen, Tuebingen
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Viktor Klochkov [committer] */
4
5#ifndef CBMROOT_ANALYSIS_COMMON_ANALYSIS_TREE_CONVERTER_CBMMATCHEVENTS_H_
6#define CBMROOT_ANALYSIS_COMMON_ANALYSIS_TREE_CONVERTER_CBMMATCHEVENTS_H_
7
8#include "CbmConverterTask.h"
9
11class CbmMCDataArray;
12
13class CbmMatchEvents final : public CbmConverterTask {
14public:
15 explicit CbmMatchEvents() = default;
16
17 ~CbmMatchEvents() final = default;
18
19 void Init() final;
20
21 void ProcessData(CbmEvent* event) final;
22
23 void Finish() final {}
24
25 struct EventId {
26 EventId(int f, int e) : file(f), entry(e) {}
27 int file {0};
28 int entry {0};
29 bool operator<(const EventId& other) const { return this->file < other.file || this->entry < other.entry; }
30 };
31
32private:
33 TClonesArray* cbm_sts_match_ {nullptr};
34 std::map<EventId, int> count_map_ {};
35
36 // ClassDef(CbmMatchEvents, 1);
37};
38
39#endif //CBMROOT_ANALYSIS_COMMON_ANALYSIS_TREE_CONVERTER_CBMMATCHEVENTS_H_
Class characterising one event by a collection of links (indices) to data objects,...
Definition CbmEvent.h:34
Access to a MC data branch for time-based analysis.
Task class creating and managing CbmMCDataArray objects.
std::map< EventId, int > count_map_
TClonesArray * cbm_sts_match_
non-owning pointer
CbmMatchEvents()=default
void ProcessData(CbmEvent *event) final
void Init() final
void Finish() final
~CbmMatchEvents() final=default
bool operator<(const EventId &other) const