CbmRoot
Loading...
Searching...
No Matches
CbmDigiData.h
Go to the documentation of this file.
1/* Copyright (C) 2021-2022 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese [committer] */
4
5
6#ifndef CBMDIGIDATA_H
7#define CBMDIGIDATA_H 1
8
9#include "CbmBmonDigiData.h"
10#include "CbmFsdDigiData.h"
11#include "CbmMuchDigiData.h"
12#include "CbmPsdDigiData.h"
13#include "CbmRichDigiData.h"
14#include "CbmStsDigiData.h"
15#include "CbmTofDigiData.h"
16#include "CbmTrdDigiData.h"
17
18#include <boost/serialization/access.hpp>
19#include <boost/serialization/base_object.hpp>
20
21#ifndef NO_ROOT
22#include <Rtypes.h> // for ClassDef
23#endif
24
25
33
34 public:
44
47 template<class Archive>
48 void serialize(Archive& ar, const unsigned int /*version*/)
49 {
50 // note, version is always the latest when saving
51 ar& fBmon;
52 ar& fSts;
53 ar& fMuch;
54 ar& fTrd;
55 ar& fTrd2d;
56 ar& fTof;
57 ar& fPsd;
58 ar& fFsd;
59 ar& fRich;
60 }
61
62 // --- ROOT serializer
63#ifndef NO_ROOT
65#endif
66
68 void Clear()
69 {
70 fBmon.Clear();
71 fSts.Clear();
72 fMuch.Clear();
73 fTrd.Clear();
74 fTrd2d.Clear();
75 fTof.Clear();
76 fPsd.Clear();
77 fFsd.Clear();
78 fRich.Clear();
79 }
80
82 size_t Size(ECbmModuleId system) const
83 {
84 switch (system) {
85 case ECbmModuleId::kBmon: return fBmon.Size(); break;
86 case ECbmModuleId::kSts: return fSts.Size(); break;
87 case ECbmModuleId::kMuch: return fMuch.Size(); break;
88 case ECbmModuleId::kTrd: return fTrd.Size(); break;
89 case ECbmModuleId::kTrd2d: return fTrd2d.Size(); break;
90 case ECbmModuleId::kTof: return fTof.Size(); break;
91 case ECbmModuleId::kPsd: return fPsd.Size(); break;
92 case ECbmModuleId::kRich: return fRich.Size(); break;
93 case ECbmModuleId::kFsd: return fFsd.Size(); break;
94 default: return 0; break;
95 }
96 }
97
99 size_t SizeBytes() const
100 {
101 size_t size = 0;
102 size += fBmon.Size() * sizeof(CbmBmonDigi);
103 size += fSts.Size() * sizeof(CbmStsDigi);
104 size += fMuch.Size() * sizeof(CbmMuchDigi);
105 size += fTrd.Size() * sizeof(CbmTrdDigi);
106 size += fTrd2d.Size() * sizeof(CbmTrdDigi);
107 size += fTof.Size() * sizeof(CbmTofDigi);
108 size += fPsd.Size() * sizeof(CbmPsdDigi);
109 size += fFsd.Size() * sizeof(CbmFsdDigi);
110 size += fRich.Size() * sizeof(CbmRichDigi);
111 return size;
112 }
113};
114
115BOOST_CLASS_VERSION(CbmDigiData, 5)
116#endif /* CBMDIGIDATA_H */
ECbmModuleId
Definition CbmDefs.h:39
@ kTrd
Transition Radiation Detector.
@ kTof
Time-of-flight Detector.
@ kPsd
Projectile spectator detector.
@ kSts
Silicon Tracking System.
@ kTrd2d
TRD-FASP Detector (FIXME)
@ kMuch
Muon detection system.
@ kFsd
Forward spectator detector.
@ kRich
Ring-Imaging Cherenkov Detector.
static constexpr size_t size()
Definition KfSimdPseudo.h:2
Container class for CbmBmonDigi objects.
void Clear()
Clear content.
size_t Size() const
Data class for a signal in the t-zero detector.
Definition CbmBmonDigi.h:30
Collection of digis from all detector systems.
Definition CbmDigiData.h:32
CbmPsdDigiData fPsd
PSD data.
Definition CbmDigiData.h:42
CbmTrdDigiData fTrd2d
TRD2D data.
Definition CbmDigiData.h:40
CbmTrdDigiData fTrd
TRD data.
Definition CbmDigiData.h:39
CbmTofDigiData fTof
TOF data.
Definition CbmDigiData.h:41
CbmStsDigiData fSts
STS data.
Definition CbmDigiData.h:36
size_t SizeBytes() const
Return total size in bytes.
Definition CbmDigiData.h:99
CbmFsdDigiData fFsd
FSD data.
Definition CbmDigiData.h:43
void Clear()
Clear content.
Definition CbmDigiData.h:68
size_t Size(ECbmModuleId system) const
Size of detector data.
Definition CbmDigiData.h:82
CbmRichDigiData fRich
RICH data.
Definition CbmDigiData.h:38
ClassDefNV(CbmDigiData, 5)
void serialize(Archive &ar, const unsigned int)
BOOST serializer.
Definition CbmDigiData.h:48
friend class boost::serialization::access
Definition CbmDigiData.h:45
CbmMuchDigiData fMuch
MUCH data.
Definition CbmDigiData.h:37
CbmBmonDigiData fBmon
Beam monitor data.
Definition CbmDigiData.h:35
Container class for CbmFsdDigi objects.
void Clear()
Clear content.
size_t Size() const
Size.
Data class for FSD digital information.
Definition CbmFsdDigi.h:36
Container class for CbmMuchDigi objects.
size_t Size() const
Size.
void Clear()
Clear content.
Container class for CbmPsdDigi objects.
void Clear()
Clear content.
size_t Size() const
Size.
Data class for PSD digital information.
Definition CbmPsdDigi.h:36
Container class for CbmRichDigi objects.
size_t Size() const
void Clear()
Clear content.
Container class for CbmStsDigi objects.
size_t Size() const
void Clear()
Clear content.
Data class for a single-channel message in the STS.
Definition CbmStsDigi.h:40
Container class for CbmTofDigi objects.
size_t Size() const
void Clear()
Clear content.
Data class for expanded digital TOF information.
Definition CbmTofDigi.h:47
Container class for CbmTrdDigi objects.
size_t Size() const
void Clear()
Clear content.