CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
zmex::ZMexLogTwice Class Reference

#include <ZMexLogger.h>

+ Inheritance diagram for zmex::ZMexLogTwice:

Public Member Functions

 ZMexLogTwice (std::ostream &os1)
 
 ZMexLogTwice (std::ostream &os1, std::ostream &os2)
 
virtual ~ZMexLogTwice ()
 
virtual ZMexLogTwiceclone () const
 
virtual ZMexLogResult emit (const ZMexception &x)
 
virtual ZMexLogResult emit (const std::string &s)
 
- Public Member Functions inherited from zmex::ZMexLogBehavior
 ZMexLogBehavior ()
 
virtual ~ZMexLogBehavior ()
 
virtual ZMexLogBehaviorclone () const
 
virtual ZMexLogResult emit (const ZMexception &x)
 
virtual ZMexLogResult emit (const std::string &s)
 
virtual bool isTimeDesired () const
 
virtual bool isFilePathDesired () const
 

Detailed Description

Definition at line 160 of file ZMexLogger.h.

Constructor & Destructor Documentation

◆ ZMexLogTwice() [1/2]

zmex::ZMexLogTwice::ZMexLogTwice ( std::ostream &  os1)

Definition at line 135 of file ZMexLogger.cc.

137, myOs1( os1 )
138, myOs2( std::cerr )
139{ ; }

◆ ZMexLogTwice() [2/2]

zmex::ZMexLogTwice::ZMexLogTwice ( std::ostream &  os1,
std::ostream &  os2 
)

Definition at line 141 of file ZMexLogger.cc.

143, myOs1( os1 )
144, myOs2( os2 )
145{ ; }

◆ ~ZMexLogTwice()

zmex::ZMexLogTwice::~ZMexLogTwice ( )
virtual

Definition at line 147 of file ZMexLogger.cc.

147{ ; }

Member Function Documentation

◆ clone()

ZMexLogTwice * zmex::ZMexLogTwice::clone ( ) const
virtual

Reimplemented from zmex::ZMexLogBehavior.

Definition at line 150 of file ZMexLogger.cc.

150{ return new ZMexLogTwice( *this ); }
ZMexLogTwice(std::ostream &os1)
Definition: ZMexLogger.cc:135

◆ emit() [1/2]

ZMexLogResult zmex::ZMexLogTwice::emit ( const std::string &  s)
virtual

Reimplemented from zmex::ZMexLogBehavior.

Definition at line 163 of file ZMexLogger.cc.

165 {
166 //DEBUG cerr << "ZMexLogTwice::emit( \"" << s << "\" )" << endl;
167
168 // Emit the message, flushing the output right away:
169 myOs1 << s << std::flush;
170 myOs2 << s << std::flush;
171 return ZMexLOGGED;
172}
@ ZMexLOGGED
Definition: ZMexLogResult.h:19

◆ emit() [2/2]

ZMexLogResult zmex::ZMexLogTwice::emit ( const ZMexception x)
virtual

Reimplemented from zmex::ZMexLogBehavior.

Definition at line 152 of file ZMexLogger.cc.

152 {
153 std::string s = x.logMessage();
154 if (s != "")
155 return emit( s );
156
157 std::cerr << "WARNING: ZMexLogTwice() does not log in the usual manner for";
158 std::cerr << " SuperEx's.\n\t Its ostreams may not have received logs.\n";
159 x.logObject();
160 return ZMexLOGGED;
161}
virtual ZMexLogResult emit(const ZMexception &x)
Definition: ZMexLogger.cc:152

Referenced by emit().


The documentation for this class was generated from the following files: