#include <Geometry/MuonNumbering/interface/MuonBaseNumber.h>
Public Member Functions | |
void | addBase (LevelBaseNumber) |
void | addBase (const int level, const int super, const int base) |
int | getBaseNo (int level) const |
int | getLevels () const |
int | getSuperNo (int level) const |
MuonBaseNumber () | |
~MuonBaseNumber () | |
Protected Types | |
typedef std::vector < LevelBaseNumber > | basenumber_type |
Protected Attributes | |
basenumber_type | sortedBaseNumber |
Definition at line 23 of file MuonBaseNumber.h.
typedef std::vector<LevelBaseNumber> MuonBaseNumber::basenumber_type [protected] |
Definition at line 38 of file MuonBaseNumber.h.
MuonBaseNumber::MuonBaseNumber | ( | ) | [inline] |
MuonBaseNumber::~MuonBaseNumber | ( | ) | [inline] |
void MuonBaseNumber::addBase | ( | LevelBaseNumber | num | ) |
Definition at line 7 of file MuonBaseNumber.cc.
References LevelBaseNumber::base(), GenMuonPlsPt100GeV_cfg::cout, end, lat::endl(), LevelBaseNumber::level(), LogDebug, sortedBaseNumber, and LevelBaseNumber::super().
00007 { 00008 basenumber_type::iterator cur=sortedBaseNumber.begin(); 00009 basenumber_type::iterator end=sortedBaseNumber.end(); 00010 00011 // do a small check if level is already occupied 00012 00013 while (cur!=end) { 00014 if (num.level()==(*cur).level()) { 00015 LogDebug("MuonBaseNumber") << "MuonBaseNumber::addBase was asked to add " 00016 <<num.level()<<" " 00017 <<num.super()<<" " 00018 <<num.base() 00019 <<" to existing level " 00020 <<(*cur).level()<<" " 00021 <<(*cur).super()<<" " 00022 <<(*cur).base() << " but refused."; 00023 return; // don't overwrite current volume stored 00024 } 00025 cur++; 00026 } 00027 00028 cur=sortedBaseNumber.begin(); 00029 while (cur!=end) { 00030 if (num.level()<(*cur).level()) break; 00031 cur++; 00032 } 00033 sortedBaseNumber.insert(cur,num); 00034 00035 #ifdef LOCAL_DEBUG 00036 cur=sortedBaseNumber.begin(); 00037 end=sortedBaseNumber.end(); 00038 std::cout << "MuonBaseNumber::AddBase "; 00039 while (cur!=end) { 00040 std::cout<<(*cur).level()<<" "; 00041 std::cout<<(*cur).super()<<" "; 00042 std::cout<<(*cur).base(); 00043 std::cout<<","; 00044 cur++; 00045 } 00046 std::cout <<std::endl; 00047 #endif 00048 00049 }
Definition at line 51 of file MuonBaseNumber.cc.
References funct::num().
Referenced by MuonDDDNumbering::geoHistoryToBaseNumber(), and MuonG4Numbering::PhysicalVolumeToBaseNumber().
Definition at line 72 of file MuonBaseNumber.cc.
References end, and sortedBaseNumber.
Referenced by CSCNumberingScheme::baseNumberToUnitNumber(), RPCNumberingScheme::baseNumberToUnitNumber(), DTNumberingScheme::baseNumberToUnitNumber(), DTNumberingScheme::decode(), and MuonDDDNumbering::geoHistoryToBaseNumber().
00072 { 00073 basenumber_type::const_iterator cur=sortedBaseNumber.begin(); 00074 basenumber_type::const_iterator end=sortedBaseNumber.end(); 00075 while (cur!=end) { 00076 if ((*cur).level()==level) { 00077 return (*cur).base(); 00078 } 00079 cur++; 00080 } 00081 return 0; 00082 }
int MuonBaseNumber::getLevels | ( | ) | const |
Definition at line 56 of file MuonBaseNumber.cc.
References sortedBaseNumber.
Referenced by CSCNumberingScheme::baseNumberToUnitNumber(), RPCNumberingScheme::baseNumberToUnitNumber(), DTNumberingScheme::baseNumberToUnitNumber(), DTNumberingScheme::decode(), and MuonDDDNumbering::geoHistoryToBaseNumber().
00056 { 00057 return sortedBaseNumber.size(); 00058 }
Definition at line 60 of file MuonBaseNumber.cc.
References end, and sortedBaseNumber.
Referenced by CSCNumberingScheme::baseNumberToUnitNumber(), RPCNumberingScheme::baseNumberToUnitNumber(), DTNumberingScheme::baseNumberToUnitNumber(), DTNumberingScheme::decode(), MuonDDDNumbering::geoHistoryToBaseNumber(), and MuonRpcFrameRotation::transformPoint().
00060 { 00061 basenumber_type::const_iterator cur=sortedBaseNumber.begin(); 00062 basenumber_type::const_iterator end=sortedBaseNumber.end(); 00063 while (cur!=end) { 00064 if ((*cur).level()==level) { 00065 return (*cur).super(); 00066 } 00067 cur++; 00068 } 00069 return 0; 00070 }
basenumber_type MuonBaseNumber::sortedBaseNumber [protected] |
Definition at line 39 of file MuonBaseNumber.h.
Referenced by addBase(), getBaseNo(), getLevels(), and getSuperNo().