#include <TMui1DRoadMapO.h>
Public Methods | |
Insertors | |
| TMui1DRoadMapO () | |
| TMui1DRoadMapO (PHKey::map_key_type map_key) | |
| virtual | ~TMui1DRoadMapO () |
| iterator | insert_new (UShort_t arm, UShort_t panel, UShort_t orientation) |
| iterator | insert_new (TMui1DRoadMapO::pointer roadptr) |
Extractors | |
| iterator | get (UShort_t arm) |
| const_iterator | get (UShort_t arm) const |
| iterator | get (UShort_t arm, UShort_t panel, UShort_t orientation) |
| const_iterator | get (UShort_t arm, UShort_t panel, UShort_t orientation) const |
Private Methods | |
| UShort_t | get_roll_count () |
Private Attributes | |
| UShort_t | _count |
TMutMuiRoadMapO - IOC for TMutMuiRoad objects
Definition at line 32 of file TMui1DRoadMapO.h.
|
|
Default contructor Definition at line 7 of file TMui1DRoadMapO.cxx.
00007 : _count(0) {;} |
|
|
Construct with key Definition at line 10 of file TMui1DRoadMapO.cxx.
00010 : PHMap<PHKey::key_type, TMui1DRoadO, TMui1DRoadO_v1>(map_key), _count(0){;} |
|
|
Virtual destructor Definition at line 48 of file TMui1DRoadMapO.h.
00048 {;}
|
|
||||||||||||||||
|
Get a const iterator to all roads in given arm Definition at line 137 of file TMui1DRoadMapO.cxx. References TMuiKeyGen::get_key_range, and TMuiKeyGen::key_range.
00140 {
00141 // key range associated with this plane
00142 //
00143 TMuiKeyGen::key_range range = TMuiKeyGen::get_key_range(arm,
00144 0,
00145 panel,
00146 orientation
00147 );
00148 // return the iterator with specified range
00149 //
00150 Key lower(get_map_key(),range.first);
00151 Key upper(get_map_key(),range.second);
00152 return find(lower,upper);
00153 }
|
|
||||||||||||||||
|
Get an iterator to all roads in given arm Definition at line 117 of file TMui1DRoadMapO.cxx. References TMuiKeyGen::get_key_range, and TMuiKeyGen::key_range.
00120 {
00121 // key range associated with this plane
00122 //
00123 TMuiKeyGen::key_range range = TMuiKeyGen::get_key_range(arm,
00124 0,
00125 panel,
00126 orientation
00127 );
00128 // return the iterator with specified range
00129 //
00130 Key lower(get_map_key(),range.first);
00131 Key upper(get_map_key(),range.second);
00132 return find(lower,upper);
00133 }
|
|
|
Get a const iterator to all roads in given arm Definition at line 104 of file TMui1DRoadMapO.cxx. References TMuiKeyGen::get_key_range, and TMuiKeyGen::key_range.
00105 {
00106 // key range associated with this plane
00107 //
00108 TMuiKeyGen::key_range range = TMuiKeyGen::get_key_range(arm);
00109 // return the iterator with specified range
00110 //
00111 Key lower(get_map_key(),range.first);
00112 Key upper(get_map_key(),range.second);
00113 return find(lower,upper);
00114 }
|
|
|
Get an iterator to all roads in given arm Definition at line 90 of file TMui1DRoadMapO.cxx. References TMuiKeyGen::get_key_range, and TMuiKeyGen::key_range. Referenced by mMuiRoadFinder1::cut_1droads, mMuiRoadFinder1::event, and mMuiRoadFinder1::find_2droads.
00091 {
00092 // key range associated with this plane
00093 //
00094 TMuiKeyGen::key_range range = TMuiKeyGen::get_key_range(arm);
00095 // return the iterator with specified range
00096 //
00097 Key lower(get_map_key(),range.first);
00098 Key upper(get_map_key(),range.second);
00099 return find(lower,upper);
00100 }
|
|
|
Definition at line 82 of file TMui1DRoadMapO.h. References _count, and TMuiKeyGen::get_max_index. Referenced by insert_new.
00082 { return _count++%TMuiKeyGen::get_max_index();}
|
|
|
Insert an copied TMui1DRoadO into map and return an iterator to the newly created object. Definition at line 43 of file TMui1DRoadMapO.cxx. References TMuiKeyGen::get_key, TMuiKeyGen::get_key_range, TMuiKeyGen::key_range, and TMuiKeyGen::key_type.
00044 {
00045 // count the number of tracks to determine the new index
00046 //
00047 TMuiKeyGen::key_range range = TMuiKeyGen::get_key_range(roadptr->get()->get_arm(),
00048 0,
00049 roadptr->get()->get_panel(),
00050 roadptr->get()->get_orientation()
00051 );
00052
00053 Key lower(get_map_key(),range.first);
00054 Key upper(get_map_key(),range.second);
00055 UShort_t index = find(lower,upper).count();
00056
00057 // get the key for the new cluster
00058 //
00059 TMuiKeyGen::key_type key = TMuiKeyGen::get_key(roadptr->get()->get_arm(),
00060 0, //Plane not relevant for 1D roads
00061 roadptr->get()->get_panel(),
00062 roadptr->get()->get_orientation(),
00063 index);
00064 // full key
00065 //
00066 Key full_key(get_map_key(),key);
00067
00068 // insert cluster
00069 //
00070 insert(full_key, new value_imp_type(full_key,roadptr->get()));
00071
00072 // okay not so efficient
00073 //
00074 TMui1DRoadMapO::iterator thisKey = find(full_key);
00075
00076 // Now we have to associate all clusters in the roadptr
00077 // to the one we just created.
00078 TMuiClusterMapO::key_iterator iClust =
00079 roadptr->get()->get_associated<TMuiClusterO>();
00080 while (TMuiClusterMapO::pointer pClust = iClust.next())
00081 {
00082 PHKey::associate(thisKey.current(),pClust);
00083 }
00084
00085 return thisKey;
00086 }
|
|
||||||||||||||||
|
Insert an new TMui1DRoadO into map and return an iterator to the newly created object. Definition at line 13 of file TMui1DRoadMapO.cxx. References TMuiKeyGen::get_key, get_roll_count, and TMuiKeyGen::key_type. Referenced by mMuiRoadFinder1::find_1droads, and mMuiRoadFinder1::track_seed.
00014 {
00015 // Get the new index from the roll count;
00016 //
00017 UShort_t index = get_roll_count();
00018
00019 // get the key for the new cluster
00020 //
00021 TMuiKeyGen::key_type key = TMuiKeyGen::get_key(arm,
00022 0, //Plane not relevant for 1D roads
00023 panel,
00024 orientation,
00025 index);
00026 // full key
00027 //
00028 Key full_key(get_map_key(),key);
00029
00030 // insert cluster
00031 //
00032 insert(full_key, new value_imp_type(full_key,
00033 arm,
00034 panel,
00035 orientation,
00036 index));
00037
00038 // okay not so efficient
00039 //
00040 return find(full_key);
00041 }
|
|
|
Definition at line 83 of file TMui1DRoadMapO.h. Referenced by get_roll_count. |