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