Group of paterns for "improved"("energetic") algorithm. In current implementation all patterns in given group must have the same code and sign. All patterns must have the same m_QualityTabNumber. Patterns of given code and sign can be devided between a few EPatternsGroups, indexed by m_RefGroup. The group m_Code, m_Sign, m_RefGroup is definded by pattern index 0 in m_PatternsVec. More...
#include <TEPatternsGroup.h>
Public Member Functions | |
bool | check (const RPCPattern::RPCPatVec::const_iterator &pattern) |
Checks, if patern can belong to this group, i.e. if has the same m_Code, m_Sign, m_RefGroup and m_QualityTabNumber. | |
bool | operator< (const TEPatternsGroup &ePatternsGroup) const |
used for sorting TEPatternsGroups | |
TEPatternsGroup (const RPCPattern::RPCPatVec::const_iterator &pattern) | |
Private Attributes | |
short | m_QualityTabNumber |
Friends | |
class | RPCPac |
Group of paterns for "improved"("energetic") algorithm. In current implementation all patterns in given group must have the same code and sign. All patterns must have the same m_QualityTabNumber. Patterns of given code and sign can be devided between a few EPatternsGroups, indexed by m_RefGroup. The group m_Code, m_Sign, m_RefGroup is definded by pattern index 0 in m_PatternsVec.
Definition at line 23 of file TEPatternsGroup.h.
TEPatternsGroup::TEPatternsGroup | ( | const RPCPattern::RPCPatVec::const_iterator & | pattern | ) |
Creates new patterns group. The pattern is added to the group and defined its m_Code, m_Sign, m_RefGroup, m_QualityTabNumber.
Definition at line 10 of file TEPatternsGroup.cc.
References TPatternsGroup::addPattern(), TPatternsGroup::m_PatternsGroupType, m_QualityTabNumber, and RPCPattern::PAT_TYPE_E.
{ addPattern(pattern); m_PatternsGroupType = RPCPattern::PAT_TYPE_E; m_QualityTabNumber = pattern->getQualityTabNumber(); //it is uded in m_PAC algorithm, so we want to have fast acces. }
bool TEPatternsGroup::check | ( | const RPCPattern::RPCPatVec::const_iterator & | pattern | ) |
Checks, if patern can belong to this group, i.e. if has the same m_Code, m_Sign, m_RefGroup and m_QualityTabNumber.
Definition at line 17 of file TEPatternsGroup.cc.
References TPatternsGroup::m_PatternsItVec.
{ if(m_PatternsItVec[0]->getRefGroup() == pattern->getRefGroup() && m_PatternsItVec[0]->getCode() == pattern->getCode() && m_PatternsItVec[0]->getSign() == pattern->getSign() && m_PatternsItVec[0]->getQualityTabNumber() == pattern->getQualityTabNumber() ) return true; return false; }
bool TEPatternsGroup::operator< | ( | const TEPatternsGroup & | ePatternsGroup | ) | const |
used for sorting TEPatternsGroups
Definition at line 27 of file TEPatternsGroup.cc.
References TPatternsGroup::m_PatternsItVec.
{ if( this->m_PatternsItVec[0]->getCode() < ePatternsGroup.m_PatternsItVec[0]->getCode() ) return true; else if( this->m_PatternsItVec[0]->getCode() > ePatternsGroup.m_PatternsItVec[0]->getCode() ) return false; else { //== if(this->m_PatternsItVec[0]->getQualityTabNumber() > ePatternsGroup.m_PatternsItVec[0]->getQualityTabNumber()) return true; else if(this->m_PatternsItVec[0]->getQualityTabNumber() < ePatternsGroup.m_PatternsItVec[0]->getQualityTabNumber()) return false; else { //== if( this->m_PatternsItVec[0]->getSign() < ePatternsGroup.m_PatternsItVec[0]->getSign() ) return true; else if( this->m_PatternsItVec[0]->getSign() > ePatternsGroup.m_PatternsItVec[0]->getSign() ) return false; else { //== if(this->m_PatternsItVec[0]->getRefGroup() < ePatternsGroup.m_PatternsItVec[0]->getRefGroup()) return true; else //if(this->m_RefGroup < ePatternsGroup.m_RefGroup) return false; } } } }
friend class RPCPac [friend] |
Reimplemented from TPatternsGroup.
Definition at line 25 of file TEPatternsGroup.h.
short TEPatternsGroup::m_QualityTabNumber [private] |
Definition at line 37 of file TEPatternsGroup.h.
Referenced by TEPatternsGroup().