BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
HTColumn.cxx
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: HTColumn.cxx,v 1.3 2010/03/25 09:55:57 zhangy Exp $
4//
5// Description:
6// Class HTColumn
7//
8// Environment:
9// Software developed for the BaBar Detector at the SLAC B-Factory.
10//
11// Author List:
12// Salnikov
13//
14// Copyright Information:
15// Copyright (C) 1997 Saclay
16//
17// History:
18// Migration for BESIII MDC
19//
20//------------------------------------------------------------------------
21
22//-----------------------
23// This Class's Header --
24//-----------------------
25#include "MdcRecoUtil/HTColumn.h"
26
27//-------------
28// C Headers --
29//-------------
30extern "C" {}
31
32//---------------
33// C++ Headers --
34//---------------
35#include <iomanip>
36#include <iostream>
37using std::cout;
38using std::endl;
39using std::ends;
40using std::ios;
41using std::resetiosflags;
42using std::setiosflags;
43using std::setw;
44using std::string;
45
46//-------------------------------
47// Collaborating Class Headers --
48//-------------------------------
49
50//-----------------------------------------------------------------------
51// Local Macros, Typedefs, Structures, Unions and Forward Declarations --
52//-----------------------------------------------------------------------
53
54static const char rscid[] = "$Id: HTColumn.cxx,v 1.3 2010/03/25 09:55:57 zhangy Exp $";
55
56// ----------------------------------------
57// -- Public Function Member Definitions --
58// ----------------------------------------
59
60//----------------
61// Constructors --
62//----------------
63HTColumn::HTColumn( const string& label, const string& block, const string& indexLabel )
64 : _label( label ), _block( block ), _indexLabel( indexLabel ) {}
65
67 : _label( o._label ), _block( o._block ), _indexLabel( o._indexLabel ) {}
68
69//--------------
70// Destructor --
71//--------------
73
74//-------------
75// Methods --
76//-------------
77
78//-------------
79// Operators --
80//-------------
82 if ( &o == this ) return *this;
83 _label = o._label;
84 _block = o._block;
85 _indexLabel = o._indexLabel;
86
87 return *this;
88}
89
90//-------------
91// Selectors --
92//-------------
93const string& HTColumn::label() const { return _label; }
94
95const string& HTColumn::block() const { return _block; }
96
97const string& HTColumn::indexLabel() const { return _indexLabel; }
98
99void HTColumn::print( /*ostream& out*/ ) const {
100 cout << label();
101 if ( indexLabel().length() > 0 ) cout << "(" << indexLabel() << ")";
102 cout << ends;
103
104 cout << " @ " << setw( 10 ) << block();
105 cout << " : " << typeName();
106 cout << endl;
107 cout << resetiosflags( ios::adjustfield );
108}
109
110//-------------
111// Modifiers --
112//-------------
HTColumn & operator=(const HTColumn &)
Definition HTColumn.cxx:81
HTColumn(const std::string &label, const std::string &block=std::string(), const std::string &indexLabel=std::string())
virtual void print() const
Definition HTColumn.cxx:99
virtual ~HTColumn()
Definition HTColumn.cxx:72
virtual const std::string & typeName() const =0
virtual const std::string & indexLabel() const
Definition HTColumn.cxx:97
virtual const std::string & block() const
Definition HTColumn.cxx:95
virtual const std::string & label() const
Definition HTColumn.cxx:93