BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Ext_errmx.cxx File Reference
#include <iostream>
#include "Ext_errmx.h"

Go to the source code of this file.

Functions

bool Ext_err_valid (bool msg, const HepSymMatrix &error, const int dimension)
std::ostream & operator<< (std::ostream &s, const Ext_errmx &err)

Function Documentation

◆ Ext_err_valid()

bool Ext_err_valid ( bool msg,
const HepSymMatrix & error,
const int dimension )
extern

Definition at line 96 of file Ext_err_valid.cxx.

96 {
97 bool valid( 1 );
98 double trace( 0 );
99
100 for ( int i = 1; i <= dimension; i++ )
101 {
102 double elem( error( i, i ) );
103 trace += elem;
104 if ( elem < 0.0 )
105 {
106 valid = 0;
107 if ( msg )
108 {
109 std::cout << "%ERROR detected at Ext_err_valid: error matrix: error(" << i << "," << i
110 << ")= " << elem << " < 0.0." << std::endl;
111 }
112 }
113 else if ( elem > Large )
114 {
115 valid = 0;
116 if ( msg )
117 {
118 std::cout << "%ERROR detected at Ext_err_valid: error matrix: error(" << i << "," << i
119 << ")= " << elem << " > " << Large << std::endl;
120 }
121 }
122 }
123 if ( !trace ) valid = 0;
124 return ( valid );
125}

◆ operator<<()

std::ostream & operator<< ( std::ostream & s,
const Ext_errmx & err )

Definition at line 347 of file Ext_errmx.cxx.

347 {
348 s << " m_valid: " << err.m_valid << '\n'
349 << "m_err: " << err.m_err << " m_err3: " << err.m_err3 << " m_R: " << err.m_R
350 << " m_err2: " << err.m_err2 << " *m_nv: " << *err.m_nv
351 << " *(m_nv+1): " << *( err.m_nv + 1 ) << std::endl;
352 return s;
353}
XmlRpcServer s
HepSymMatrix m_err
Definition Ext_errmx.h:128