BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnScWallRaw2Digit.h
Go to the documentation of this file.
1
#ifndef BMNSCWALLRAW2DIGIT_H
2
#define BMNSCWALLRAW2DIGIT_H
3
4
#include "
BmnEnums.h
"
5
#include "FairLogger.h"
6
#include "
Riostream.h
"
7
#include "
TClonesArray.h
"
8
#include "
TString.h
"
9
#include "
WfmProcessor.h
"
10
11
#include <
UniRun.h
>
12
#include <boost/functional/hash.hpp>
13
#include <boost/program_options.hpp>
14
#include <cstdlib>
15
#include <iostream>
16
#include <numeric>
17
#include <optional>
18
#include <unordered_map>
19
20
class
BmnScWallRaw2Digit
:
public
WfmProcessor
21
{
22
23
public
:
24
BmnScWallRaw2Digit
(
int
period,
int
run,
const
std::string& mappingFile,
const
std::string& calibrationFile =
""
);
25
BmnScWallRaw2Digit
();
26
27
~BmnScWallRaw2Digit
();
28
29
TString
GetName
() {
return
"BmnScWallRaw2Digit"
; }
30
BmnStatus
ParseConfig
(
const
std::string& file);
31
BmnStatus
ParseCalibration
(
const
std::string& file);
32
BmnStatus
LoadCalibration
(
int
period,
int
run);
33
void
FillEvent
(
TClonesArray
* data,
TClonesArray
* ScWalldigit);
34
void
print
();
35
36
digiPars
GetDigiPars
() {
return
fdigiPars
; }
37
auto
GetChannelMap
() {
return
fuoChannelMap
; }
38
std::optional<std::pair<float, float>>
GetCalibPairFromAddress
(uint32_t address);
39
std::optional<uint32_t>
GetAddressFromBoard
(std::pair<size_t, size_t> key);
40
41
private
:
42
BmnStatus
ParseCalibrationJson
(
const
nlohmann::json
& j);
43
44
std::unordered_map<std::pair<size_t, size_t>, uint32_t, boost::hash<std::pair<size_t, size_t>>>
45
fuoChannelMap
;
// physical channel <board, ch> to digi address
46
std::unordered_map<uint32_t, std::pair<float, float>>
fuoCalibMap
;
// digi address to pair<calib, calibError>
47
48
double
fworkTime_real
;
49
double
fworkTime_cpu
;
50
51
ClassDef
(
BmnScWallRaw2Digit
, 3);
52
};
53
#endif
/* BMNSCWALLRAW2DIGIT_H */
Riostream.h
ClassDef
#define ClassDef(name, id)
TClonesArray.h
TString.h
BmnStatus
BmnStatus
Define status code.
Definition
BmnEnums.h:93
BmnScWallRaw2Digit
Definition
BmnScWallRaw2Digit.h:21
BmnScWallRaw2Digit::ParseCalibration
BmnStatus ParseCalibration(const std::string &file)
BmnScWallRaw2Digit::GetDigiPars
digiPars GetDigiPars()
Definition
BmnScWallRaw2Digit.h:36
BmnScWallRaw2Digit::GetAddressFromBoard
std::optional< uint32_t > GetAddressFromBoard(std::pair< size_t, size_t > key)
BmnScWallRaw2Digit::BmnScWallRaw2Digit
BmnScWallRaw2Digit(int period, int run, const std::string &mappingFile, const std::string &calibrationFile="")
BmnScWallRaw2Digit::GetCalibPairFromAddress
std::optional< std::pair< float, float > > GetCalibPairFromAddress(uint32_t address)
BmnScWallRaw2Digit::BmnScWallRaw2Digit
BmnScWallRaw2Digit()
BmnScWallRaw2Digit::ParseCalibrationJson
BmnStatus ParseCalibrationJson(const nlohmann::json &j)
BmnScWallRaw2Digit::GetName
TString GetName()
Definition
BmnScWallRaw2Digit.h:29
BmnScWallRaw2Digit::~BmnScWallRaw2Digit
~BmnScWallRaw2Digit()
BmnScWallRaw2Digit::fuoChannelMap
std::unordered_map< std::pair< size_t, size_t >, uint32_t, boost::hash< std::pair< size_t, size_t > > > fuoChannelMap
Definition
BmnScWallRaw2Digit.h:45
BmnScWallRaw2Digit::ParseConfig
BmnStatus ParseConfig(const std::string &file)
BmnScWallRaw2Digit::LoadCalibration
BmnStatus LoadCalibration(int period, int run)
BmnScWallRaw2Digit::print
void print()
BmnScWallRaw2Digit::fuoCalibMap
std::unordered_map< uint32_t, std::pair< float, float > > fuoCalibMap
Definition
BmnScWallRaw2Digit.h:46
BmnScWallRaw2Digit::fworkTime_cpu
double fworkTime_cpu
Definition
BmnScWallRaw2Digit.h:49
BmnScWallRaw2Digit::fworkTime_real
double fworkTime_real
Definition
BmnScWallRaw2Digit.h:48
BmnScWallRaw2Digit::FillEvent
void FillEvent(TClonesArray *data, TClonesArray *ScWalldigit)
BmnScWallRaw2Digit::GetChannelMap
auto GetChannelMap()
Definition
BmnScWallRaw2Digit.h:37
TClonesArray
TString
WfmProcessor
Definition
WfmProcessor.h:12
WfmProcessor::fdigiPars
struct WfmProcessor::digiPars fdigiPars
BmnEnums.h
Define enumerations used in tracking.
UniRun.h
WfmProcessor.h
nlohmann::json
basic_json<> json
default specialization
Definition
json.hpp:3365
WfmProcessor::digiPars
Definition
WfmProcessor.h:25
install
include
BmnScWallRaw2Digit.h
Generated on
for BmnRoot by
1.17.0