CbmRoot
Loading...
Searching...
No Matches
CbmRichUnpackConfig.cxx
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
6
7#include "CbmRichUnpackAlgo.h"
9
10#include <Logger.h>
11
12#include <Rtypes.h>
13#include <RtypesCore.h>
14
15#include <memory>
16#include <vector>
17
18CbmRichUnpackConfig::CbmRichUnpackConfig(std::string detGeoSetupTag, UInt_t runid)
19 : CbmRecoUnpackConfig("CbmRichUnpackConfig", detGeoSetupTag, runid)
20{
21}
22
24
25// ---- Init ----
27{
28 if (fDoLog) LOG(info) << fName << "::Init - SetMaskedDiRICHes";
29 fAlgo->SetMaskedDiRICHes(&fMaskedDiRICHes);
30 fAlgo->DoTotOffsetCorrection(fbDoToTCorr);
31
32 if (fMonitor) {
33 fAlgo->SetMonitor(fMonitor);
34 }
35
36 // Now we have all information required to initialise the algorithm
37 fAlgo->Init();
38}
39
40// ---- chooseAlgo ----
41std::shared_ptr<CbmRichUnpackAlgoBase> CbmRichUnpackConfig::chooseAlgo()
42{
43 if (fDoLog) LOG(info) << fName << "::Init - chooseAlgo";
44
45 // Default unpacker selection
46 // Unpacker algo from mcbm 2021 on and hopefully default for a long time.
48 auto algo = std::make_shared<CbmRichUnpackAlgo>();
49 LOG(info) << fName << "::chooseAlgo() - selected algo = " << algo->Class_Name();
50 return algo;
51 }
52
54 auto algo = std::make_shared<CbmRichUnpackAlgo2022>();
55 LOG(info) << fName << "::chooseAlgo() - selected algo = " << algo->Class_Name();
56 return algo;
57 }
58
59 LOG(error) << fName
60 << "::Init - chooseAlgo() - no algorithm created something went wrong. We can not work like this!";
61 return nullptr;
62}
63
64
ClassImp(CbmConverterManager)
Baseclass for the TrdR unpacker algorithms.
Configuration class for an unpacker algorithm.
CbmRichUnpackerVersion fUnpackerVersion
Selector of Unpacker Version.
virtual std::shared_ptr< CbmRichUnpackAlgoBase > chooseAlgo()
Choose the derived unpacker algorithm to be used for the DAQ output to Digi translation....
std::shared_ptr< CbmRichUnpackMonitor > fMonitor
pointer to the monitor object
virtual ~CbmRichUnpackConfig()
Destroy the Cbm Trd Unpack Task object.
std::vector< Int_t > fMaskedDiRICHes
CbmRichUnpackConfig(std::string detGeoSetupTag, UInt_t runid=0)
Create the Cbm Trd Unpack Task object.
void InitAlgo()
Initialize the algorithm, should include all steps needing te parameter objects to be present....