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 14 of file GoldenPattern.h.

Constructor & Destructor Documentation

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

Definition at line 16 of file GoldenPattern.h.

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

Member Function Documentation

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

Definition at line 19 of file GoldenPattern.h.

References theCharge, theEtaCode, and thePtCode.

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

Definition at line 26 of file GoldenPattern.h.

References theCharge, theEtaCode, and thePtCode.

26  {
28  }
int theCharge
Definition: GoldenPattern.h:37
unsigned int thePtCode
Definition: GoldenPattern.h:36
int theEtaCode
Definition: GoldenPattern.h:35

Friends And Related Function Documentation

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

Definition at line 30 of file GoldenPattern.h.

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

Member Data Documentation

int Key::theCharge
int Key::theEtaCode

Definition at line 35 of file GoldenPattern.h.

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

unsigned int Key::thePtCode