Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:44:33

0001 //   COCOA class header file

0002 //Id:  ALIFileOut.h

0003 //CAT: Model

0004 //

0005 //   ostream class for handling the output

0006 //

0007 //   History: v1.0

0008 //   Pedro Arce

0009 
0010 #ifndef FILEOUT_H
0011 #define FILEOUT_H
0012 
0013 #include <fstream>
0014 #include <iostream>
0015 
0016 #include <vector>
0017 //#include "bstring.h"

0018 
0019 #include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
0020 
0021 class ALIFileOut : public std::ofstream {
0022 public:
0023   ALIFileOut(){};
0024   ALIFileOut(const ALIstring& name) : std::ofstream(), theName(name){};
0025   ~ALIFileOut() override{};
0026 
0027   // get the instance of file with name filename

0028   static ALIFileOut& getInstance(const ALIstring& filename);
0029 
0030   // Access data members

0031   const ALIstring& name() { return theName; }
0032 
0033   // private DATA MEMEBERS

0034 private:
0035   // Class only instance

0036   static std::vector<ALIFileOut*> theInstances;
0037 
0038   /// Name of file

0039   ALIstring theName;
0040 };
0041 
0042 #endif