CMS 3D CMS Logo

ALIFileOut Class Reference

#include <Alignment/CocoaUtilities/interface/ALIFileOut.h>

List of all members.

Public Member Functions

 ALIFileOut (const ALIstring &name)
 ALIFileOut ()
const ALIstringname ()
 ~ALIFileOut ()

Static Public Member Functions

static ALIFileOutgetInstance (const ALIstring &filename)

Private Attributes

ALIstring theName
 Name of file.

Static Private Attributes

static std::vector< ALIFileOut * > theInstances


Detailed Description

Definition at line 22 of file ALIFileOut.h.


Constructor & Destructor Documentation

ALIFileOut::ALIFileOut (  )  [inline]

Definition at line 25 of file ALIFileOut.h.

Referenced by getInstance().

00025 {};

ALIFileOut::ALIFileOut ( const ALIstring name  )  [inline]

Definition at line 26 of file ALIFileOut.h.

00026 : std::ofstream(), theName(name){};

ALIFileOut::~ALIFileOut (  )  [inline]

Definition at line 27 of file ALIFileOut.h.

00027 {};


Member Function Documentation

ALIFileOut & ALIFileOut::getInstance ( const ALIstring filename  )  [static]

Definition at line 19 of file ALIFileOut.cc.

References ALIFileOut(), TestMuL1L2Filter_cff::cerr, lat::endl(), cmsRelvalreport::exit, and theInstances.

Referenced by Fit::dumpMatrices(), Fit::fitNextEvent(), Fit::getFitQuality(), Fit::PrintChi2(), and CocoaAnalyzer::RunCocoa().

00020 {
00021   std::vector<ALIFileOut*>::const_iterator vfcite;
00022   for( vfcite = theInstances.begin(); vfcite != theInstances.end(); vfcite++) {
00023     if( (*vfcite)->name() == filename) {
00024       return *(*vfcite);
00025       break;
00026     }
00027   }
00028 
00029   if( vfcite == theInstances.end() ) {
00030     ALIFileOut* instance = new ALIFileOut( filename );
00031     instance->open(filename.c_str());
00032     if( !instance ) {
00033       std::cerr << "!! cannot open output file " << filename << std::endl; 
00034       exit(0); 
00035     }
00036     theInstances.push_back( instance );
00037     return *instance;
00038   }
00039 }

const ALIstring& ALIFileOut::name (  )  [inline]

Definition at line 33 of file ALIFileOut.h.

References theName.

Referenced by CocoaToDDLMgr::so(), and CocoaToDDLMgr::writeSpecParsCocoa().

00033 { return theName; }


Member Data Documentation

std::vector< ALIFileOut * > ALIFileOut::theInstances [static, private]

Definition at line 38 of file ALIFileOut.h.

Referenced by getInstance().

ALIstring ALIFileOut::theName [private]

Name of file.

Definition at line 41 of file ALIFileOut.h.

Referenced by name().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:14:12 2009 for CMSSW by  doxygen 1.5.4