Main Page
Namespaces
Classes
Package Documentation
src
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
m_in{},
18
m_input
{},
19
m_lbin
{std::make_unique<RBCLinkBoardSignal>( &
m_input
) }
20
{
21
m_in
.open(f_name);
22
23
if
(!
m_in
.is_open()) {
24
std::cout
<<
"RBCProcessTestSignal> cannot open file"
<< std::endl;
25
}
else
{
26
std::cout
<<
"RBCProcessTestSignal> file is now open"
<< std::endl;
27
}
28
29
showfirst
();
30
31
}
32
//=============================================================================
33
// Destructor
34
//=============================================================================
35
RBCProcessTestSignal::~RBCProcessTestSignal
()
36
{
37
m_in
.close();
38
}
39
40
//=============================================================================
41
42
int
RBCProcessTestSignal::next
()
43
{
44
45
if
(
m_in
.fail())
return
0;
46
m_in
>>
m_input
;
47
if
(
m_in
.eof() )
return
0;
48
return
1;
49
50
}
51
52
void
RBCProcessTestSignal::showfirst
()
53
{
54
rewind
();
55
m_in
>>
m_input
;
56
std::cout
<<
m_input
;
57
rewind
();
58
59
}
60
61
void
RBCProcessTestSignal::rewind
()
62
{
63
m_in
.clear();
64
m_in
.seekg(0,std::ios::beg);
65
}
66
RBCProcessTestSignal::m_lbin
std::unique_ptr< RPCInputSignal > m_lbin
Definition:
RBCProcessTestSignal.h:50
RBCLinkBoardSignal.h
RBCProcessTestSignal::m_in
std::ifstream m_in
Definition:
RBCProcessTestSignal.h:40
RBCProcessTestSignal.h
RBCProcessTestSignal::RBCProcessTestSignal
RBCProcessTestSignal(const char *)
Definition:
RBCProcessTestSignal.cc:16
RBCProcessTestSignal::m_input
RBCInput m_input
Definition:
RBCProcessTestSignal.h:48
RBCProcessTestSignal::next
int next() override
Definition:
RBCProcessTestSignal.cc:42
RBCProcessTestSignal::showfirst
void showfirst()
Definition:
RBCProcessTestSignal.cc:52
RBCProcessTestSignal::rewind
void rewind()
Definition:
RBCProcessTestSignal.cc:61
RBCProcessTestSignal::~RBCProcessTestSignal
~RBCProcessTestSignal() override
Destructor.
Definition:
RBCProcessTestSignal.cc:35
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
Generated for CMSSW Reference Manual by
1.8.11