#include <ALIFileOut.h>
Public Member Functions | |
ALIFileOut () | |
ALIFileOut (const ALIstring &name) | |
const ALIstring & | name () |
~ALIFileOut () | |
Static Public Member Functions | |
static ALIFileOut & | getInstance (const ALIstring &filename) |
Private Attributes | |
ALIstring | theName |
Name of file. | |
Static Private Attributes | |
static std::vector< ALIFileOut * > | theInstances |
Definition at line 22 of file ALIFileOut.h.
ALIFileOut::ALIFileOut | ( | ) | [inline] |
ALIFileOut::ALIFileOut | ( | const ALIstring & | name | ) | [inline] |
Definition at line 26 of file ALIFileOut.h.
ALIFileOut::~ALIFileOut | ( | ) | [inline] |
Definition at line 27 of file ALIFileOut.h.
{};
ALIFileOut & ALIFileOut::getInstance | ( | const ALIstring & | filename | ) | [static] |
Definition at line 19 of file ALIFileOut.cc.
References ALIFileOut(), benchmark_cfg::cerr, cmsRelvalreport::exit, lut2db_cfg::filename, and theInstances.
Referenced by Fit::fitNextEvent(), and CocoaAnalyzer::RunCocoa().
{ std::vector<ALIFileOut*>::const_iterator vfcite; for( vfcite = theInstances.begin(); vfcite != theInstances.end(); vfcite++) { if( (*vfcite)->name() == filename) { return *(*vfcite); break; } } if( vfcite == theInstances.end() ) { ALIFileOut* instance = new ALIFileOut( filename ); instance->open(filename.c_str()); if( !instance ) { std::cerr << "!! cannot open output file " << filename << std::endl; exit(0); } theInstances.push_back( instance ); return *instance; } ALIFileOut* instance = new ALIFileOut( filename ); // it will not reach here, only to avoid warning return *instance; }
const ALIstring& ALIFileOut::name | ( | ) | [inline] |
Definition at line 33 of file ALIFileOut.h.
References theName.
Referenced by CocoaToDDLMgr::so(), and CocoaToDDLMgr::writeSpecParsCocoa().
{ return theName; }
std::vector< ALIFileOut * > ALIFileOut::theInstances [static, private] |
Definition at line 38 of file ALIFileOut.h.
Referenced by getInstance().
ALIstring ALIFileOut::theName [private] |