src
L1Trigger
RPCTechnicalTrigger
src
RBCProcessTestSignal.cc
Go to the documentation of this file.
1
// Include files
2
3
// local
4
#include "
L1Trigger/RPCTechnicalTrigger/interface/RBCProcessTestSignal.h
"
5
#include "
L1Trigger/RPCTechnicalTrigger/interface/RBCLinkBoardSignal.h
"
6
//-----------------------------------------------------------------------------
7
// Implementation file for class : RBCProcessTestSignal
8
//
9
// 2008-10-10 : Andres Osorio
10
//-----------------------------------------------------------------------------
11
12
//=============================================================================
13
// Standard constructor, initializes variables
14
//=============================================================================
15
RBCProcessTestSignal::RBCProcessTestSignal
(
const
char
* f_name)
16
: m_in{}, m_input{}, m_lbin{std::make_unique<RBCLinkBoardSignal>(&m_input)} {
17
m_in.open(f_name);
18
19
if
(!m_in.is_open()) {
20
std::cout
<<
"RBCProcessTestSignal> cannot open file"
<< std::endl;
21
}
else
{
22
std::cout
<<
"RBCProcessTestSignal> file is now open"
<< std::endl;
23
}
24
25
showfirst();
26
}
27
//=============================================================================
28
// Destructor
29
//=============================================================================
30
RBCProcessTestSignal::~RBCProcessTestSignal
() {
m_in
.close(); }
31
32
//=============================================================================
33
34
int
RBCProcessTestSignal::next
() {
35
if
(
m_in
.fail())
36
return
0;
37
m_in
>>
m_input
;
38
if
(
m_in
.eof())
39
return
0;
40
return
1;
41
}
42
43
void
RBCProcessTestSignal::showfirst
() {
44
rewind
();
45
m_in
>>
m_input
;
46
std::cout
<<
m_input
;
47
rewind
();
48
}
49
50
void
RBCProcessTestSignal::rewind
() {
51
m_in
.clear();
52
m_in
.seekg(0, std::ios::beg);
53
}
RBCLinkBoardSignal.h
RBCProcessTestSignal::m_in
std::ifstream m_in
Definition:
RBCProcessTestSignal.h:37
RBCProcessTestSignal.h
RBCProcessTestSignal::RBCProcessTestSignal
RBCProcessTestSignal(const char *)
Definition:
RBCProcessTestSignal.cc:15
RBCProcessTestSignal::m_input
RBCInput m_input
Definition:
RBCProcessTestSignal.h:43
RBCProcessTestSignal::next
int next() override
Definition:
RBCProcessTestSignal.cc:34
RBCProcessTestSignal::showfirst
void showfirst()
Definition:
RBCProcessTestSignal.cc:43
RBCProcessTestSignal::rewind
void rewind()
Definition:
RBCProcessTestSignal.cc:50
RBCProcessTestSignal::~RBCProcessTestSignal
~RBCProcessTestSignal() override
Destructor.
Definition:
RBCProcessTestSignal.cc:30
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
Generated for CMSSW Reference Manual by
1.8.14