CondFormats
L1TObjects
src
L1TriggerLutFile.cc
Go to the documentation of this file.
1
//-------------------------------------------------
2
//
3
// Class: L1TriggerLutFile
4
//
5
// Description: Auxiliary class for
6
// Look-up table files
7
//
8
//
9
// $Date: 2007/02/27 11:43:59 $
10
// $Revision: 1.2 $
11
//
12
// Author :
13
// N. Neumeister CERN EP
14
// J. Troconiz UAM Madrid
15
//
16
//--------------------------------------------------
17
18
//-----------------------
19
// This Class's Header --
20
//-----------------------
21
22
#include "
CondFormats/L1TObjects/interface/L1TriggerLutFile.h
"
23
24
//---------------
25
// C++ Headers --
26
//---------------
27
28
#include <iostream>
29
30
//-------------------------------
31
// Collaborating Class Headers --
32
//-------------------------------
33
34
using namespace
std
;
35
36
// --------------------------------
37
// class L1TriggerLutFile
38
//---------------------------------
39
40
//----------------
41
// Constructors --
42
//----------------
43
44
L1TriggerLutFile::L1TriggerLutFile
(
const
string
name
) : m_file(
name
) {}
45
46
L1TriggerLutFile::L1TriggerLutFile
(
const
L1TriggerLutFile
&
in
) : m_file(
in
.m_file) {}
47
48
//--------------
49
// Destructor --
50
//--------------
51
L1TriggerLutFile::~L1TriggerLutFile
() {}
52
53
//--------------
54
// Operations --
55
//--------------
56
57
//
58
// assignment operator
59
//
60
L1TriggerLutFile
&
L1TriggerLutFile::operator=
(
const
L1TriggerLutFile
& lut) {
61
m_file
= lut.
m_file
;
62
return
*
this
;
63
}
64
65
//
66
// open file
67
//
68
int
L1TriggerLutFile::open
() {
69
const
char
*
file_name
=
m_file
.c_str();
70
m_fin
.open(
file_name
,
ios::in
);
71
if
(!
m_fin
) {
72
cout
<<
"can not open file : "
<<
file_name
<< endl;
73
return
-1;
74
}
else
{
75
return
0;
76
}
77
}
78
79
//
80
// read and ignore n lines from file
81
//
82
void
L1TriggerLutFile::ignoreLines
(
int
n
) {
83
char
buf
[256];
84
for
(
int
i
= 0;
i
<
n
;
i
++)
85
m_fin
.getline(
buf
, 256);
86
}
87
88
//
89
// read one integer from file
90
//
91
int
L1TriggerLutFile::readInteger
() {
92
int
tmp
= 0;
93
m_fin
>>
tmp
;
94
return
tmp
;
95
}
96
97
//
98
// read one hex from file
99
//
100
int
L1TriggerLutFile::readHex
() {
101
int
tmp
= 0;
102
m_fin
>> hex >>
tmp
;
103
return
tmp
;
104
}
105
106
//
107
// read one string from file
108
//
109
string
L1TriggerLutFile::readString
() {
110
string
tmp
;
111
m_fin
>>
tmp
;
112
return
tmp
;
113
}
mps_fire.i
i
Definition:
mps_fire.py:428
dqmiodumpmetadata.n
n
Definition:
dqmiodumpmetadata.py:28
L1TriggerLutFile::open
int open()
open file
Definition:
L1TriggerLutFile.cc:68
L1TriggerLutFile
Definition:
L1TriggerLutFile.h:37
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
L1TriggerLutFile::~L1TriggerLutFile
virtual ~L1TriggerLutFile()
destructor
Definition:
L1TriggerLutFile.cc:51
L1TriggerLutFile::m_fin
std::ifstream m_fin
Definition:
L1TriggerLutFile.h:79
createJobs.tmp
tmp
align.sh
Definition:
createJobs.py:716
L1TriggerLutFile::ignoreLines
void ignoreLines(int n)
read and ignore n lines from file
Definition:
L1TriggerLutFile.cc:82
contentValuesCheck.file_name
file_name
Definition:
contentValuesCheck.py:38
L1TriggerLutFile::readInteger
int readInteger()
read one integer from file
Definition:
L1TriggerLutFile.cc:91
L1TriggerLutFile::L1TriggerLutFile
L1TriggerLutFile(const std::string name="")
constructor
recoMuon::in
Definition:
RecoMuonEnumerators.h:6
L1TriggerLutFile::m_file
std::string m_file
Definition:
L1TriggerLutFile.h:80
L1TriggerLutFile::operator=
L1TriggerLutFile & operator=(const L1TriggerLutFile &)
assignment operator
Definition:
L1TriggerLutFile.cc:60
visDQMUpload.buf
buf
Definition:
visDQMUpload.py:154
std
Definition:
JetResolutionObject.h:76
Skims_PA_cff.name
name
Definition:
Skims_PA_cff.py:17
L1TriggerLutFile::readString
std::string readString()
read one string from file
Definition:
L1TriggerLutFile.cc:109
L1TriggerLutFile.h
L1TriggerLutFile::readHex
int readHex()
read one hex from file
Definition:
L1TriggerLutFile.cc:100
Generated for CMSSW Reference Manual by
1.8.16