BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnMscRaw2Digit.h
Go to the documentation of this file.
1
#ifndef BMNMSCRAW2DIGIT_H
2
#define BMNMSCRAW2DIGIT_H
3
4
#include "BmnEnums.h"
5
#include "BmnEventHeader.h"
6
#include "BmnMSCDigit.h"
7
#include "BmnMath.h"
8
#include "BmnSpillHeader.h"
9
#include "BmnTrigInfo.h"
10
#include "DigiRunHeader.h"
11
12
#include <
TClonesArray.h
>
13
#include <
TDatime.h
>
14
#include <
TString.h
>
15
#include <
TTree.h
>
16
#include <fstream>
17
#include <iostream>
18
#include <map>
19
#include <sstream>
20
#include <vector>
21
22
using namespace
std
;
23
using namespace
TMath
;
24
25
struct
MscMap
26
{
27
UInt_t
serial
;
28
UShort_t
slot
;
29
30
UShort_t
BT
;
///< BeamTrigger index
31
UShort_t
BTnBusy
;
///< (BeamTrigger & !Busy)
32
UShort_t
L0
;
33
UShort_t
TriggerProtection
;
34
UShort_t
BC1
;
35
UShort_t
BC2
;
36
UShort_t
BC3
;
37
UShort_t
BC1H
;
///< BC1 (high threshold)
38
UShort_t
BC1BP
;
///< BC1 (before protection)
39
UShort_t
BC1xBC2
;
40
UShort_t
BC1nBusy
;
41
UShort_t
IntTrig
;
42
UShort_t
SRCTrig
;
43
UShort_t
TrignBusy
;
///< Trigger * !Busy
44
};
45
46
class
BmnMscRaw2Digit
47
{
48
public
:
49
BmnMscRaw2Digit
(
Int_t
period,
50
Int_t
run,
51
TString
mappingFile,
52
TTree
* spillTree =
nullptr
,
53
TTree
* digiSpillTree =
nullptr
);
54
BmnMscRaw2Digit
() {}
55
56
virtual
~BmnMscRaw2Digit
() {
fMap
.clear(); };
57
// vector<MscMap>* GetMap() {
58
// return &fMap;
59
// }
60
61
BmnStatus
ReadChannelMap
(
TString
mappingFile);
62
63
void
FillRunHeader
(
DigiRunHeader
* rh);
64
65
BmnStatus
SumEvent
(
TClonesArray
* msc,
BmnEventHeader
* hdr,
BmnSpillHeader
* sh,
UInt_t
& nPedEvBySpill);
66
BmnStatus
SumEvent7
(
TClonesArray
* msc,
BmnEventHeader
* hdr,
BmnSpillHeader
* sh,
UInt_t
& nPedEvBySpill);
67
BmnStatus
SumEventTemp
(
TClonesArray
* msc);
68
69
BmnStatus
ParseTxtSpillLog
(
TString
LogName,
TString
SchemeName);
70
71
TTree
*
GetRawSpillTree
() {
return
fRawSpillTree
; }
72
73
TTree
*
GetDigSpillTree
() {
return
fDigSpillTree
; }
74
75
void
SetRawSpillTree
(
TTree
* tree)
76
{
77
fRawSpillTree
= tree;
78
if
(
fRawSpillTree
)
79
fRawSpillTree
->GetEntry(
iSpill
);
80
}
81
82
void
SetDigSpillTree
(
TTree
* tree) {
fDigSpillTree
= tree; }
83
84
private
:
85
BmnSetup
fBmnSetup
;
86
Bool_t
isValidSpillLog
;
87
UInt_t
fPeriodId
;
88
UInt_t
fRunId
;
89
map<TDatime, vector<Int_t>>
spill_map
;
90
UInt_t
iSpillMap
= 0u;
91
TDatime
dtStart
;
92
TDatime
dtEnd
;
93
Int_t
fLogShift
;
94
95
Int_t
fVerbose
= 0;
96
97
BmnTrigInfo
fTempTI
;
98
99
vector<MscMap>
fMap
;
100
ifstream
fMapFile
;
101
TString
fMapFileName
;
102
103
unordered_map<UInt_t, vector<uint64_t>>
fBoardSums
;
104
105
TTree
*
fRawSpillTree
=
nullptr
;
106
TTree
*
fDigSpillTree
=
nullptr
;
107
UInt_t
iSpill
= 0u;
108
109
ULong64_t
fBT
= 0u;
110
ULong64_t
fBTnBusy
= 0u;
111
ULong64_t
fAccepted
= 0u;
112
ULong64_t
fProtection
= 0u;
113
ULong64_t
fL0
= 0u;
114
Double_t
fBTAccepted
= 0.0;
115
ULong64_t
fBC1
= 0u;
116
ULong64_t
fBC2
= 0u;
117
ULong64_t
fBC3
= 0u;
118
119
ClassDef
(
BmnMscRaw2Digit
, 1);
120
};
121
122
#endif
/* BMNMSCRAW2DIGIT_H */
Bool_t
bool Bool_t
UShort_t
unsigned short UShort_t
Int_t
int Int_t
UInt_t
unsigned int UInt_t
Double_t
double Double_t
ULong64_t
unsigned long long ULong64_t
ClassDef
#define ClassDef(name, id)
TClonesArray.h
TDatime.h
TString.h
TTree.h
BmnStatus
BmnStatus
Define status code.
Definition
BmnEnums.h:93
BmnEventHeader
Definition
BmnEventHeader.h:24
BmnMscRaw2Digit::fBoardSums
unordered_map< UInt_t, vector< uint64_t > > fBoardSums
Definition
BmnMscRaw2Digit.h:103
BmnMscRaw2Digit::fBmnSetup
BmnSetup fBmnSetup
Definition
BmnMscRaw2Digit.h:85
BmnMscRaw2Digit::fMap
vector< MscMap > fMap
Definition
BmnMscRaw2Digit.h:99
BmnMscRaw2Digit::SumEvent7
BmnStatus SumEvent7(TClonesArray *msc, BmnEventHeader *hdr, BmnSpillHeader *sh, UInt_t &nPedEvBySpill)
Definition
BmnMscRaw2Digit.cxx:199
BmnMscRaw2Digit::fProtection
ULong64_t fProtection
Definition
BmnMscRaw2Digit.h:112
BmnMscRaw2Digit::ParseTxtSpillLog
BmnStatus ParseTxtSpillLog(TString LogName, TString SchemeName)
Definition
BmnMscRaw2Digit.cxx:75
BmnMscRaw2Digit::fL0
ULong64_t fL0
Definition
BmnMscRaw2Digit.h:113
BmnMscRaw2Digit::fAccepted
ULong64_t fAccepted
Definition
BmnMscRaw2Digit.h:111
BmnMscRaw2Digit::iSpill
UInt_t iSpill
Definition
BmnMscRaw2Digit.h:107
BmnMscRaw2Digit::SumEvent
BmnStatus SumEvent(TClonesArray *msc, BmnEventHeader *hdr, BmnSpillHeader *sh, UInt_t &nPedEvBySpill)
Definition
BmnMscRaw2Digit.cxx:177
BmnMscRaw2Digit::~BmnMscRaw2Digit
virtual ~BmnMscRaw2Digit()
Definition
BmnMscRaw2Digit.h:56
BmnMscRaw2Digit::spill_map
map< TDatime, vector< Int_t > > spill_map
Definition
BmnMscRaw2Digit.h:89
BmnMscRaw2Digit::isValidSpillLog
Bool_t isValidSpillLog
Definition
BmnMscRaw2Digit.h:86
BmnMscRaw2Digit::fRawSpillTree
TTree * fRawSpillTree
Definition
BmnMscRaw2Digit.h:105
BmnMscRaw2Digit::SumEventTemp
BmnStatus SumEventTemp(TClonesArray *msc)
BmnMscRaw2Digit::fBC1
ULong64_t fBC1
Definition
BmnMscRaw2Digit.h:115
BmnMscRaw2Digit::fBTAccepted
Double_t fBTAccepted
Definition
BmnMscRaw2Digit.h:114
BmnMscRaw2Digit::FillRunHeader
void FillRunHeader(DigiRunHeader *rh)
Definition
BmnMscRaw2Digit.cxx:164
BmnMscRaw2Digit::fDigSpillTree
TTree * fDigSpillTree
Definition
BmnMscRaw2Digit.h:106
BmnMscRaw2Digit::fPeriodId
UInt_t fPeriodId
Definition
BmnMscRaw2Digit.h:87
BmnMscRaw2Digit::dtEnd
TDatime dtEnd
Definition
BmnMscRaw2Digit.h:92
BmnMscRaw2Digit::fBTnBusy
ULong64_t fBTnBusy
Definition
BmnMscRaw2Digit.h:110
BmnMscRaw2Digit::fMapFileName
TString fMapFileName
Definition
BmnMscRaw2Digit.h:101
BmnMscRaw2Digit::SetRawSpillTree
void SetRawSpillTree(TTree *tree)
Definition
BmnMscRaw2Digit.h:75
BmnMscRaw2Digit::BmnMscRaw2Digit
BmnMscRaw2Digit(Int_t period, Int_t run, TString mappingFile, TTree *spillTree=nullptr, TTree *digiSpillTree=nullptr)
Definition
BmnMscRaw2Digit.cxx:9
BmnMscRaw2Digit::fVerbose
Int_t fVerbose
Definition
BmnMscRaw2Digit.h:95
BmnMscRaw2Digit::GetDigSpillTree
TTree * GetDigSpillTree()
Definition
BmnMscRaw2Digit.h:73
BmnMscRaw2Digit::fMapFile
ifstream fMapFile
Definition
BmnMscRaw2Digit.h:100
BmnMscRaw2Digit::BmnMscRaw2Digit
BmnMscRaw2Digit()
Definition
BmnMscRaw2Digit.h:54
BmnMscRaw2Digit::fBC3
ULong64_t fBC3
Definition
BmnMscRaw2Digit.h:117
BmnMscRaw2Digit::fBT
ULong64_t fBT
Definition
BmnMscRaw2Digit.h:109
BmnMscRaw2Digit::fBC2
ULong64_t fBC2
Definition
BmnMscRaw2Digit.h:116
BmnMscRaw2Digit::iSpillMap
UInt_t iSpillMap
Definition
BmnMscRaw2Digit.h:90
BmnMscRaw2Digit::GetRawSpillTree
TTree * GetRawSpillTree()
Definition
BmnMscRaw2Digit.h:71
BmnMscRaw2Digit::fTempTI
BmnTrigInfo fTempTI
Definition
BmnMscRaw2Digit.h:97
BmnMscRaw2Digit::dtStart
TDatime dtStart
Definition
BmnMscRaw2Digit.h:91
BmnMscRaw2Digit::fRunId
UInt_t fRunId
Definition
BmnMscRaw2Digit.h:88
BmnMscRaw2Digit::fLogShift
Int_t fLogShift
Definition
BmnMscRaw2Digit.h:93
BmnMscRaw2Digit::ReadChannelMap
BmnStatus ReadChannelMap(TString mappingFile)
Definition
BmnMscRaw2Digit.cxx:28
BmnMscRaw2Digit::SetDigSpillTree
void SetDigSpillTree(TTree *tree)
Definition
BmnMscRaw2Digit.h:82
BmnSpillHeader
Definition
BmnSpillHeader.h:24
BmnTrigInfo
Class BmnTrigInfo Trigger counters of the current spill from U40VE card.
Definition
BmnTrigInfo.h:15
DigiRunHeader
Definition
DigiRunHeader.h:21
TClonesArray
TDatime
TString
TTree
TMath
std
Definition
json.hpp:4446
MscMap
Definition
BmnMscRaw2Digit.h:26
MscMap::L0
UShort_t L0
Definition
BmnMscRaw2Digit.h:32
MscMap::BC1nBusy
UShort_t BC1nBusy
Definition
BmnMscRaw2Digit.h:40
MscMap::BTnBusy
UShort_t BTnBusy
(BeamTrigger & !Busy)
Definition
BmnMscRaw2Digit.h:31
MscMap::serial
UInt_t serial
Definition
BmnMscRaw2Digit.h:27
MscMap::BT
UShort_t BT
BeamTrigger index.
Definition
BmnMscRaw2Digit.h:30
MscMap::TrignBusy
UShort_t TrignBusy
Trigger * !Busy.
Definition
BmnMscRaw2Digit.h:43
MscMap::BC3
UShort_t BC3
Definition
BmnMscRaw2Digit.h:36
MscMap::BC1xBC2
UShort_t BC1xBC2
Definition
BmnMscRaw2Digit.h:39
MscMap::TriggerProtection
UShort_t TriggerProtection
Definition
BmnMscRaw2Digit.h:33
MscMap::IntTrig
UShort_t IntTrig
Definition
BmnMscRaw2Digit.h:41
MscMap::SRCTrig
UShort_t SRCTrig
Definition
BmnMscRaw2Digit.h:42
MscMap::BC1BP
UShort_t BC1BP
BC1 (before protection).
Definition
BmnMscRaw2Digit.h:38
MscMap::BC1
UShort_t BC1
Definition
BmnMscRaw2Digit.h:34
MscMap::slot
UShort_t slot
Definition
BmnMscRaw2Digit.h:28
MscMap::BC1H
UShort_t BC1H
BC1 (high threshold).
Definition
BmnMscRaw2Digit.h:37
MscMap::BC2
UShort_t BC2
Definition
BmnMscRaw2Digit.h:35
decoder
BmnMscRaw2Digit.h
Generated on
for BmnRoot by
1.17.0