CGEM BOSS 6.6.5.i
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//-----------------------
26
27//-------------
28// C Headers --
29//-------------
30extern "C" {
31}
32
33//---------------
34// C++ Headers --
35//---------------
36#include <iostream>
37#include <iomanip>
38using std::endl;
39using std::ends;
40using std::ios;
41using std::cout;
42using std::resetiosflags;
43using std::setiosflags;
44using std::setw;
45using std::string;
46
47//-------------------------------
48// Collaborating Class Headers --
49//-------------------------------
50
51//-----------------------------------------------------------------------
52// Local Macros, Typedefs, Structures, Unions and Forward Declarations --
53//-----------------------------------------------------------------------
54
55static const char rscid[] = "$Id: HTColumn.cxx,v 1.3 2010/03/25 09:55:57 zhangy Exp $";
56
57// ----------------------------------------
58// -- Public Function Member Definitions --
59// ----------------------------------------
60
61//----------------
62// Constructors --
63//----------------
64HTColumn::HTColumn( const string& label,
65 const string& block,
66 const string& indexLabel ) :
67 _label(label),
68 _block(block),
69 _indexLabel(indexLabel)
70{
71}
72
74 _label(o._label),
75 _block(o._block),
76 _indexLabel(o._indexLabel)
77{
78}
79
80//--------------
81// Destructor --
82//--------------
86
87//-------------
88// Methods --
89//-------------
90
91//-------------
92// Operators --
93//-------------
96{
97 if (&o == this) return *this;
98 _label = o._label ;
99 _block = o._block ;
100 _indexLabel = o._indexLabel ;
101
102 return *this ;
103}
104
105
106//-------------
107// Selectors --
108//-------------
109const string&
111{
112 return _label ;
113}
114
115const string&
117{
118 return _block ;
119}
120
121const string&
123{
124 return _indexLabel ;
125}
126
127void
128HTColumn::print(/*ostream& out*/) const
129{
130 cout << label() ;
131 if ( indexLabel().length() > 0 ) cout << "(" << indexLabel() << ")" ;
132 cout<< ends ;
133
134 cout << " @ " << setw(10) << block() ;
135 cout << " : " << typeName() ;
136 cout << endl ;
137 cout << resetiosflags(ios::adjustfield) ;
138}
139
140//-------------
141// Modifiers --
142//-------------
143
144
double length
HTColumn & operator=(const HTColumn &)
Definition HTColumn.cxx:95
HTColumn(const std::string &label, const std::string &block=std::string(), const std::string &indexLabel=std::string())
virtual void print() const
Definition HTColumn.cxx:128
virtual ~HTColumn()
Definition HTColumn.cxx:83
virtual const std::string & typeName() const =0
virtual const std::string & indexLabel() const
Definition HTColumn.cxx:122
virtual const std::string & block() const
Definition HTColumn.cxx:116
virtual const std::string & label() const
Definition HTColumn.cxx:110