BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkFitStatus.cxx
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: TrkFitStatus.cxx,v 1.1.1.1 2005/04/21 06:01:42 zhangy Exp $
4//
5// Description:
6//
7//
8// Environment:
9// Software developed for the BaBar Detector at the SLAC B-Factory.
10//
11// Author(s): Steve Schaffner
12//
13// Revision History:
14// 20020502 Michael Kelsey -- Remove size argument from _history
15//------------------------------------------------------------------------
16#include "TrkBase/TrkFitStatus.h"
17// #include "ErrLogger/ErrLog.h"
18#include <iostream>
19#include <iterator>
20using std::endl;
21using std::ostream;
22
24 : _fitValid( false ), _fitCurrent( false ), _is2d( false ), _multScat( false ) {}
25
27
28// Copy ctor
30 : _history( right._history )
31 , _fitValid( right._fitValid )
32 , _fitCurrent( right._fitCurrent )
33 , _is2d( right._is2d )
34 , _multScat( right._multScat ) {}
35
37 if ( &right != this )
38 {
39 _is2d = right._is2d;
40 _multScat = right._multScat;
41 _fitValid = right._fitValid;
42 _fitCurrent = right._fitCurrent;
43 _history = right._history;
44 }
45 return *this;
46}
47
49 _fitValid = v;
50 if ( !v ) setCurrent( false );
51}
52
53ostream& operator<<( ostream& os, const TrkFitStatus& s ) { return s.printStatus( os ); }
54
55ostream& TrkFitStatus::printStatus( ostream& os ) const {
56 os << " 3-d: " << ( is2d() == 0 ) << " ";
57 return printHistory( os );
58}
59
60void TrkFitStatus::addHistory( const TrkErrCode& status, const char* modulename ) {
61 // append the module name to the error code message
62 _history.push_back( TrkHistory( status, modulename ) );
63}
64
65ostream& TrkFitStatus::printHistory( ostream& os ) const {
66 // FIXME: this doesn't work because ostream isn't a std::ostream, so
67 // std::ostream_iterator doesn't like this...
68 // std::copy(_history.begin(),_history.end(),std::ostream_iterator<TrkHistory>(os,"\n"));
69 for ( history_iterator i = _history.begin(); i != _history.end(); ++i ) os << *i << endl;
70 return os;
71}
XmlRpcServer s
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35
ostream & operator<<(ostream &os, const TrkFitStatus &s)
void setValid(bool v)
std::ostream & printStatus(std::ostream &os=std::cout) const
virtual ~TrkFitStatus()
TrkFitStatus & operator=(const TrkFitStatus &)
virtual void addHistory(const TrkErrCode &status, const char *modulename)
std::ostream & printHistory(std::ostream &os=std::cout) const