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

TMuiPseudoBLTMapO.cxx

Go to the documentation of this file.
00001 #include<TMuiPseudoBLTMapO.h>
00002 #include<PHKeyIterator.h>
00003 #include<PHConstKeyIterator.h>
00004 
00005 
00006 TMuiPseudoBLTMapO::TMuiPseudoBLTMapO() : _count(0){;}
00007 
00008 
00009 TMuiPseudoBLTMapO::TMuiPseudoBLTMapO(PHKey::map_key_type map_key) : PHMap<PHKey::key_type, TMuiPseudoBLTO, TMuiPseudoBLTO_v1>(map_key), _count(0){;}
00010 
00011 
00012 TMuiPseudoBLTMapO::iterator TMuiPseudoBLTMapO::insert_new(UShort_t arm)
00013 {  
00014   // Get the new index from the roll count;
00015   //
00016   UShort_t index = get_roll_count();
00017   
00018   // get the key for the new TMuiPseudoBLT object
00019   //
00020   TMuiKeyGen::key_type key = TMuiKeyGen::get_key(arm,
00021                                                  index);
00022   // full key
00023   //
00024   Key full_key(get_map_key(),key);
00025   
00026   // insert cluster
00027   //
00028   insert(full_key, new value_imp_type(full_key,
00029                                       arm,
00030                                       index));
00031   
00032   // okay not so efficient 
00033   //
00034   return find(full_key);
00035 }
00036 
00037 
00038 TMuiPseudoBLTMapO::iterator 
00039 TMuiPseudoBLTMapO::get(UShort_t arm)            
00040 {
00041   // key range associated with this arm
00042   //
00043   TMuiKeyGen::key_range range = TMuiKeyGen::get_key_range(arm);
00044   // return the iterator with specified range
00045   //
00046   Key lower(get_map_key(),range.first);
00047   Key upper(get_map_key(),range.second);
00048   return find(lower,upper);
00049 }
00050 
00051 
00052 TMuiPseudoBLTMapO::const_iterator 
00053 TMuiPseudoBLTMapO::get(UShort_t arm) const              
00054 {
00055   // key range associated with this arm
00056   //
00057   TMuiKeyGen::key_range range = TMuiKeyGen::get_key_range(arm);
00058   // return the iterator with specified range
00059   //
00060   Key lower(get_map_key(),range.first);
00061   Key upper(get_map_key(),range.second);
00062   return find(lower,upper);
00063 }

MUIOO: PHENIX Muon Identifier Analysis Framework. Documentation by doxygen
Last modified: