Main Page
Namespaces
Classes
Package Documentation
L1Trigger
RPCTechnicalTrigger
src
TTUConfigurator.cc
Go to the documentation of this file.
1
// Include files
2
3
4
5
// local
6
#include "
L1Trigger/RPCTechnicalTrigger/interface/TTUConfigurator.h
"
7
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
8
9
//-----------------------------------------------------------------------------
10
// Implementation file for class : TTUConfigurator
11
//
12
// 2009-06-02 : Andres Felipe Osorio Oliveros
13
//-----------------------------------------------------------------------------
14
15
//=============================================================================
16
// Standard constructor, initializes variables
17
//=============================================================================
18
TTUConfigurator::TTUConfigurator
(
const
std::string
& infile ) {
19
20
m_in
=
new
std::ifstream();
21
m_in
->open( infile.c_str() );
22
23
if
(!
m_in
->is_open()) {
24
edm::LogError
(
"TTUConfigurator"
) <<
"TTUConfigurator cannot open file"
;
25
m_hasConfig
=
false
;
26
}
else
{
27
m_hasConfig
=
true
;
28
}
29
30
m_rbcspecs
=
new
RBCBoardSpecs
();
31
m_ttuspecs
=
new
TTUBoardSpecs
();
32
33
}
34
//=============================================================================
35
// Destructor
36
//=============================================================================
37
TTUConfigurator::~TTUConfigurator
() {
38
39
if
(
m_in
) {
40
m_in
->close();
41
delete
m_in
;
42
}
43
44
if
(
m_rbcspecs
)
delete
m_rbcspecs
;
45
if
(
m_ttuspecs
)
delete
m_ttuspecs
;
46
47
}
48
49
//=============================================================================
50
51
void
TTUConfigurator::process
()
52
{
53
54
addData
(
m_rbcspecs
);
55
addData
(
m_ttuspecs
);
56
57
}
58
59
void
TTUConfigurator::addData
(
RBCBoardSpecs
*
specs
)
60
{
61
62
RBCBoardSpecs::RBCBoardConfig
* board;
63
64
for
(
int
i
=0;
i
< 30;
i
++) {
65
66
board =
new
RBCBoardSpecs::RBCBoardConfig
();
67
68
(*m_in) >> (*board);
69
70
specs->
v_boardspecs
.push_back( *board );
71
72
}
73
74
}
75
76
void
TTUConfigurator::addData
(
TTUBoardSpecs
*
specs
)
77
{
78
79
TTUBoardSpecs::TTUBoardConfig
* board;
80
81
for
(
int
i
=0;
i
< 3;
i
++){
82
83
board=
new
TTUBoardSpecs::TTUBoardConfig
();
84
85
(*m_in) >> (*board);
86
87
specs->
m_boardspecs
.push_back( *board );
88
89
}
90
91
}
TTUConfigurator::process
void process()
Definition:
TTUConfigurator.cc:51
MessageLogger.h
RBCBoardSpecs::RBCBoardConfig
Definition:
RBCBoardSpecs.h:23
mps_fire.i
i
Definition:
mps_fire.py:269
TTUConfigurator::TTUConfigurator
TTUConfigurator()
Standard constructor.
Definition:
TTUConfigurator.h:33
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
TTUConfigurator::m_hasConfig
bool m_hasConfig
Definition:
TTUConfigurator.h:45
TTUBoardSpecs
Definition:
TTUBoardSpecs.h:18
edm::LogError
Definition:
MessageLogger.h:174
TTUConfigurator.h
TTUConfigurator::~TTUConfigurator
virtual ~TTUConfigurator()
Destructor.
Definition:
TTUConfigurator.cc:37
TTUBoardSpecs::m_boardspecs
std::vector< TTUBoardConfig > m_boardspecs
Definition:
TTUBoardSpecs.h:47
TTUConfigurator::m_rbcspecs
RBCBoardSpecs * m_rbcspecs
Definition:
TTUConfigurator.h:56
RBCBoardSpecs
Definition:
RBCBoardSpecs.h:17
RBCBoardSpecs::v_boardspecs
std::vector< RBCBoardConfig > v_boardspecs
Definition:
RBCBoardSpecs.h:43
TTUBoardSpecs::TTUBoardConfig
Definition:
TTUBoardSpecs.h:25
SiPixelPhase1DigisV_cfi.specs
specs
Definition:
SiPixelPhase1DigisV_cfi.py:13
TTUConfigurator::addData
void addData(RBCBoardSpecs *)
Definition:
TTUConfigurator.cc:59
TTUConfigurator::m_in
std::ifstream * m_in
Definition:
TTUConfigurator.h:51
TTUConfigurator::m_ttuspecs
TTUBoardSpecs * m_ttuspecs
Definition:
TTUConfigurator.h:57
Generated for CMSSW Reference Manual by
1.8.11