BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
BesError.cxx File Reference
#include <assert.h>
#include <ctype.h>
#include <stdio.h>
#include "CLHEP/Matrix/Matrix.h"
#include "MdcRecoUtil/BesError.h"

Go to the source code of this file.

Functions

ostream & operator<< (ostream &out, const BesError &mat)
istream & operator>> (istream &in, BesError &mat)
BesError operator* (double t, const BesError &m1)
BesError operator* (const BesError &m1, double t)
BesError operator/ (double t, const BesError &m1)
BesError operator/ (const BesError &m1, double t)
BesError operator+ (const BesError &m1, const BesError &m2)
BesError operator- (const BesError &m1, const BesError &m2)

Function Documentation

◆ operator*() [1/2]

BesError operator* ( const BesError & m1,
double t )

Definition at line 164 of file BesError.cxx.

164 {
165 BesError mret = m1;
166 mret *= t;
167 return mret;
168}
double * m1
Definition qcdloop1.h:83
int t()
Definition t.c:1

◆ operator*() [2/2]

BesError operator* ( double t,
const BesError & m1 )

Definition at line 158 of file BesError.cxx.

158 {
159 BesError mret = m1;
160 mret *= t;
161 return mret;
162}

◆ operator+()

BesError operator+ ( const BesError & m1,
const BesError & m2 )

Definition at line 182 of file BesError.cxx.

182 {
183 BesError mret = m1;
184 mret += m2;
185 return mret;
186}
double double * m2
Definition qcdloop1.h:83

◆ operator-()

BesError operator- ( const BesError & m1,
const BesError & m2 )

Definition at line 188 of file BesError.cxx.

188 {
189 BesError mret = m1;
190 mret -= m2;
191 return mret;
192}

◆ operator/() [1/2]

BesError operator/ ( const BesError & m1,
double t )

Definition at line 176 of file BesError.cxx.

176 {
177 BesError mret = m1;
178 mret /= t;
179 return mret;
180}

◆ operator/() [2/2]

BesError operator/ ( double t,
const BesError & m1 )

Definition at line 170 of file BesError.cxx.

170 {
171 BesError mret = m1;
172 mret /= t;
173 return mret;
174}

◆ operator<<()

ostream & operator<< ( ostream & out,
const BesError & mat )

Definition at line 128 of file BesError.cxx.

128 {
129 out << "Bes Covariance Matrix:";
130 out << (HepSymMatrix&)mat;
131 return out;
132}

◆ operator>>()

istream & operator>> ( istream & in,
BesError & mat )

Definition at line 134 of file BesError.cxx.

134 {
135 // Peek at the next non-space character:
136 char nextChar = ' ';
137 while ( isspace( nextChar ) ) { nextChar = in.get(); }
138 in.putback( nextChar );
139
140 if ( EOF != nextChar )
141 {
142 if ( !isdigit( nextChar ) )
143 {
144 // Remove the "Bes Covariance Matrix:" line:
145 const int DUMMY_SIZE = 1000;
146 char dummy[DUMMY_SIZE];
147 in.getline( dummy, DUMMY_SIZE );
148 }
149 // Read in the matrix:
150 for ( int row = 1; row <= mat.num_row(); ++row )
151 {
152 for ( int col = 1; col <= mat.num_col(); ++col ) { in >> mat( row, col ); }
153 }
154 }
155 return in;
156}