Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
Alignment
CocoaUtilities
src
ALIFileOut.cc
Go to the documentation of this file.
1
// COCOA class implementation file
2
//Id: ALIFileOut.C
3
//CAT: Model
4
//
5
// History: v1.0
6
// Pedro Arce
7
8
#include "
Alignment/CocoaUtilities/interface/ALIFileOut.h
"
9
10
#include <cstdlib>
11
#include <strstream>
12
13
std::vector<ALIFileOut*>
ALIFileOut::theInstances
;
14
15
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
16
//@@ get the instance of file with name filename
17
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
18
ALIFileOut
&
ALIFileOut::getInstance
(
const
ALIstring
&
filename
) {
19
std::vector<ALIFileOut*>::const_iterator vfcite;
20
for
(vfcite =
theInstances
.begin(); vfcite !=
theInstances
.end(); ++vfcite) {
21
if
((*vfcite)->name() ==
filename
) {
22
return
*(*vfcite);
23
break
;
24
}
25
}
26
27
if
(vfcite ==
theInstances
.end()) {
28
ALIFileOut
*
instance
=
new
ALIFileOut
(filename);
29
instance->open(filename.c_str());
30
if
(!instance) {
31
std::cerr
<<
"!! cannot open output file "
<< filename << std::endl;
32
exit
(0);
33
}
34
theInstances
.push_back(instance);
35
return
*
instance
;
36
}
37
38
ALIFileOut
*
instance
=
new
ALIFileOut
(filename);
// it will not reach here, only to avoid warning
39
return
*
instance
;
40
}
instance
static PFTauRenderPlugin instance
Definition:
PFTauRenderPlugin.cc:70
ALIFileOut
Definition:
ALIFileOut.h:21
ALIFileOut::theInstances
static std::vector< ALIFileOut * > theInstances
Definition:
ALIFileOut.h:36
ALIFileOut.h
beamvalidation.exit
def exit
Definition:
beamvalidation.py:52
ALIstring
std::string ALIstring
Definition:
CocoaGlobals.h:9
lut2db_cfg.filename
tuple filename
Definition:
lut2db_cfg.py:20
ALIFileOut::ALIFileOut
ALIFileOut()
Definition:
ALIFileOut.h:23
ALIFileOut::getInstance
static ALIFileOut & getInstance(const ALIstring &filename)
Definition:
ALIFileOut.cc:18
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
tuple cerr
Definition:
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
Generated for CMSSW Reference Manual by
1.8.5