CbmRoot
Loading...
Searching...
No Matches
CbmTrdUnpackConfig.h
Go to the documentation of this file.
1/* Copyright (C) 2021 Goethe-University Frankfurt, Frankfurt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pascal Raisig [committer] */
4
18#ifndef CbmTrdUnpackConfig_H
19#define CbmTrdUnpackConfig_H
20
21
22#include "CbmRecoUnpackConfig.tmpl"
26#include "CbmTrdUnpackMonitor.h"
27
28#include <Rtypes.h>
29#include <RtypesCore.h>
30
31#include <cstddef>
32#include <cstdint>
33#include <memory>
34#include <vector>
35
37 public CbmRecoUnpackConfig<CbmTrdUnpackAlgoBaseR, CbmTrdDigi, CbmTrdRawMessageSpadic, std::pair<size_t, size_t>> {
38
39 public:
47 CbmTrdUnpackConfig(std::string detGeoSetupTag, UInt_t runid = 0);
48
53 virtual ~CbmTrdUnpackConfig();
54
57
60
61 // Getters
63 std::shared_ptr<CbmTrdUnpackMonitor> GetMonitor() { return fMonitor; }
64
66 std::shared_ptr<CbmTrdSpadic> GetSpadicObject() { return fSpadic; }
67
73 void SetAlgo();
74
75 // Setters
76
78 void SetMonitor(std::shared_ptr<CbmTrdUnpackMonitor> value) { fMonitor = value; }
79
85 void SetRawToDigiMethod(std::shared_ptr<CbmTrdRawToDigiBaseR> value) { fRTDMethod = value; }
86
92 void SetSpadicObject(std::shared_ptr<CbmTrdSpadic> value) { fSpadic = value; }
93
101 void SetElinkTimeOffset(std::uint32_t criid, std::uint8_t elinkid, std::int32_t offsetNs);
102
103 protected:
109 virtual std::shared_ptr<CbmTrdUnpackAlgoBaseR> chooseAlgo();
110
112 std::shared_ptr<CbmTrdRawToDigiBaseR> fRTDMethod = std::make_shared<CbmTrdRawToDigiMaxAdcR>();
113
115 std::shared_ptr<CbmTrdSpadic> fSpadic = nullptr;
116
118 std::shared_ptr<CbmTrdUnpackMonitor> fMonitor = nullptr;
119
121 std::map<std::uint32_t, std::vector<std::int32_t>> fElinkTimeOffsetMap;
122
123 private:
124 ClassDef(CbmTrdUnpackConfig, 3)
125};
126
127#endif // CbmTrdUnpackConfig_H
Base class for extracting of information from raw signals to digi level.
Class for extracting information from raw signals to digi level.
Baseclass for the TrdR unpacker algorithms.
Monitor class to monitor the data from the Trd unpacker algorithms.
void SetMonitor(std::shared_ptr< CbmTrdUnpackMonitor > value)
Add a monitor to the unpacker.
void SetRawToDigiMethod(std::shared_ptr< CbmTrdRawToDigiBaseR > value)
Set the raw to digi method.
void SetAlgo()
Setup the derived unpacker algorithm to be used for the DAQ output to Digi translation....
std::shared_ptr< CbmTrdSpadic > GetSpadicObject()
Get the spadic object attached to this config.
virtual ~CbmTrdUnpackConfig()
Destroy the Cbm Trd Unpack Task object.
CbmTrdUnpackConfig(const CbmTrdUnpackConfig &)=delete
Copy constructor - not implemented.
void SetSpadicObject(std::shared_ptr< CbmTrdSpadic > value)
Set the Spadic Object.
CbmTrdUnpackConfig(std::string detGeoSetupTag, UInt_t runid=0)
Create the Cbm Trd Unpack Task object.
std::shared_ptr< CbmTrdUnpackMonitor > GetMonitor()
Get the potentially added monitor.
void SetElinkTimeOffset(std::uint32_t criid, std::uint8_t elinkid, std::int32_t offsetNs)
Register a time offeset to be substracted from the digis which come from a specific CRI.
std::shared_ptr< CbmTrdRawToDigiBaseR > fRTDMethod
pointer to the raw msg to digi method
std::map< std::uint32_t, std::vector< std::int32_t > > fElinkTimeOffsetMap
Map to store time offsets for each CRI&Elink combination.
CbmTrdUnpackConfig & operator=(const CbmTrdUnpackConfig &)=delete
Assignment operator - not implemented.
std::shared_ptr< CbmTrdUnpackMonitor > fMonitor
pointer to the monitor object
virtual std::shared_ptr< CbmTrdUnpackAlgoBaseR > chooseAlgo()
Choose the derived unpacker algorithm to be used for the DAQ output to Digi translation....
std::shared_ptr< CbmTrdSpadic > fSpadic
Spadic software reprensentation object.