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
}
ALIFileOut::getInstance
static ALIFileOut & getInstance(const ALIstring &filename)
Definition:
ALIFileOut.cc:18
ALIstring
std::string ALIstring
Definition:
CocoaGlobals.h:9
ALIFileOut
Definition:
ALIFileOut.h:21
ALIFileOut::ALIFileOut
ALIFileOut()
Definition:
ALIFileOut.h:23
ALIFileOut::theInstances
static std::vector< ALIFileOut * > theInstances
Definition:
ALIFileOut.h:36
corrVsCorr.filename
filename
Definition:
corrVsCorr.py:123
instance
static PFTauRenderPlugin instance
Definition:
PFTauRenderPlugin.cc:70
beamvalidation.exit
def exit(msg="")
Definition:
beamvalidation.py:53
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition:
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
ALIFileOut.h
Generated for CMSSW Reference Manual by
1.8.16