Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
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 <stdlib.h>
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
cmsRelvalreport.exit
tuple exit
Definition:
cmsRelvalreport.py:1000
instance
static PFTauRenderPlugin instance
Definition:
PFTauRenderPlugin.cc:70
ALIFileOut
Definition:
ALIFileOut.h:22
ALIFileOut::theInstances
static std::vector< ALIFileOut * > theInstances
Definition:
ALIFileOut.h:38
ALIFileOut.h
dtNoiseDBValidation_cfg.cerr
tuple cerr
Definition:
dtNoiseDBValidation_cfg.py:22
ALIstring
std::string ALIstring
Definition:
CocoaGlobals.h:9
lut2db_cfg.filename
tuple filename
Definition:
lut2db_cfg.py:20
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.5