ROOT  6.06/09
Reference Guide
RooComplex.cxx
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * @(#)root/roofitcore:$Id$
5  * Authors: *
6  * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7  * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8  * *
9  * Copyright (c) 2000-2005, Regents of the University of California *
10  * and Stanford University. All rights reserved. *
11  * *
12  * Redistribution and use in source and binary forms, *
13  * with or without modification, are permitted according to the terms *
14  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15  *****************************************************************************/
16 
17 //////////////////////////////////////////////////////////////////////////////
18 //
19 // BEGIN_HTML
20 // Class RooComplex is a simple container class for complex values
21 // END_HTML
22 //
23 
24 #include "RooFit.h"
25 
26 #define ROO_COMPLEX_CXX
27 #include "RooComplex.h"
28 #include "Riostream.h"
29 #include <iomanip>
30 
31 using namespace std;
32 
34 
35 void RooComplex::warn() const
36 {
37  static int nwarns = 0;
38  if (nwarns < 1<<12) {
39  cout << "[#0] WARN: RooComplex is deprecated. Please use std::complex<Double_t> in your code instead." << std::endl;
40  ++nwarns;
41  }
42 }
43 
44 ////////////////////////////////////////////////////////////////////////////////
45 /// WVE Solaric CC5.0 complains about this
46 
47 void RooComplex::Print() const {
48  cout << *this << endl;
49 }
50 
51 ostream& operator<<(ostream& os, const RooComplex& z)
52 {
53  // Print real and imaginary component on ostream
54  return os << "(" << z.re() << "," << z.im() << ")";
55 }
Double_t re() const
Definition: RooComplex.h:79
STL namespace.
ostream & operator<<(ostream &os, const RooComplex &z)
Definition: RooComplex.cxx:51
#define ClassImp(name)
Definition: Rtypes.h:279
Double_t im() const
Definition: RooComplex.h:82
typedef void((*Func_t)())
void Print() const
WVE Solaric CC5.0 complains about this.
Definition: RooComplex.cxx:47