CMS 3D CMS Logo

ALIFileOut.h
Go to the documentation of this file.
1 // COCOA class header file
2 //Id: ALIFileOut.h
3 //CAT: Model
4 //
5 // ostream class for handling the output
6 //
7 // History: v1.0
8 // Pedro Arce
9 
10 #ifndef FILEOUT_H
11 #define FILEOUT_H
12 
13 #include <fstream>
14 #include <iostream>
15 
16 #include <vector>
17 //#include "bstring.h"
18 
20 
21 class ALIFileOut : public std::ofstream {
22 public:
24  ALIFileOut(const ALIstring& name) : std::ofstream(), theName(name){};
25  ~ALIFileOut() override{};
26 
27  // get the instance of file with name filename
28  static ALIFileOut& getInstance(const ALIstring& filename);
29 
30  // Access data members
31  const ALIstring& name() { return theName; }
32 
33  // private DATA MEMEBERS
34 private:
35  // Class only instance
36  static std::vector<ALIFileOut*> theInstances;
37 
40 };
41 
42 #endif
ALIFileOut::getInstance
static ALIFileOut & getInstance(const ALIstring &filename)
Definition: ALIFileOut.cc:18
ALIstring
std::string ALIstring
Definition: CocoaGlobals.h:9
ALIFileOut::theName
ALIstring theName
Name of file.
Definition: ALIFileOut.h:39
ALIFileOut
Definition: ALIFileOut.h:21
ALIFileOut::ALIFileOut
ALIFileOut()
Definition: ALIFileOut.h:23
ALIFileOut::theInstances
static std::vector< ALIFileOut * > theInstances
Definition: ALIFileOut.h:36
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
ALIFileOut::~ALIFileOut
~ALIFileOut() override
Definition: ALIFileOut.h:25
std
Definition: JetResolutionObject.h:76
ALIFileOut::ALIFileOut
ALIFileOut(const ALIstring &name)
Definition: ALIFileOut.h:24
CocoaGlobals.h
ALIFileOut::name
const ALIstring & name()
Definition: ALIFileOut.h:31