CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/Alignment/CocoaUtilities/interface/ALIFileOut.h

Go to the documentation of this file.
00001 //   COCOA class header file
00002 //Id:  ALIFileOut.h
00003 //CAT: Model
00004 //
00005 //   ostream class for handling the output
00006 // 
00007 //   History: v1.0 
00008 //   Pedro Arce
00009 
00010 #ifndef FILEOUT_H
00011 #define FILEOUT_H
00012 
00013 #include <fstream>
00014 #include <iostream>
00015 
00016 #include <vector>
00017 //#include "bstring.h"
00018 
00019 #include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
00020 
00021 
00022 class ALIFileOut : public std::ofstream 
00023 {
00024 public:
00025   ALIFileOut(){};
00026   ALIFileOut( const ALIstring& name ): std::ofstream(), theName(name){};
00027   ~ALIFileOut(){};
00028 
00029   // get the instance of file with name filename
00030   static ALIFileOut& getInstance( const ALIstring& filename );
00031 
00032  // Access data members
00033   const ALIstring& name() { return theName; }
00034 
00035 // private DATA MEMEBERS
00036 private:
00037   // Class only instance
00038   static std::vector<ALIFileOut*> theInstances;
00039 
00041   ALIstring theName; 
00042 };
00043 
00044 #endif 
00045