BesDetectorID Class Reference

#include <BesDetectorID.h>

Inheritance diagram for BesDetectorID:

EmcID HltID MdcID MucID TofID List of all members.

Public Member Functions

 BesDetectorID (void)
 ~BesDetectorID (void)
Identifier mdc (void) const
Identifier tof (void) const
Identifier emc (void) const
Identifier muc (void) const
Identifier hlt (void) const
Identifier mrpc (void) const
bool is_mdc (const Identifier &id) const
bool is_tof (const Identifier &id) const
bool is_emc (const Identifier &id) const
bool is_muc (const Identifier &id) const
bool is_hlt (const Identifier &id) const
bool is_mrpc (const Identifier &id) const

Protected Member Functions

int mdc_field_value () const
 Provide efficient access to individual field values.
int tof_field_value () const
int emc_field_value () const
int muc_field_value () const
int hlt_field_value () const
int mrpc_field_value () const
int get_detectorID (const Identifier &id) const

Static Protected Attributes

static const unsigned int MDC_ID = 0x10
static const unsigned int MDC_INDEX = 24
static const unsigned int MDC_MASK = 0xFF000000
static const unsigned int TOF_ID = 0x20
static const unsigned int TOF_INDEX = 24
static const unsigned int TOF_MASK = 0xFF000000
static const unsigned int EMC_ID = 0x30
static const unsigned int EMC_INDEX = 24
static const unsigned int EMC_MASK = 0xFF000000
static const unsigned int MUC_ID = 0x40
static const unsigned int MUC_INDEX = 24
static const unsigned int MUC_MASK = 0xFF000000
static const unsigned int HLT_ID = 0x50
static const unsigned int HLT_INDEX = 24
static const unsigned int HLT_MASK = 0xFF000000
static const unsigned int MRPC_ID = 0x70
static const unsigned int MRPC_INDEX = 24
static const unsigned int MRPC_MASK = 0xFF000000

Private Attributes

int m_MdcId
int m_TofId
int m_EmcId
int m_MucId
int m_HltId
int m_MrpcId

Detailed Description

class BesDetectorID

This class provides an interface to generate or decode an identifier for the upper levels of the detector element hierarchy, i.e. BES III, the detector systems.

Definition at line 15 of file BesDetectorID.h.


Constructor & Destructor Documentation

BesDetectorID::BesDetectorID ( void   ) 

Definition at line 6 of file BesDetectorID.cxx.

BesDetectorID::~BesDetectorID ( void   ) 

Definition at line 16 of file BesDetectorID.cxx.

00017 {
00018 }


Member Function Documentation

Identifier BesDetectorID::emc ( void   )  const

Definition at line 63 of file BesDetectorID.cxx.

References EMC_INDEX, and m_EmcId.

00063                                         {
00064   Identifier id = Identifier(  m_EmcId << EMC_INDEX );
00065   return id; 
00066 }

int BesDetectorID::emc_field_value (  )  const [inline, protected]

Definition at line 111 of file BesDetectorID.h.

References m_EmcId.

00111 {return (m_EmcId);}       

int BesDetectorID::get_detectorID ( const Identifier id  )  const [protected]

Identifier BesDetectorID::hlt ( void   )  const

Definition at line 73 of file BesDetectorID.cxx.

References HLT_INDEX, and m_HltId.

00073                                         {
00074   Identifier id = Identifier(  m_HltId << HLT_INDEX );
00075   return id;
00076 }

int BesDetectorID::hlt_field_value (  )  const [inline, protected]

Definition at line 117 of file BesDetectorID.h.

References m_HltId.

00117 {return (m_HltId);}

bool BesDetectorID::is_emc ( const Identifier id  )  const

Definition at line 30 of file BesDetectorID.cxx.

References EMC_ID, EMC_INDEX, and EMC_MASK.

00030                                                       {
00031   Identifier::value_type value = id.get_value(); 
00032   return ((value  &  EMC_MASK) >> EMC_INDEX) == EMC_ID ? true : false;   
00033 }

bool BesDetectorID::is_hlt ( const Identifier id  )  const

Definition at line 40 of file BesDetectorID.cxx.

References HLT_ID, HLT_INDEX, and HLT_MASK.

00040                                                       {
00041   Identifier::value_type value = id.get_value();
00042   return ((value  &  HLT_MASK) >> HLT_INDEX) == HLT_ID ? true : false;
00043 }

bool BesDetectorID::is_mdc ( const Identifier id  )  const

Definition at line 20 of file BesDetectorID.cxx.

References MDC_ID, MDC_INDEX, and MDC_MASK.

00020                                                       {
00021   Identifier::value_type value = id.get_value(); 
00022   return ((value  &  MDC_MASK) >> MDC_INDEX) == MDC_ID ? true : false;    
00023 }

bool BesDetectorID::is_mrpc ( const Identifier id  )  const

Definition at line 46 of file BesDetectorID.cxx.

References MRPC_ID, MRPC_INDEX, and MRPC_MASK.

00046                                                        {
00047   Identifier::value_type value = id.get_value();
00048   return ((value  &  MRPC_MASK) >> MRPC_INDEX) == MRPC_ID ? true : false;
00049 }

bool BesDetectorID::is_muc ( const Identifier id  )  const

Definition at line 35 of file BesDetectorID.cxx.

References MUC_ID, MUC_INDEX, and MUC_MASK.

00035                                                       {
00036   Identifier::value_type value = id.get_value(); 
00037   return ((value  &  MUC_MASK) >> MUC_INDEX) == MUC_ID ? true : false;
00038 }

bool BesDetectorID::is_tof ( const Identifier id  )  const

Definition at line 25 of file BesDetectorID.cxx.

References TOF_ID, TOF_INDEX, and TOF_MASK.

00025                                                       {
00026   Identifier::value_type value = id.get_value(); 
00027   return ((value  &  TOF_MASK) >> TOF_INDEX) == TOF_ID ? true : false;
00028 }

Identifier BesDetectorID::mdc ( void   )  const

Definition at line 53 of file BesDetectorID.cxx.

References m_MdcId, and MDC_INDEX.

00053                                         {
00054   Identifier id = Identifier(  m_MdcId << MDC_INDEX );
00055   return id; 
00056 }

int BesDetectorID::mdc_field_value (  )  const [inline, protected]

Provide efficient access to individual field values.

Definition at line 105 of file BesDetectorID.h.

References m_MdcId.

00105 {return (m_MdcId);}     

Identifier BesDetectorID::mrpc ( void   )  const

Definition at line 78 of file BesDetectorID.cxx.

References m_MrpcId, and MRPC_INDEX.

00078                                          {
00079   Identifier id = Identifier(  m_MrpcId << MRPC_INDEX );
00080   return id;
00081 }

int BesDetectorID::mrpc_field_value (  )  const [inline, protected]

Definition at line 120 of file BesDetectorID.h.

References m_MrpcId.

00120 {return (m_MrpcId);}

Identifier BesDetectorID::muc ( void   )  const

Definition at line 68 of file BesDetectorID.cxx.

References m_MucId, and MUC_INDEX.

00068                                         {
00069   Identifier id = Identifier(  m_MucId << MUC_INDEX );
00070   return id; 
00071 }

int BesDetectorID::muc_field_value (  )  const [inline, protected]

Definition at line 114 of file BesDetectorID.h.

References m_MucId.

00114 {return (m_MucId);}       

Identifier BesDetectorID::tof ( void   )  const

Definition at line 58 of file BesDetectorID.cxx.

References m_TofId, and TOF_INDEX.

00058                                        {
00059   Identifier id = Identifier(  m_TofId << TOF_INDEX );
00060   return id; 
00061 }

int BesDetectorID::tof_field_value (  )  const [inline, protected]

Definition at line 108 of file BesDetectorID.h.

References m_TofId.

00108 {return (m_TofId);}


Member Data Documentation

const unsigned int BesDetectorID::EMC_ID = 0x30 [static, protected]

Definition at line 74 of file BesDetectorID.h.

Referenced by EmcID::crystal_id(), EmcID::getIntID(), and is_emc().

const unsigned int BesDetectorID::EMC_INDEX = 24 [static, protected]

Definition at line 75 of file BesDetectorID.h.

Referenced by EmcID::crystal_id(), emc(), EmcID::getIntID(), and is_emc().

const unsigned int BesDetectorID::EMC_MASK = 0xFF000000 [static, protected]

Definition at line 76 of file BesDetectorID.h.

Referenced by is_emc().

const unsigned int BesDetectorID::HLT_ID = 0x50 [static, protected]

Definition at line 82 of file BesDetectorID.h.

Referenced by HltID::data_type_id(), HltID::getIntID(), and is_hlt().

const unsigned int BesDetectorID::HLT_INDEX = 24 [static, protected]

Definition at line 83 of file BesDetectorID.h.

Referenced by HltID::data_type_id(), HltID::getIntID(), hlt(), and is_hlt().

const unsigned int BesDetectorID::HLT_MASK = 0xFF000000 [static, protected]

Definition at line 84 of file BesDetectorID.h.

Referenced by is_hlt().

int BesDetectorID::m_EmcId [private]

Definition at line 96 of file BesDetectorID.h.

Referenced by emc(), and emc_field_value().

int BesDetectorID::m_HltId [private]

Definition at line 98 of file BesDetectorID.h.

Referenced by hlt(), and hlt_field_value().

int BesDetectorID::m_MdcId [private]

Definition at line 94 of file BesDetectorID.h.

Referenced by mdc(), and mdc_field_value().

int BesDetectorID::m_MrpcId [private]

Definition at line 99 of file BesDetectorID.h.

Referenced by mrpc(), and mrpc_field_value().

int BesDetectorID::m_MucId [private]

Definition at line 97 of file BesDetectorID.h.

Referenced by muc(), and muc_field_value().

int BesDetectorID::m_TofId [private]

Definition at line 95 of file BesDetectorID.h.

Referenced by tof(), and tof_field_value().

const unsigned int BesDetectorID::MDC_ID = 0x10 [static, protected]

Definition at line 66 of file BesDetectorID.h.

Referenced by MdcID::getIntID(), is_mdc(), and MdcID::wire_id().

const unsigned int BesDetectorID::MDC_INDEX = 24 [static, protected]

Definition at line 67 of file BesDetectorID.h.

Referenced by MdcID::getIntID(), is_mdc(), mdc(), and MdcID::wire_id().

const unsigned int BesDetectorID::MDC_MASK = 0xFF000000 [static, protected]

Definition at line 68 of file BesDetectorID.h.

Referenced by MdcID::getIntID(), and is_mdc().

const unsigned int BesDetectorID::MRPC_ID = 0x70 [static, protected]

Definition at line 86 of file BesDetectorID.h.

Referenced by is_mrpc().

const unsigned int BesDetectorID::MRPC_INDEX = 24 [static, protected]

Definition at line 87 of file BesDetectorID.h.

Referenced by is_mrpc(), and mrpc().

const unsigned int BesDetectorID::MRPC_MASK = 0xFF000000 [static, protected]

Definition at line 88 of file BesDetectorID.h.

Referenced by is_mrpc().

const unsigned int BesDetectorID::MUC_ID = 0x40 [static, protected]

Definition at line 78 of file BesDetectorID.h.

Referenced by MucID::channel_id(), MucID::getIntID(), and is_muc().

const unsigned int BesDetectorID::MUC_INDEX = 24 [static, protected]

Definition at line 79 of file BesDetectorID.h.

Referenced by MucID::channel_id(), MucID::getIntID(), is_muc(), and muc().

const unsigned int BesDetectorID::MUC_MASK = 0xFF000000 [static, protected]

Definition at line 80 of file BesDetectorID.h.

Referenced by is_muc().

const unsigned int BesDetectorID::TOF_ID = 0x20 [static, protected]

Definition at line 70 of file BesDetectorID.h.

Referenced by TofID::cell_id(), TofID::getIntID(), and is_tof().

const unsigned int BesDetectorID::TOF_INDEX = 24 [static, protected]

Definition at line 71 of file BesDetectorID.h.

Referenced by TofID::cell_id(), TofID::getIntID(), is_tof(), and tof().

const unsigned int BesDetectorID::TOF_MASK = 0xFF000000 [static, protected]

Definition at line 72 of file BesDetectorID.h.

Referenced by is_tof().


Generated on Tue Nov 29 23:17:29 2016 for BOSS_7.0.2 by  doxygen 1.4.7