StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StDbMessenger.hh
1 /***************************************************************************
2  *
3  * $Id: StDbMessenger.hh,v 1.3 2003/09/16 22:44:17 porter Exp $
4  *
5  * Author: R. Jeff Porter
6  ***************************************************************************
7  *
8  * Description: Implementation of StDbMessService used within StDbLib
9  * in stand-alone mode
10  *
11  ***************************************************************************
12  *
13  * $Log: StDbMessenger.hh,v $
14  * Revision 1.3 2003/09/16 22:44:17 porter
15  * got rid of all ostrstream objects; replaced with ostringstream+string.
16  * modified rules.make and added file stdb_streams.h for standalone compilation
17  *
18  * Revision 1.2 2003/09/02 17:57:49 perev
19  * gcc 3.2 updates + WarnOff
20  *
21  * Revision 1.1 2001/01/22 18:37:57 porter
22  * Update of code needed in next year running. This update has little
23  * effect on the interface (only 1 method has been changed in the interface).
24  * Code also preserves backwards compatibility so that old versions of
25  * StDbLib can read new table structures.
26  * -Important features:
27  * a. more efficient low-level table structure (see StDbSql.cc)
28  * b. more flexible indexing for new systems (see StDbElememtIndex.cc)
29  * c. environment variable override KEYS for each database
30  * d. StMessage support & clock-time logging diagnostics
31  * -Cosmetic features
32  * e. hid stl behind interfaces (see new *Impl.* files) to again allow rootcint access
33  * f. removed codes that have been obsolete for awhile (e.g. db factories)
34  * & renamed some classes for clarity (e.g. tableQuery became StDataBaseI
35  * and mysqlAccessor became StDbSql)
36  *
37  *
38  **************************************************************************/
39 #ifndef __StDbMessenger_HH
40 #define __StDbMessenger_HH
41 
42 #include "StDbMessService.hh"
43 #include "stdb_streams.h"
44 
46 
47 public:
48 
49 ostream& mos;
50 
51  StDbMessenger():mos(cout){};
52  StDbMessenger(ostream& os):mos(os){};
53  StDbMessenger(StDbMessenger& m): mos(m.mos) { mdbLevel=m.getMessLevel(); }
54 
55  virtual ~StDbMessenger(){};
56 
57  virtual void printMessage(const char* message,
58  StDbMessLevel dbLevel,
59  int lineNumber,
60  const char* className,
61  const char* methodName);
62 
63  virtual void printMessage(const char* message,
64  const char* levelString,
65  int lineNumber,
66  const char* className,
67  const char* methodName) ;
68 
69 };
70 
71 #endif