L1Trigger
RPCTechnicalTrigger
src
ProcessTestSignal.cc
Go to the documentation of this file.
1
// Include files
2
3
// local
4
#include "
L1Trigger/RPCTechnicalTrigger/interface/ProcessTestSignal.h
"
5
#include "
L1Trigger/RPCTechnicalTrigger/interface/RBCLinkBoardGLSignal.h
"
6
7
//-----------------------------------------------------------------------------
8
// Implementation file for class : ProcessTestSignal
9
//
10
// 2008-11-17 : Andres Osorio
11
//-----------------------------------------------------------------------------
12
13
//=============================================================================
14
// Standard constructor, initializes variables
15
//=============================================================================
16
ProcessTestSignal::ProcessTestSignal
(
const
char
* f_name) : m_in{} {
17
m_in.open(f_name);
18
19
if
(!m_in.is_open()) {
20
std::cout
<<
"ProcessTestSignal> cannot open file"
<< std::endl;
21
}
else
{
22
std::cout
<<
"ProcessTestSignal> file is now open"
<< std::endl;
23
}
24
25
m_lbin = std::make_unique<RBCLinkBoardGLSignal>(&m_data);
26
}
27
//=============================================================================
28
// Destructor
29
//=============================================================================
30
ProcessTestSignal::~ProcessTestSignal
() {
m_in
.close(); }
31
32
//=============================================================================
33
int
ProcessTestSignal::next
() {
34
reset
();
35
36
if
(
m_in
.fail())
37
return
0;
38
39
for
(
int
j
= 0;
j
< 5; ++
j
) {
40
auto
&
block
=
m_vecdata
.emplace_back();
41
(
m_in
) >> (*
block
);
42
}
43
44
builddata
();
45
46
if
(
m_in
.eof())
47
return
0;
48
return
1;
49
}
50
51
void
ProcessTestSignal::showfirst
() {
52
rewind
();
53
for
(
auto
&
d
:
m_vecdata
)
54
std::cout
<< (*d);
55
rewind
();
56
}
57
58
void
ProcessTestSignal::rewind
() {
59
m_in
.clear();
60
m_in
.seekg(0, std::ios::beg);
61
}
62
63
void
ProcessTestSignal::reset
() {
m_vecdata
.clear(); }
64
65
void
ProcessTestSignal::builddata
() {
66
int
_code(0);
67
for
(
auto
&
d
:
m_vecdata
) {
68
for
(
int
k
= 0;
k
< 6; ++
k
) {
69
_code = 10000 * (
d
->m_wheel) + 100 *
d
->m_sec1[
k
] + 1 *
d
->m_sec2[
k
];
70
RBCInput
* _signal = &(
d
->m_orsignals[
k
]);
71
_signal->
needmapping
=
true
;
72
m_data
.insert(std::make_pair(_code, _signal));
73
}
74
}
75
}
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
ProcessTestSignal::m_data
std::map< int, RBCInput * > m_data
Definition:
ProcessTestSignal.h:57
ProcessTestSignal::ProcessTestSignal
ProcessTestSignal(const char *)
Definition:
ProcessTestSignal.cc:16
RBCLinkBoardGLSignal.h
ProcessTestSignal::m_vecdata
std::vector< std::unique_ptr< RPCData > > m_vecdata
Definition:
ProcessTestSignal.h:55
RBCInput::needmapping
bool needmapping
Definition:
RBCInput.h:50
dqmdumpme.k
k
Definition:
dqmdumpme.py:60
ProcessTestSignal::rewind
void rewind()
Definition:
ProcessTestSignal.cc:58
ProcessTestSignal::~ProcessTestSignal
~ProcessTestSignal() override
Destructor.
Definition:
ProcessTestSignal.cc:30
groupFilesInBlocks.block
block
Definition:
groupFilesInBlocks.py:150
ProcessTestSignal::reset
void reset()
Definition:
ProcessTestSignal.cc:63
ProcessTestSignal::next
int next() override
Definition:
ProcessTestSignal.cc:33
ProcessTestSignal.h
ProcessTestSignal::m_in
std::ifstream m_in
Definition:
ProcessTestSignal.h:51
ProcessTestSignal::showfirst
void showfirst()
Definition:
ProcessTestSignal.cc:51
RBCInput
Definition:
RBCInput.h:22
ztail.d
d
Definition:
ztail.py:151
dqmiolumiharvest.j
j
Definition:
dqmiolumiharvest.py:66
ProcessTestSignal::builddata
void builddata()
Definition:
ProcessTestSignal.cc:65
Generated for CMSSW Reference Manual by
1.8.16