CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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(const ALIstring &name)
Definition: ALIFileOut.h:24
~ALIFileOut() override
Definition: ALIFileOut.h:25
const ALIstring & name()
Definition: ALIFileOut.h:31
ALIstring theName
Name of file.
Definition: ALIFileOut.h:39
static std::vector< ALIFileOut * > theInstances
Definition: ALIFileOut.h:36
std::string ALIstring
Definition: CocoaGlobals.h:9
tuple filename
Definition: lut2db_cfg.py:20
static ALIFileOut & getInstance(const ALIstring &filename)
Definition: ALIFileOut.cc:18