CbmRoot
Loading...
Searching...
No Matches
CbmTrdUnpackFaspConfig.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], Alexandru Bercuci*/
4
6
7CbmTrdUnpackFaspConfig::CbmTrdUnpackFaspConfig(std::string detGeoSetupTag, UInt_t runid)
8 : CbmRecoUnpackConfig("CbmTrdUnpackFaspConfig", detGeoSetupTag, runid)
9{
10}
11
13
14// ---- Init ----
15
16// ---- chooseAlgo ----
17std::shared_ptr<CbmTrdUnpackFaspAlgo> CbmTrdUnpackFaspConfig::chooseAlgo()
18{
19 if (fDoLog) LOG(info) << fName << "::Init - chooseAlgo";
20
21 // Default unpacker selection
22 // Unpacker algo from mcbm 2021 on and hopefully default for a long time.
23 auto algo = std::make_shared<CbmTrdUnpackFaspAlgo>();
24 LOG(info) << fName << "::chooseAlgo() - selected algo = " << algo->Class_Name();
25 return algo;
26
27 LOG(error) << fName
28 << "::Init - chooseAlgo() - no algorithm created something went wrong. We can not work like this!";
29 return nullptr;
30}
31
32// ---- reset ----
34{
35 uint32_t uNbLostDigis = fAlgo->ResetTimeslice();
36 if (uNbLostDigis /*&& fDoLog*/) {
37 LOG(info) << fName << "::reset - Lost digis after processing timeslice: " << uNbLostDigis;
38 }
39}
40
41//_____________________________________________________________________
43{
44 if (fDoLog) LOG(info) << fName << "::InitAlgo - Setup Fasp mapping";
45
46 // If we have a monitor in the config add it to the algo
47 if (fMonitor) fAlgo->SetMonitor(fMonitor);
48
49 // Now we have all information required to initialise the algorithm
50 fAlgo->Init();
51
52 // Finish initialization of the monitoring task after all information for the run are gathered
53 if (fMonitor) {
54 /*if (fDoLog)*/ LOG(info) << fName << "::InitAlgo - Setup monitoring task";
55 fMonitor->Init();
56 fMonitor->MapMaskedChannels(fAlgo->GetAsicPar());
57 }
58}
59
ClassImp(CbmConverterManager)
Configuration class for an unpacker algorithm.
CbmTrdUnpackFaspConfig(std::string detGeoSetupTag, UInt_t runid=0)
Create the Cbm Trd Unpack Task object.
std::shared_ptr< CbmTrdUnpackFaspMonitor > fMonitor
pointer to the monitor object
virtual std::shared_ptr< CbmTrdUnpackFaspAlgo > chooseAlgo()
Choose the derived unpacker algorithm to be used for the DAQ output to Digi translation....
void InitAlgo()
Initialize the algorithm, include all calibration for Trd FASP.
virtual void reset()
Implement additional actions to be called once per TS, e.g. needed if more than the default output ve...
virtual ~CbmTrdUnpackFaspConfig()
Destroy the Cbm Trd Unpack Task object.