00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "MdcRecoUtil/HTColumn.h"
00026
00027
00028
00029
00030 extern "C" {
00031 }
00032
00033
00034
00035
00036 #include <iostream>
00037 #include <iomanip>
00038 using std::endl;
00039 using std::ends;
00040 using std::ios;
00041 using std::cout;
00042 using std::resetiosflags;
00043 using std::setiosflags;
00044 using std::setw;
00045 using std::string;
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 static const char rscid[] = "$Id: HTColumn.cxx,v 1.3 2010/03/25 09:55:57 zhangy Exp $";
00056
00057
00058
00059
00060
00061
00062
00063
00064 HTColumn::HTColumn( const string& label,
00065 const string& block,
00066 const string& indexLabel ) :
00067 _label(label),
00068 _block(block),
00069 _indexLabel(indexLabel)
00070 {
00071 }
00072
00073 HTColumn::HTColumn( const HTColumn& o) :
00074 _label(o._label),
00075 _block(o._block),
00076 _indexLabel(o._indexLabel)
00077 {
00078 }
00079
00080
00081
00082
00083 HTColumn::~HTColumn()
00084 {
00085 }
00086
00087
00088
00089
00090
00091
00092
00093
00094 HTColumn&
00095 HTColumn::operator=( const HTColumn& o)
00096 {
00097 if (&o == this) return *this;
00098 _label = o._label ;
00099 _block = o._block ;
00100 _indexLabel = o._indexLabel ;
00101
00102 return *this ;
00103 }
00104
00105
00106
00107
00108
00109 const string&
00110 HTColumn::label() const
00111 {
00112 return _label ;
00113 }
00114
00115 const string&
00116 HTColumn::block() const
00117 {
00118 return _block ;
00119 }
00120
00121 const string&
00122 HTColumn::indexLabel() const
00123 {
00124 return _indexLabel ;
00125 }
00126
00127 void
00128 HTColumn::print() const
00129 {
00130 cout << label() ;
00131 if ( indexLabel().length() > 0 ) cout << "(" << indexLabel() << ")" ;
00132 cout<< ends ;
00133
00134 cout << " @ " << setw(10) << block() ;
00135 cout << " : " << typeName() ;
00136 cout << endl ;
00137 cout << resetiosflags(ios::adjustfield) ;
00138 }
00139
00140
00141
00142
00143
00144