Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Alignment
CocoaUtilities
interface
ALIFileIn.h
Go to the documentation of this file.
1
// COCOA class header file
2
//Id: ALIFileIn.h
3
//CAT: Model
4
//
5
// istream class for handling the reading of files
6
//
7
// History: v1.0
8
// Pedro Arce
9
10
#ifndef FILEIN_H
11
#define FILEIN_H
12
13
#include <fstream>
14
#include <iostream>
15
16
#include <vector>
17
18
#include "
Alignment/CocoaUtilities/interface/CocoaGlobals.h
"
19
20
class
ALIFileIn
{
21
public
:
22
ALIFileIn
(){};
23
~ALIFileIn
() {}
24
25
private
:
26
ALIFileIn
(
const
ALIstring
&
name
) :
theName
(
name
) {}
27
28
public
:
29
// Get the only instance opening the file
30
static
ALIFileIn
&
getInstance
(
const
ALIstring
&
name
);
31
// Get the only instance when file should be already opened
32
static
ALIFileIn
&
getInstanceOpened
(
const
ALIstring
&
name
);
33
34
// Read a line and transform it to a vector of words
35
ALIint
getWordsInLine
(std::vector<ALIstring>&
wl
);
36
37
// Print out an error message indicating the line being read
38
void
ErrorInLine
();
39
40
// Access data members
41
const
ALIint
nline
() {
return
theLineNo
[
theCurrentFile
]; }
42
43
const
ALIstring
&
name
() {
return
theName
; }
44
45
ALIbool
eof
();
46
void
close
();
47
48
private
:
49
void
openNewFile
(
const
char
*
filename
);
50
51
private
:
52
std::vector<std::ifstream*>
theFiles
;
53
// Number of line being read
54
std::vector<ALIint>
theLineNo
;
55
std::vector<ALIstring>
theNames
;
56
int
theCurrentFile
;
// index of file being read in theFiles
57
58
// private DATA MEMEBERS
59
// Vector of class instances (each one identified by its name)
60
static
std::vector<ALIFileIn*>
theInstances
;
61
63
ALIstring
theName
;
64
};
65
66
#endif
ALIbool
bool ALIbool
Definition:
CocoaGlobals.h:19
ALIFileIn::openNewFile
void openNewFile(const char *filename)
Definition:
ALIFileIn.cc:38
ALIFileIn::theLineNo
std::vector< ALIint > theLineNo
Definition:
ALIFileIn.h:54
ALIFileIn::theFiles
std::vector< std::ifstream * > theFiles
Definition:
ALIFileIn.h:52
LaserClient_cfi.wl
wl
Definition:
LaserClient_cfi.py:46
ALIstring
std::string ALIstring
Definition:
CocoaGlobals.h:9
ALIFileIn::nline
const ALIint nline()
Definition:
ALIFileIn.h:41
ALIFileIn::getInstanceOpened
static ALIFileIn & getInstanceOpened(const ALIstring &name)
Definition:
ALIFileIn.cc:60
ALIFileIn::theInstances
static std::vector< ALIFileIn * > theInstances
Definition:
ALIFileIn.h:60
corrVsCorr.filename
filename
Definition:
corrVsCorr.py:123
ALIFileIn::theNames
std::vector< ALIstring > theNames
Definition:
ALIFileIn.h:55
ALIFileIn::~ALIFileIn
~ALIFileIn()
Definition:
ALIFileIn.h:23
ALIFileIn::ALIFileIn
ALIFileIn(const ALIstring &name)
Definition:
ALIFileIn.h:26
ALIFileIn::getInstance
static ALIFileIn & getInstance(const ALIstring &name)
Definition:
ALIFileIn.cc:22
ALIFileIn::ErrorInLine
void ErrorInLine()
Definition:
ALIFileIn.cc:196
ALIFileIn::ALIFileIn
ALIFileIn()
Definition:
ALIFileIn.h:22
ALIFileIn::close
void close()
Definition:
ALIFileIn.cc:218
ALIFileIn::eof
ALIbool eof()
Definition:
ALIFileIn.cc:201
ALIint
int ALIint
Definition:
CocoaGlobals.h:15
ALIFileIn::name
const ALIstring & name()
Definition:
ALIFileIn.h:43
ALIFileIn::getWordsInLine
ALIint getWordsInLine(std::vector< ALIstring > &wl)
Definition:
ALIFileIn.cc:74
CocoaGlobals.h
ALIFileIn::theName
ALIstring theName
Name of file.
Definition:
ALIFileIn.h:63
ALIFileIn::theCurrentFile
int theCurrentFile
Definition:
ALIFileIn.h:56
ALIFileIn
Definition:
ALIFileIn.h:20
Generated for CMSSW Reference Manual by
1.8.16