Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

TMuiKeyGen Class Reference
[Classes]

Key generation class for PHENIX muon identifier. More...

#include <TMuiKeyGen.h>

List of all members.

Public Types

typedef PHKey::object_key_type key_type
typedef std::pair< key_type,
key_type
key_range

Static Public Methods

key_type get_key (UShort_t i_arm, UShort_t i_plane, UShort_t i_panel, UShort_t i_orientation, UShort_t i_index)
key_type get_hash_key (UShort_t i_arm, UShort_t i_plane, UShort_t i_panel, UShort_t i_orientation)
key_range get_key_range (UShort_t i_arm, UShort_t i_plane, UShort_t i_panel, UShort_t i_orientation)
key_type get_key (UShort_t i_arm, UShort_t i_plane, UShort_t i_index)
key_range get_key_range (UShort_t i_arm, UShort_t i_plane)
key_type get_key (UShort_t i_arm, UShort_t i_index)
key_range get_key_range (UShort_t i_arm)
int get_index (key_type)
ULong_t get_max_index ()

Static Private Attributes

const ULong_t ARM_BITS = 2
const ULong_t PLANE_BITS = 4
const ULong_t PANEL_BITS = 4
const ULong_t ORIENTATION_BITS = 2
const ULong_t INDEX_BITS = 20
const ULong_t ARM_MASK = 0x00000003
const ULong_t PLANE_MASK = 0x0000000F
const ULong_t PANEL_MASK = 0x0000000F
const ULong_t ORIENTATION_MASK = 0x00000003
const ULong_t INDEX_MASK = 0x000FFFFF
const ULong_t INDEX_SHIFT = 0
const ULong_t ORIENTATION_SHIFT = INDEX_BITS + INDEX_SHIFT
const ULong_t PANEL_SHIFT = ORIENTATION_BITS + ORIENTATION_SHIFT
const ULong_t PLANE_SHIFT = PANEL_SHIFT + PANEL_BITS
const ULong_t ARM_SHIFT = PLANE_SHIFT + PLANE_BITS


Detailed Description

Key generation class for PHENIX muon identifier.

Static utility class for generating unique keys from specification of map_key, arm, plane, panel, orientation, and index. The allowed range of input parameters is specified in the TMuiKeyGen::get_key description. The get_key method is overloaded to provide appropriate keys for each type of interface object.

Definition at line 22 of file TMuiKeyGen.h.


Member Typedef Documentation

typedef std::pair<key_type,key_type> key_range
 

Definition at line 30 of file TMuiKeyGen.h.

Referenced by TMuiRoadMapO::get, TMuiPseudoBLTMapO::get, TMuiMCHitMapO::get, TMuiHitMapO::get, TMuiEvalMap::get, TMuiClusterMapO::get, TMui1DRoadMapO::get, get_key_range, and TMui1DRoadMapO::insert_new.

typedef PHKey::object_key_type key_type
 

Import name of Key object from PHKey

Definition at line 29 of file TMuiKeyGen.h.

Referenced by TMuiMCHitMapO::get, TMuiHitMapO::get, TMuiRoadMapO::insert_new, TMuiPseudoBLTMapO::insert_new, TMuiMCHitMapO::insert_new, TMuiHitMapO::insert_new, TMuiEvalMap::insert_new, TMuiClusterMapO::insert_new, and TMui1DRoadMapO::insert_new.


Member Function Documentation

PHKey::object_key_type get_hash_key UShort_t    i_arm,
UShort_t    i_plane,
UShort_t    i_panel,
UShort_t    i_orientation
[static]
 

Definition at line 20 of file TMuiKeyGen.cxx.

References MUIOO::MAX_ORIENTATION, MUIOO::MAX_PANEL, and MUIOO::MAX_PLANE.

00024 {
00025   return i_arm*(MAX_PLANE*MAX_PANEL*MAX_ORIENTATION) +
00026   i_plane*(MAX_PANEL*MAX_ORIENTATION) +
00027   i_panel*(MAX_ORIENTATION) +
00028   i_orientation;
00029 }

int get_index key_type    [static]
 

Return the index from a key

PHKey::object_key_type get_key UShort_t    i_arm,
UShort_t    i_index
[static]
 

Generate key for: TMuiRoadO

Definition at line 72 of file TMuiKeyGen.cxx.

References ARM_MASK, ARM_SHIFT, INDEX_MASK, and INDEX_SHIFT.

00074 {
00075   // shift and mask                          
00076   //
00077   return      ((ARM_MASK & i_arm) << ARM_SHIFT) |
00078               ((INDEX_MASK & i_index) << INDEX_SHIFT);
00079 }

PHKey::object_key_type get_key UShort_t    i_arm,
UShort_t    i_plane,
UShort_t    i_index
[static]
 

Generate key for: TMuiMCHit

Definition at line 49 of file TMuiKeyGen.cxx.

References ARM_MASK, ARM_SHIFT, INDEX_MASK, INDEX_SHIFT, PLANE_MASK, and PLANE_SHIFT.

00051                                                           {
00052   // shift and mask                          
00053   //
00054   return      ((ARM_MASK & i_arm) << ARM_SHIFT) |
00055               ((PLANE_MASK & i_plane) << PLANE_SHIFT) |
00056               ((INDEX_MASK & index) << INDEX_SHIFT);
00057 }

PHKey::object_key_type get_key UShort_t    i_arm,
UShort_t    i_plane,
UShort_t    i_panel,
UShort_t    i_orientation,
UShort_t    i_index
[static]
 

Generate key for: TMuiHitMap, TMuiClusMap

Definition at line 6 of file TMuiKeyGen.cxx.

References ARM_MASK, ARM_SHIFT, INDEX_MASK, INDEX_SHIFT, ORIENTATION_MASK, ORIENTATION_SHIFT, PANEL_MASK, PANEL_SHIFT, PLANE_MASK, and PLANE_SHIFT.

Referenced by TMuiMCHitMapO::get, TMuiHitMapO::get, TMuiHVMask::get_effic_twopack, get_key_range, TMuiRoadMapO::insert_new, TMuiPseudoBLTMapO::insert_new, TMuiMCHitMapO::insert_new, TMuiHitMapO::insert_new, TMuiEvalMap::insert_new, TMuiClusterMapO::insert_new, and TMui1DRoadMapO::insert_new.

00010                                                             {
00011   // shift and mask                          
00012   //
00013   return  ((ARM_MASK & i_arm) << ARM_SHIFT) |
00014           ((PLANE_MASK & i_plane) << PLANE_SHIFT) |
00015           ((PANEL_MASK & i_panel) << PANEL_SHIFT) |
00016           ((ORIENTATION_MASK & i_orientation) << ORIENTATION_SHIFT) |
00017           ((INDEX_MASK & i_index) << INDEX_SHIFT);
00018 }

TMuiKeyGen::key_range get_key_range UShort_t    i_arm [static]
 

Generate a pair of keys with specified range, relevant for all MUIOO containers

Definition at line 81 of file TMuiKeyGen.cxx.

References get_key, and key_range.

00081                                                            { 
00082   return std::make_pair(get_key(i_arm,
00083                                 0),
00084                         get_key(i_arm+1,
00085                                 0)-1); 
00086 }

TMuiKeyGen::key_range get_key_range UShort_t    i_arm,
UShort_t    i_plane
[static]
 

Generate a pair of keys with specified range, used by TMuiMCHitMapO

Definition at line 58 of file TMuiKeyGen.cxx.

References get_key, and key_range.

00059                                                                  {
00060                                                 
00061                                                 
00062                                                 
00063   return std::make_pair(get_key(i_arm,
00064                                 i_plane,
00065                                 0),
00066                         get_key(i_arm,
00067                                 i_plane+1,
00068                                 0)-1); 
00069 }

TMuiKeyGen::key_range get_key_range UShort_t    i_arm,
UShort_t    i_plane,
UShort_t    i_panel,
UShort_t    i_orientation
[static]
 

Generate a pair of keys with specified range, used by TMuiClusterMapO and TMuiHitMapO

Definition at line 31 of file TMuiKeyGen.cxx.

References get_key, and key_range.

Referenced by TMuiRoadMapO::get, TMuiPseudoBLTMapO::get, TMuiMCHitMapO::get, TMuiHitMapO::get, TMuiEvalMap::get, TMuiClusterMapO::get, TMui1DRoadMapO::get, and TMui1DRoadMapO::insert_new.

00034                                                                        {
00035                                                 
00036   return std::make_pair(get_key(i_arm,
00037                                 i_plane,
00038                                 i_panel,
00039                                 i_orientation,
00040                                 0),
00041                         get_key(i_arm,
00042                                 i_plane,
00043                                 i_panel,
00044                                 i_orientation+1,
00045                                 0)-1); 
00046 }

ULong_t get_max_index   [inline, static]
 

Returns the maximum value of index

Definition at line 73 of file TMuiKeyGen.h.

References INDEX_MASK.

Referenced by TMuiRoadMapO::get_roll_count, TMuiPseudoBLTMapO::get_roll_count, TMuiMCHitMapO::get_roll_count, TMuiHitMapO::get_roll_count, TMuiEvalMap::get_roll_count, TMuiClusterMapO::get_roll_count, and TMui1DRoadMapO::get_roll_count.

00073 { return INDEX_MASK; }


Member Data Documentation

const ULong_t ARM_BITS = 2 [static, private]
 

Definition at line 80 of file TMuiKeyGen.h.

const ULong_t ARM_MASK = 0x00000003 [static, private]
 

Definition at line 86 of file TMuiKeyGen.h.

Referenced by get_key.

const ULong_t ARM_SHIFT = PLANE_SHIFT + PLANE_BITS [static, private]
 

Definition at line 96 of file TMuiKeyGen.h.

Referenced by get_key.

const ULong_t INDEX_BITS = 20 [static, private]
 

Definition at line 84 of file TMuiKeyGen.h.

const ULong_t INDEX_MASK = 0x000FFFFF [static, private]
 

Definition at line 90 of file TMuiKeyGen.h.

Referenced by get_key, and get_max_index.

const ULong_t INDEX_SHIFT = 0 [static, private]
 

Definition at line 92 of file TMuiKeyGen.h.

Referenced by get_key.

const ULong_t ORIENTATION_BITS = 2 [static, private]
 

Definition at line 83 of file TMuiKeyGen.h.

const ULong_t ORIENTATION_MASK = 0x00000003 [static, private]
 

Definition at line 89 of file TMuiKeyGen.h.

Referenced by get_key.

const ULong_t ORIENTATION_SHIFT = INDEX_BITS + INDEX_SHIFT [static, private]
 

Definition at line 93 of file TMuiKeyGen.h.

Referenced by get_key.

const ULong_t PANEL_BITS = 4 [static, private]
 

Definition at line 82 of file TMuiKeyGen.h.

const ULong_t PANEL_MASK = 0x0000000F [static, private]
 

Definition at line 88 of file TMuiKeyGen.h.

Referenced by get_key.

const ULong_t PANEL_SHIFT = ORIENTATION_BITS + ORIENTATION_SHIFT [static, private]
 

Definition at line 94 of file TMuiKeyGen.h.

Referenced by get_key.

const ULong_t PLANE_BITS = 4 [static, private]
 

Definition at line 81 of file TMuiKeyGen.h.

const ULong_t PLANE_MASK = 0x0000000F [static, private]
 

Definition at line 87 of file TMuiKeyGen.h.

Referenced by get_key.

const ULong_t PLANE_SHIFT = PANEL_SHIFT + PANEL_BITS [static, private]
 

Definition at line 95 of file TMuiKeyGen.h.

Referenced by get_key.


The documentation for this class was generated from the following files:
MUIOO: PHENIX Muon Identifier Analysis Framework. Documentation by doxygen
Last modified: