Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
L1Trigger
RPCTechnicalTrigger
src
RBCProcessTestSignal.cc
Go to the documentation of this file.
1
// $Id: RBCProcessTestSignal.cc,v 1.1 2009/01/30 15:42:48 aosorio Exp $
2
// Include files
3
4
5
// local
6
#include "
L1Trigger/RPCTechnicalTrigger/interface/RBCProcessTestSignal.h
"
7
#include "
L1Trigger/RPCTechnicalTrigger/interface/RBCLinkBoardSignal.h
"
8
//-----------------------------------------------------------------------------
9
// Implementation file for class : RBCProcessTestSignal
10
//
11
// 2008-10-10 : Andres Osorio
12
//-----------------------------------------------------------------------------
13
14
//=============================================================================
15
// Standard constructor, initializes variables
16
//=============================================================================
17
RBCProcessTestSignal::RBCProcessTestSignal
(
const
char
* f_name )
18
{
19
20
m_in
=
new
std::ifstream();
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
m_input
=
new
RBCInput
();
30
m_lbin
=
dynamic_cast<
RPCInputSignal
*
>
(
new
RBCLinkBoardSignal
(
m_input
) );
31
32
showfirst
();
33
34
}
35
//=============================================================================
36
// Destructor
37
//=============================================================================
38
RBCProcessTestSignal::~RBCProcessTestSignal
()
39
{
40
m_in
->close();
41
delete
m_in
;
42
43
if
(
m_lbin
)
delete
m_lbin
;
44
45
if
(
m_input
)
delete
m_input
;
46
47
}
48
49
//=============================================================================
50
51
int
RBCProcessTestSignal::next
()
52
{
53
54
if
(
m_in
->fail())
return
0;
55
(*m_in) >> (*m_input);
56
if
(
m_in
->eof() )
return
0;
57
return
1;
58
59
}
60
61
void
RBCProcessTestSignal::showfirst
()
62
{
63
rewind
();
64
(*m_in) >> (*m_input);
65
std::cout
<< (*m_input);
66
rewind
();
67
68
}
69
70
void
RBCProcessTestSignal::rewind
()
71
{
72
m_in
->clear();
73
m_in
->seekg(0,std::ios::beg);
74
}
75
RPCInputSignal
Definition:
RPCInputSignal.h:13
RBCProcessTestSignal::m_in
std::ifstream * m_in
Definition:
RBCProcessTestSignal.h:43
RBCLinkBoardSignal.h
RBCProcessTestSignal::next
int next()
Definition:
RBCProcessTestSignal.cc:51
RBCLinkBoardSignal
Definition:
RBCLinkBoardSignal.h:15
RBCProcessTestSignal::~RBCProcessTestSignal
virtual ~RBCProcessTestSignal()
Destructor.
Definition:
RBCProcessTestSignal.cc:38
RBCInput
Definition:
RBCInput.h:22
RBCProcessTestSignal.h
RBCProcessTestSignal::m_input
RBCInput * m_input
Definition:
RBCProcessTestSignal.h:51
RBCProcessTestSignal::showfirst
void showfirst()
Definition:
RBCProcessTestSignal.cc:61
RBCProcessTestSignal::rewind
void rewind()
Definition:
RBCProcessTestSignal.cc:70
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:41
RBCProcessTestSignal::m_lbin
RPCInputSignal * m_lbin
Definition:
RBCProcessTestSignal.h:53
RBCProcessTestSignal::RBCProcessTestSignal
RBCProcessTestSignal()
Standard constructor.
Definition:
RBCProcessTestSignal.h:29
Generated for CMSSW Reference Manual by
1.8.5