CbmRoot
Loading...
Searching...
No Matches
CbmDigiContainer.h
Go to the documentation of this file.
1/* Copyright (C) 2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese [committer] */
4
10#ifndef CBMDIGICONTAINER_H
11#define CBMDIGICONTAINER_H 1
12
13#include <Rtypes.h> // for THashConsistencyHolder, ClassDef
14#include <TNamed.h> // for TNamed
15#include <TString.h> // for TString
16
17#include <boost/any.hpp> // for any
18
19#include <cstdint>
20#include <string> // for string
21
22class CbmMatch;
23
34class CbmDigiContainer : public TNamed {
35
36public:
38 CbmDigiContainer(const char* name = "") : TNamed(name, "") {}
39
40
42 virtual ~CbmDigiContainer() {}
43
44
49 virtual void AddDigi(boost::any, const CbmMatch*) {}
50
51
55 virtual bool ConnectToTree() { return false; }
56
57
66 virtual boost::any GetDigi(uint32_t index) = 0;
67
68
73 virtual const CbmMatch* GetDigiMatch(uint32_t index) = 0;
74
75
79 virtual bool HasMatches() const = 0;
80
81
83 virtual const char* GetName() const { return fName; }
84
85
87 virtual uint64_t GetNofDigis() const = 0;
88
89
91 virtual std::string ToString() const { return GetName(); }
92
93
95};
96
97
98#endif /* CBMDIGICONTAINER_H */
Abstract container for digis in CBM.
virtual bool HasMatches() const =0
Presence of match branch.
virtual const char * GetName() const
Name of container.
virtual const CbmMatch * GetDigiMatch(uint32_t index)=0
Get a match object from the container.
ClassDef(CbmDigiContainer, 1)
virtual ~CbmDigiContainer()
Destructor.
virtual bool ConnectToTree()
Connect the container to ROOT tree branch.
virtual void AddDigi(boost::any, const CbmMatch *)
CbmDigiContainer(const char *name="")
Constructor.
virtual std::string ToString() const
String output.
virtual boost::any GetDigi(uint32_t index)=0
Get a digi from the container.
virtual uint64_t GetNofDigis() const =0
Get the number of digis in the container.