CMS 3D CMS Logo

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

#include <EncodedTruthId.h>

Inheritance diagram for EncodedTruthId:
EncodedEventId

Public Member Functions

 EncodedTruthId ()
 
 EncodedTruthId (EncodedEventId eid, int index)
 
int index () const
 
int operator!= (const EncodedTruthId &id) const
 
int operator< (const EncodedTruthId &id) const
 
int operator== (const EncodedTruthId &id) const
 
- Public Member Functions inherited from EncodedEventId
int bunchCrossing () const
 get the detector field from this detid More...
 
 EncodedEventId ()
 Create an empty or null id (also for persistence) More...
 
 EncodedEventId (uint32_t id)
 Create an id from a raw number. More...
 
 EncodedEventId (int bunchX, int event)
 Create an id, filling the bunch crossing and event infomrations. More...
 
int event () const
 get the contents of the subdetector field (should be protected?) More...
 
int operator!= (const EncodedEventId &id) const
 inequality More...
 
uint32_t operator() ()
 
int operator< (const EncodedEventId &id) const
 comparison More...
 
int operator== (const EncodedEventId &id) const
 equality More...
 
uint32_t rawId () const
 get the raw id More...
 

Private Attributes

int index_
 

Friends

std::ostream & operator<< (std::ostream &os, const EncodedTruthId &id)
 

Additional Inherited Members

- Protected Attributes inherited from EncodedEventId
uint32_t id_
 

Detailed Description

Definition at line 7 of file EncodedTruthId.h.

Constructor & Destructor Documentation

EncodedTruthId::EncodedTruthId ( )

Definition at line 3 of file EncodedTruthId.cc.

3 {}
EncodedTruthId::EncodedTruthId ( EncodedEventId  eid,
int  index 
)

Definition at line 5 of file EncodedTruthId.cc.

5  :
6  EncodedEventId(eid), index_(index) {}
int index() const
EncodedEventId()
Create an empty or null id (also for persistence)

Member Function Documentation

int EncodedTruthId::index ( ) const
inline

Definition at line 19 of file EncodedTruthId.h.

References index_.

20  {
21  return index_;
22  }
int EncodedTruthId::operator!= ( const EncodedTruthId id) const
inline

Definition at line 37 of file EncodedTruthId.h.

References operator==().

38  {
39  return !(operator==(id));
40  }
int operator==(const EncodedTruthId &id) const
int EncodedTruthId::operator< ( const EncodedTruthId id) const
inline

Definition at line 42 of file EncodedTruthId.h.

References index_, and cppFunctionSkipper::operator.

43  {
44  if (EncodedEventId::operator==(id))
45  {
46  return index_ < id.index_;
47  }
48  else
49  {
50  return (EncodedEventId::operator<(id));
51  }
52  }
int EncodedTruthId::operator== ( const EncodedTruthId id) const
inline

Definition at line 25 of file EncodedTruthId.h.

References index_, cppFunctionSkipper::operator, and EncodedEventId::operator==().

Referenced by operator!=().

26  {
27  if (EncodedEventId::operator==(id))
28  {
29  return index_ == id.index_;
30  }
31  else
32  {
33  return EncodedEventId::operator==(id);
34  }
35  }
int operator==(const EncodedEventId &id) const
equality

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const EncodedTruthId id 
)
friend

Member Data Documentation

int EncodedTruthId::index_
private

Definition at line 55 of file EncodedTruthId.h.

Referenced by index(), operator<(), and operator==().