CbmRoot
Loading...
Searching...
No Matches
CbmTofUnpackConfig.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: Pierre-Alain Loizeau, Pascal Raisig [committer] */
4
6
7#include "CbmTofUnpackAlgo.h"
8
9#include <Logger.h>
10
11#include <Rtypes.h>
12#include <RtypesCore.h>
13
14#include <memory>
15#include <vector>
16
17CbmTofUnpackConfig::CbmTofUnpackConfig(std::string detGeoSetupTag, UInt_t runid)
18 : CbmRecoUnpackConfig("CbmTofUnpackConfig", detGeoSetupTag, runid)
19{
20}
21
23
24// ---- Init ----
26{
27 fAlgo->SetFlagEpochCountHack2021(fbEpochCountHack2021);
28
29 if (fMonitor) {
30 fAlgo->SetMonitor(fMonitor);
31 }
32
33 // Now we have all information required to initialise the algorithm
34 fAlgo->Init();
35}
36
37// ---- chooseAlgo ----
38std::shared_ptr<CbmTofUnpackAlgo> CbmTofUnpackConfig::chooseAlgo()
39{
40 if (fDoLog) LOG(info) << fName << "::Init - chooseAlgo";
41
42 // Default unpacker selection
43 // Unpacker algo from mcbm 2021 on and hopefully default for a long time.
44 auto algo = std::make_shared<CbmTofUnpackAlgo>();
45 LOG(info) << fName << "::chooseAlgo() - selected algo = " << algo->Class_Name();
46 if (fbBmonParMode) {
47 LOG(info) << fName << "::chooseAlgo - Setting the new algo in BMon Par mode";
48 algo->SetFlagBmonParMode(fbBmonParMode);
49 }
50
51 return algo;
52
53 LOG(error) << fName
54 << "::Init - chooseAlgo() - no algorithm created something went wrong. We can not work like this!";
55 return nullptr;
56}
57
ClassImp(CbmConverterManager)
Baseclass for the TrdR unpacker algorithms.
Configuration class for an unpacker algorithm.
virtual std::shared_ptr< CbmTofUnpackAlgo > chooseAlgo()
Choose the derived unpacker algorithm to be used for the DAQ output to Digi translation....
std::shared_ptr< CbmTofUnpackMonitor > fMonitor
pointer to the monitor object
CbmTofUnpackConfig(std::string detGeoSetupTag, UInt_t runid=0)
Create the Cbm Tof Unpack Task object.
void InitAlgo()
Initialize the algorithm, should include all steps needing te parameter objects to be present....
virtual ~CbmTofUnpackConfig()
Destroy the Cbm Tof Unpack Task object.
bool fbEpochCountHack2021
Control flags.