Main Page
Namespaces
Classes
Package Documentation
L1Trigger
RPCTechnicalTrigger
src
RBCProcessTestSignal.cc
Go to the documentation of this file.
1
// Include files
2
3
4
// local
5
#include "
L1Trigger/RPCTechnicalTrigger/interface/RBCProcessTestSignal.h
"
6
#include "
L1Trigger/RPCTechnicalTrigger/interface/RBCLinkBoardSignal.h
"
7
//-----------------------------------------------------------------------------
8
// Implementation file for class : RBCProcessTestSignal
9
//
10
// 2008-10-10 : Andres Osorio
11
//-----------------------------------------------------------------------------
12
13
//=============================================================================
14
// Standard constructor, initializes variables
15
//=============================================================================
16
RBCProcessTestSignal::RBCProcessTestSignal
(
const
char
* f_name )
17
{
18
19
m_in
=
new
std::ifstream();
20
m_in
->open(f_name);
21
22
if
(!
m_in
->is_open()) {
23
std::cout
<<
"RBCProcessTestSignal> cannot open file"
<< std::endl;
24
}
else
{
25
std::cout
<<
"RBCProcessTestSignal> file is now open"
<< std::endl;
26
}
27
28
m_input
=
new
RBCInput
();
29
m_lbin
=
dynamic_cast<
RPCInputSignal
*
>
(
new
RBCLinkBoardSignal
(
m_input
) );
30
31
showfirst
();
32
33
}
34
//=============================================================================
35
// Destructor
36
//=============================================================================
37
RBCProcessTestSignal::~RBCProcessTestSignal
()
38
{
39
m_in
->close();
40
delete
m_in
;
41
42
if
(
m_lbin
)
delete
m_lbin
;
43
44
if
(
m_input
)
delete
m_input
;
45
46
}
47
48
//=============================================================================
49
50
int
RBCProcessTestSignal::next
()
51
{
52
53
if
(
m_in
->fail())
return
0;
54
(*m_in) >> (*m_input);
55
if
(
m_in
->eof() )
return
0;
56
return
1;
57
58
}
59
60
void
RBCProcessTestSignal::showfirst
()
61
{
62
rewind
();
63
(*m_in) >> (*m_input);
64
std::cout
<< (*m_input);
65
rewind
();
66
67
}
68
69
void
RBCProcessTestSignal::rewind
()
70
{
71
m_in
->clear();
72
m_in
->seekg(0,std::ios::beg);
73
}
74
RPCInputSignal
Definition:
RPCInputSignal.h:12
RBCProcessTestSignal::m_in
std::ifstream * m_in
Definition:
RBCProcessTestSignal.h:42
RBCLinkBoardSignal.h
RBCLinkBoardSignal
Definition:
RBCLinkBoardSignal.h:14
RBCInput
Definition:
RBCInput.h:21
RBCProcessTestSignal.h
RBCProcessTestSignal::next
int next() override
Definition:
RBCProcessTestSignal.cc:50
RBCProcessTestSignal::m_input
RBCInput * m_input
Definition:
RBCProcessTestSignal.h:50
RBCProcessTestSignal::showfirst
void showfirst()
Definition:
RBCProcessTestSignal.cc:60
RBCProcessTestSignal::rewind
void rewind()
Definition:
RBCProcessTestSignal.cc:69
RBCProcessTestSignal::~RBCProcessTestSignal
~RBCProcessTestSignal() override
Destructor.
Definition:
RBCProcessTestSignal.cc:37
gather_cfg.cout
cout
Definition:
gather_cfg.py:145
RBCProcessTestSignal::m_lbin
RPCInputSignal * m_lbin
Definition:
RBCProcessTestSignal.h:52
RBCProcessTestSignal::RBCProcessTestSignal
RBCProcessTestSignal()
Standard constructor.
Definition:
RBCProcessTestSignal.h:28
Generated for CMSSW Reference Manual by
1.8.11