49 fRankingDiscriminatorName(
"" ),
79 fLogger->SetSource( fContext.Data() );
93 fRanking.push_back(
rank );
96 Rank temp(fRanking[0]);
99 if (fRanking[
j-1] < fRanking[
j]) {
100 temp = fRanking[
j-1];fRanking[
j-1] = fRanking[
j]; fRanking[
j] = temp;
105 for (
UInt_t i=0; i<fRanking.size(); i++) fRanking[i].SetRank( i+1 );
114 for (std::vector<Rank>::const_iterator
ir = fRanking.
begin();
ir != fRanking.
end(); ++
ir )
115 if ((*ir).GetVariable().Length() >
maxL)
maxL = (*ir).GetVariable().Length();
118 for (
Int_t i=0; i<
maxL+15+fRankingDiscriminatorName.Length(); i++)
hline +=
"-";
119 Log() << kHEADER <<
"Ranking result (top variable is best ranked)" <<
Endl;
121 Log() << kINFO << std::setiosflags(std::ios::left)
122 << std::setw(5) <<
"Rank : "
123 << std::setw(
maxL+0) <<
"Variable "
124 << std::resetiosflags(std::ios::right)
125 <<
" : " << fRankingDiscriminatorName <<
Endl;
127 for (std::vector<Rank>::const_iterator
ir = fRanking.
begin();
ir != fRanking.
end(); ++
ir ) {
140 : fVariable( variable ),
158 if (fRankValue <
other.fRankValue)
return true;
167 if (fRankValue >
other.fRankValue)
return true;
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
const_iterator begin() const
const_iterator end() const
ostringstream derivative to redirect and format output
virtual ~Rank()
destructor
Rank(const TString &variable, Double_t rankValue)
constructor
Bool_t operator>(const Rank &other) const
comparison operator >
Bool_t operator<(const Rank &other) const
comparison operator <
Ranking for variables in method (implementation)
virtual void AddRank(const Rank &rank)
Add a new rank take ownership of it.
virtual void Print() const
get maximum length of variable names
void SetContext(const TString &context)
virtual ~Ranking()
destructor
Ranking()
default constructor
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
MsgLogger & Endl(MsgLogger &ml)
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.