ParMooN
 All Classes Functions Variables Friends Pages
MooNMD_Io.h
1 // =======================================================================
2 //
3 // Purpose: Collection of routine and methods for IO
4 //
5 // Author: Gunar Matthies
6 //
7 // Date: 2004/02/19
8 //
9 // =======================================================================
10 
11 #ifndef __MOONMD_IO__
12 #define __MOONMD_IO__
13 
14 #include <iostream>
15 #include <iomanip>
16 #include <fstream>
17 #include <sstream>
18 
19 using std::cout;
20 using std::cerr;
21 using std::endl;
22 using std::ends;
23 using std::setw;
24 using std::setprecision;
25 
26 void OpenFiles();
27 void CloseFiles();
28 
29 #define OutPut(x) {OutFile << x; cout << x;}
30 #define ErrMsg(x) { cerr <<"Error in file "<<__FILE__<<", line "<<__LINE__<<":\n"<<x<<endl; OutFile<<"Error in file "<<__FILE__<<", line "<<__LINE__<<":\n"<<x<<endl;}
31 #define Error(x) {ErrMsg(x)}
32 
33 extern std::ofstream OutFile;
34 
35 #endif