CbmRoot
Loading...
Searching...
No Matches
CbmBmonUnpackConfig.cxx
Go to the documentation of this file.
1/* Copyright (C) 2022 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau [committer] */
4
6
7#include "CbmBmonUnpackAlgo.h"
8#include "CbmTofDigi.h"
9
10#include <Logger.h>
11
12#include <Rtypes.h>
13#include <RtypesCore.h>
14
15#include <memory>
16#include <vector>
17
18CbmBmonUnpackConfig::CbmBmonUnpackConfig(std::string detGeoSetupTag, UInt_t runid)
19 : CbmRecoUnpackConfig("CbmBmonUnpackConfig", detGeoSetupTag, runid)
20{
22}
23
25
26// ---- Init ----
28{
29 fAlgo->SetFlagEpochCountHack2021(fbEpochCountHack2021);
30
31 if (fMonitor) {
32 fAlgo->SetMonitor(fMonitor);
33 }
34
35 // Now we have all information required to initialise the algorithm
36 fAlgo->Init();
37}
38
39// ---- chooseAlgo ----
40std::shared_ptr<CbmBmonUnpackAlgo> CbmBmonUnpackConfig::chooseAlgo()
41{
42 if (fDoLog) LOG(info) << fName << "::Init - chooseAlgo";
43
44 // Default unpacker selection
45 // Unpacker algo from mcbm 2021 on and hopefully default for a long time.
46 auto algo = std::make_shared<CbmBmonUnpackAlgo>();
47 LOG(info) << fName << "::chooseAlgo() - selected algo = " << algo->Class_Name();
48 if (fbBmonParMode) {
49 LOG(info) << fName << "::chooseAlgo - Setting the new algo in BMon Par mode";
50 algo->SetFlagBmonParMode(fbBmonParMode);
51 }
52
53 return algo;
54
55 LOG(error) << fName
56 << "::Init - chooseAlgo() - no algorithm created something went wrong. We can not work like this!";
57 return nullptr;
58}
59
ClassImp(CbmConverterManager)
CbmBmonUnpackConfig(std::string detGeoSetupTag, UInt_t runid=0)
Create the Cbm Tof Unpack Task object.
std::shared_ptr< CbmTofUnpackMonitor > fMonitor
pointer to the monitor object
virtual ~CbmBmonUnpackConfig()
Destroy the Cbm Tof Unpack Task object.
virtual std::shared_ptr< CbmBmonUnpackAlgo > chooseAlgo()
Choose the derived unpacker algorithm to be used for the DAQ output to Digi translation....
bool fbEpochCountHack2021
Control flags.
void SetFlagBmonParMode(bool bFlagin=true)
Sets the flag switching to a request of CbmMcbm2018BmonPar. Default is enable.
void InitAlgo()
Initialize the algorithm, should include all steps needing te parameter objects to be present....