EventFilter
CSCRawToDigi
src
CSCTMBMiniScope.cc
Go to the documentation of this file.
1
//_________________________________________________________
2
//
3
// CSCTMBMiniScope July 2010 Alexander Sakharov
4
// Unpacks TMB Logic MiniScope Analyzer and stores in CSCTMBMiniScope.h
5
//_________________________________________________________
6
//
7
8
#include "
EventFilter/CSCRawToDigi/interface/CSCTMBMiniScope.h
"
9
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
10
#include <iostream>
11
12
CSCTMBMiniScope::CSCTMBMiniScope
(
const
uint16_t *
buf
,
int
Line6b07,
int
Line6E07) {
13
size_
=
UnpackMiniScope
(
buf
, Line6b07, Line6E07);
14
15
}
16
17
int
CSCTMBMiniScope::UnpackMiniScope
(
const
uint16_t *
buf
,
int
Line6b07,
int
Line6E07) {
18
if
((Line6E07 - Line6b07) != 0) {
20
miniScopeTbinCount
=
buf
[Line6b07 + 1] & 0x00FF;
21
miniScopeTbinPreTrigger
= (
buf
[Line6b07 + 1] >> 8) & 0x000F;
22
23
LogTrace
(
"CSCTMBMiniScope"
) <<
" MiniScope Found | Tbin: "
<<
miniScopeTbinCount
24
<<
" | Tbin Pretrigger: "
<<
miniScopeTbinPreTrigger
<< std::endl;
25
26
miniScopeAdress
.clear();
27
miniScopeData
.clear();
28
29
for
(
int
i
= 0;
i
<
miniScopeTbinCount
;
i
++) {
30
miniScopeAdress
.push_back(284 +
i
);
31
miniScopeData
.push_back(
buf
[Line6b07 + 1 +
i
]);
32
}
33
34
//print();
35
}
36
37
return
(Line6E07 - Line6b07 + 1);
38
39
}
40
41
std::vector<int>
CSCTMBMiniScope::getChannelsInTbin
(
int
data
)
const
{
42
std::vector<int> channelInTbin;
43
channelInTbin.clear();
44
for
(
int
k
= 0;
k
< 14;
k
++) {
45
int
chBit = 0;
46
chBit = (
data
>>
k
) & 0
x1
;
47
if
(chBit != 0)
48
channelInTbin.push_back(
k
);
49
}
50
return
channelInTbin;
51
}
52
53
void
CSCTMBMiniScope::print
()
const
{
54
for
(
unsigned
int
k
= 0;
k
<
getAdr
().size(); ++
k
) {
55
if
(
k
== 0) {
56
std::cout
<<
" Adr = "
<<
getAdr
()[
k
] <<
" | Data: "
<< std::hex <<
getData
()[
k
] <<
std::dec
<< std::endl;
57
}
else
{
58
std::cout
<<
" Adr = "
<<
getAdr
()[
k
] <<
" | Data: "
<< std::hex <<
getData
()[
k
] <<
std::dec
<<
" ==>| Ch# "
;
59
for
(
unsigned
int
j
= 0;
j
<
getChannelsInTbin
(
getData
()[
k
]).size();
j
++) {
60
std::cout
<<
" "
<<
getChannelsInTbin
(
getData
()[
k
])[
j
];
61
}
62
std::cout
<< std::endl;
63
}
64
}
65
}
mps_fire.i
i
Definition:
mps_fire.py:428
MessageLogger.h
CSCTMBMiniScope::miniScopeTbinPreTrigger
int miniScopeTbinPreTrigger
Definition:
CSCTMBMiniScope.h:33
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition:
testProducerWithPsetDescEmpty_cfi.py:33
CSCTMBMiniScope::getChannelsInTbin
std::vector< int > getChannelsInTbin(int data) const
UnpackScope.
Definition:
CSCTMBMiniScope.cc:41
dqmdumpme.k
k
Definition:
dqmdumpme.py:60
CSCTMBMiniScope::miniScopeData
std::vector< int > miniScopeData
stores all mini scope adresses
Definition:
CSCTMBMiniScope.h:31
CSCTMBMiniScope::getData
std::vector< int > getData() const
Definition:
CSCTMBMiniScope.h:22
CSCTMBMiniScope::print
void print() const
Definition:
CSCTMBMiniScope.cc:53
visDQMUpload.buf
buf
Definition:
visDQMUpload.py:154
CSCTMBMiniScope::UnpackMiniScope
int UnpackMiniScope(const uint16_t *buf, int Line6b07, int Line6E07)
Print the maped content of the miniscope.
Definition:
CSCTMBMiniScope.cc:17
CSCTMBMiniScope::getAdr
std::vector< int > getAdr() const
Definition:
CSCTMBMiniScope.h:21
CSCTMBMiniScope::size_
unsigned size_
Definition:
CSCTMBMiniScope.h:34
data
char data[epos_bytes_allocation]
Definition:
EPOS_Wrapper.h:79
CSCTMBMiniScope::miniScopeAdress
std::vector< int > miniScopeAdress
Definition:
CSCTMBMiniScope.h:30
CSCTMBMiniScope::CSCTMBMiniScope
CSCTMBMiniScope()
Definition:
CSCTMBMiniScope.h:16
CSCTMBMiniScope::miniScopeTbinCount
int miniScopeTbinCount
stores all mini scope data
Definition:
CSCTMBMiniScope.h:32
LogTrace
#define LogTrace(id)
Definition:
MessageLogger.h:234
CSCTMBMiniScope.h
dqmiolumiharvest.j
j
Definition:
dqmiolumiharvest.py:66
TauDecayModes.dec
dec
Definition:
TauDecayModes.py:143
Generated for CMSSW Reference Manual by
1.8.16