CbmRoot
Loading...
Searching...
No Matches
CbmTrdUnpackFaspMonitor.h
Go to the documentation of this file.
1/* Copyright (C) 2022 Horia Hulubei National Institute of Physics and Nuclear Engineering, Bucharest
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Alexandru Bercuci [committer] */
4
18#ifndef CbmTrdUnpackFaspMonitor_H
19#define CbmTrdUnpackFaspMonitor_H
20
21#include "CbmTrdDigi.h"
22#include "CbmTrdParModAsic.h"
23#include "CbmTrdParModDigi.h"
24#include "CbmTrdParSetAsic.h"
25#include "CbmTrdUnpackMonitor.h"
26
27#include <MicrosliceDescriptor.hpp>
28#include <Timeslice.hpp>
29
30#include <FairRunOnline.h>
31#include <FairTask.h>
32#include <Logger.h>
33
34#include <Rtypes.h> // for types
35#include <RtypesCore.h>
36#include <TFile.h>
37#include <TH1.h>
38#include <THttpServer.h> // for histogram server
39
40#include <cmath>
41#include <cstdint>
42#include <map>
43#include <memory>
44#include <string>
45#include <vector>
46
49
50 public:
52 CbmTrdUnpackFaspMonitor(/* args */);
53
56
59
62
64 void FillHistos(CbmTrdDigi* digi);
65
67 void Finish();
68
69 // Runtime functions
71 Bool_t Init();
72
74 void MapMaskedChannels(const CbmTrdParSetAsic* asics);
75
77 void SetActiveHistos(std::vector<eDigiHistos> vec) { fActiveDigiHistos.swap(vec); }
78
80 void SetActiveHistos(std::vector<eRawHistos> vec) { fActiveRawHistos.swap(vec); }
81
82 protected:
87 void addParam(uint32_t madd, const CbmTrdParModAsic* asics);
92 void addParam(uint32_t madd, CbmTrdParModDigi* pp);
94 void createHisto(eDigiHistos kHisto);
101 virtual void fillHisto(CbmTrdDigi* digi, eDigiHistos kHisto, std::uint32_t moduleid, std::shared_ptr<TH1> histo);
110 virtual std::uint64_t getDeltaT(uint32_t modid, int32_t ch = -1, uint64_t daqt = 0);
111
112 private:
120 std::map<uint32_t, std::tuple<std::vector<int32_t>, uint8_t, uint8_t>> fModuleDef = {};
121
122 ClassDef(CbmTrdUnpackFaspMonitor, 1)
123};
124
125#endif // CbmTrdUnpackFaspMonitor_H
Monitor class to monitor the data from the Trd unpacker algorithms.
static float Clk(eCbmTrdAsicType ty)
DAQ clock accessor for each ASIC.
Definition CbmTrdDigi.h:109
Describe TRD module ASIC settings (electronic gain, delays, etc)
Definition of chamber gain conversion for one TRD module.
Describe TRD module ASIC settings (electronic gain, delays, etc)
virtual ~CbmTrdUnpackFaspMonitor()
Destroy the Cbm Trd Unpack Task object.
virtual void fillHisto(CbmTrdDigi *digi, eDigiHistos kHisto, std::uint32_t moduleid, std::shared_ptr< TH1 > histo)
Fill the given histo with the information from the digi. Reimplement from CbmTrdUnpackMonitor.
CbmTrdUnpackFaspMonitor & operator=(const CbmTrdUnpackFaspMonitor &)=delete
Assignment operator - not implemented.
const double fFaspInvClk
save 1/clk for the FASP FEE in kHz
CbmTrdUnpackFaspMonitor()
Create the Cbm Trd Unpack AlgoBase object.
void MapMaskedChannels(const CbmTrdParSetAsic *asics)
Special call for monitoring the masked channel map.
CbmTrdUnpackFaspMonitor(const CbmTrdUnpackFaspMonitor &)=delete
Copy constructor - not implemented.
void FillHistos(CbmTrdDigi *digi)
fill the stored digi histograms
void SetActiveHistos(std::vector< eRawHistos > vec)
transfer the enums for the histos to be activated to the member vector
std::map< uint32_t, std::tuple< std::vector< int32_t >, uint8_t, uint8_t > > fModuleDef
Map of definitions for each module under monitoring : std::get<0> : pad to FASP channel mapping std::...
void Finish()
Actions at the end of the run, e.g. write histos to file if flag is set.
void createHisto(eDigiHistos kHisto)
Create the actual TH1 shared_ptrs of the Digi histos.
Bool_t Init()
Init all required parameter informations.
virtual std::uint64_t getDeltaT(uint32_t modid, int32_t ch=-1, uint64_t daqt=0)
Paralell implementation of the omonime function from CbmTrdUnpackMonitor for the case of FASP digis....
void addParam(uint32_t madd, const CbmTrdParModAsic *asics)
Init module and link asics properties.
void SetActiveHistos(std::vector< eDigiHistos > vec)
transfer the enums for the histos to be activated to the member vector
std::vector< eDigiHistos > fActiveDigiHistos
Enums of Digi histos to be activated.
eDigiHistos
Enum for the predefined digi histograms.
std::vector< eRawHistos > fActiveRawHistos
Enums of Raw histos to be activated.