test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Friends
Key Struct Reference

#include <GoldenPattern.h>

Public Member Functions

 Key (int iEta=99, unsigned int iPt=0, int iCharge=0)
 
bool operator< (const Key &o) const
 
bool operator== (const Key &o) const
 

Public Attributes

int theCharge
 
int theEtaCode
 
unsigned int thePtCode
 

Friends

std::ostream & operator<< (std::ostream &out, const Key &o)
 

Detailed Description

Definition at line 15 of file GoldenPattern.h.

Constructor & Destructor Documentation

Key::Key ( int  iEta = 99,
unsigned int  iPt = 0,
int  iCharge = 0 
)
inline

Definition at line 17 of file GoldenPattern.h.

17  :
18  theEtaCode(iEta), thePtCode(iPt), theCharge(iCharge){}
int theCharge
Definition: GoldenPattern.h:38
unsigned int thePtCode
Definition: GoldenPattern.h:37
int theEtaCode
Definition: GoldenPattern.h:36

Member Function Documentation

bool Key::operator< ( const Key o) const
inline

Definition at line 20 of file GoldenPattern.h.

References theCharge, theEtaCode, and thePtCode.

20  {
21  if (thePtCode > o.thePtCode) return true;
22  else if (thePtCode==o.thePtCode && theCharge < o.theCharge) return true;
23  else if (theCharge*thePtCode==o.theCharge*o.thePtCode && theEtaCode<o.theEtaCode) return true;
24  else return false;
25  }
int theCharge
Definition: GoldenPattern.h:38
unsigned int thePtCode
Definition: GoldenPattern.h:37
int theEtaCode
Definition: GoldenPattern.h:36
bool Key::operator== ( const Key o) const
inline

Definition at line 27 of file GoldenPattern.h.

References theCharge, theEtaCode, and thePtCode.

27  {
29  }
int theCharge
Definition: GoldenPattern.h:38
unsigned int thePtCode
Definition: GoldenPattern.h:37
int theEtaCode
Definition: GoldenPattern.h:36

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const Key o 
)
friend

Definition at line 31 of file GoldenPattern.h.

31  {
32  out << "Key: (eta="<<o.theEtaCode<<", pt="<<o.thePtCode<<", charge="<<o.theCharge<<")";
33  return out;
34  }
int theCharge
Definition: GoldenPattern.h:38
unsigned int thePtCode
Definition: GoldenPattern.h:37
int theEtaCode
Definition: GoldenPattern.h:36

Member Data Documentation

int Key::theCharge
int Key::theEtaCode

Definition at line 36 of file GoldenPattern.h.

Referenced by operator<(), operator==(), and XMLConfigWriter::writeResultsData().

unsigned int Key::thePtCode