Main Page
Namespaces
Classes
Package Documentation
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
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
17
//@@ get the instance of file with name filename
18
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
19
ALIFileOut
&
ALIFileOut::getInstance
(
const
ALIstring
&
filename
)
20
{
21
std::vector<ALIFileOut*>::const_iterator vfcite;
22
for
( vfcite =
theInstances
.begin(); vfcite !=
theInstances
.end(); ++vfcite) {
23
if
( (*vfcite)->name() ==
filename
) {
24
return
*(*vfcite);
25
break
;
26
}
27
}
28
29
if
( vfcite ==
theInstances
.end() ) {
30
ALIFileOut
*
instance
=
new
ALIFileOut
( filename );
31
instance->open(filename.c_str());
32
if
( !instance ) {
33
std::cerr
<<
"!! cannot open output file "
<< filename << std::endl;
34
exit
(0);
35
}
36
theInstances
.push_back( instance );
37
return
*
instance
;
38
}
39
40
ALIFileOut
*
instance
=
new
ALIFileOut
( filename );
// it will not reach here, only to avoid warning
41
return
*
instance
;
42
}
43
instance
static PFTauRenderPlugin instance
Definition:
PFTauRenderPlugin.cc:70
corrVsCorr.filename
filename
Definition:
corrVsCorr.py:121
MessageLogger_cfi.cerr
cerr
Definition:
MessageLogger_cfi.py:547
ALIFileOut
Definition:
ALIFileOut.h:22
ALIFileOut::theInstances
static std::vector< ALIFileOut * > theInstances
Definition:
ALIFileOut.h:38
ALIFileOut.h
cmsRelvalreport.exit
exit
Definition:
cmsRelvalreport.py:1000
ALIstring
std::string ALIstring
Definition:
CocoaGlobals.h:9
ALIFileOut::ALIFileOut
ALIFileOut()
Definition:
ALIFileOut.h:25
ALIFileOut::getInstance
static ALIFileOut & getInstance(const ALIstring &filename)
Definition:
ALIFileOut.cc:19
Generated for CMSSW Reference Manual by
1.8.11