Line data Source code
1 : //--------------------------------------------------------------------------
2 : //
3 : // Environment:
4 : // This software is part of the EvtGen package developed jointly
5 : // for the BaBar and CLEO collaborations. If you use all or part
6 : // of it, please give an appropriate acknowledgement.
7 : //
8 : // Copyright Information: See EvtGen/COPYRIGHT
9 : // Copyright (C) 1998 Caltech, UCSB
10 : //
11 : // Module: EvtReport.cc
12 : //
13 : // Description: definitions of global functions.
14 : //
15 : // Modification history:
16 : //
17 : // Simon Patton June 3, 1996 Module created
18 : //
19 : //------------------------------------------------------------------------
20 : //
21 : #include "EvtGenBase/EvtPatches.hh"
22 :
23 : #include "EvtGenBase/EvtReport.hh"
24 : using std::cerr;
25 : using std::cout;
26 : using std::endl;
27 : using std::ostream;
28 :
29 :
30 : //
31 : // constants, enums and typedefs
32 : //
33 :
34 :
35 : ostream& report( Severity::Enum severity ,
36 : const char* facility )
37 : {
38 : int printNoFacility=1;
39 :
40 0 : if ( ( facility == 0 ) &&
41 : ( printNoFacility ==1) ) {
42 0 : cout << "There is no `facility' implemented in `report'"
43 0 : << endl ;
44 : printNoFacility = 0 ;
45 0 : }
46 0 : if ( severity < Severity::Warning ) {
47 0 : if (facility[0]!=0){
48 0 : cerr<<facility<<":";
49 0 : }
50 0 : return ( cerr ) ;
51 : }
52 0 : if (facility[0]!=0){
53 0 : cout<<facility<<":";
54 0 : }
55 0 : return cout;
56 0 : }
57 :
58 :
|