CMS 3D CMS Logo

L1RPCConeBuilder.h

Go to the documentation of this file.
00001 #ifndef CondFormats_RPCObjects_L1RPCConeBuilder_h
00002 #define CondFormats_RPCObjects_L1RPCConeBuilder_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     RPCObjects
00006 // Class  :     L1RPCConeBuilder
00007 // 
00016 //
00017 // Original Author:  Tomasz Fruboes
00018 //         Created:  Fri Feb 22 12:27:02 CET 2008
00019 // $Id: L1RPCConeBuilder.h,v 1.3 2008/04/16 13:44:11 fruboes Exp $
00020 //
00021 
00022 #include <vector>
00023 #include <map>
00024 
00025 //#include "CondFormats/RPCObjects/interface/RPCConeConnection.h"
00026 
00027 
00028 
00029 class L1RPCConeBuilder
00030 {
00031    
00032    public:
00033       //  For logplane sizes
00034       typedef std::vector<int> TLogPlaneSize;
00035       typedef std::vector<TLogPlaneSize > TLPSizesInTowers;
00036       
00037       // For (roll,hwplane)->tower mapping
00038       typedef std::vector<int> TTowerList;
00039       typedef std::vector<TTowerList > THWplaneToTower;
00040       typedef std::vector<THWplaneToTower > TRingsToTowers;
00041 
00042       
00043       // For (roll,hwplane)->logplane mapping
00044       typedef std::vector<int> TLPList;
00045       typedef std::vector<TTowerList > THWplaneToLP;
00046       typedef std::vector<THWplaneToTower > TRingsToLP;
00047 
00048       // uncompressed connections
00049       struct TStripCon{
00050         signed char m_tower;
00051         unsigned char m_PAC;
00052         unsigned char m_logplane;
00053         unsigned char m_logstrip;
00054       };
00055       
00056       typedef std::vector<TStripCon> TStripConVec;
00057       typedef std::map<unsigned char, TStripConVec> TStrip2ConVec;
00058       typedef std::map<uint32_t, TStrip2ConVec> TConMap;
00059       
00060       L1RPCConeBuilder();
00061       virtual ~L1RPCConeBuilder();
00062 
00063       void setLPSizeForTowers(const TLPSizesInTowers & lpSizes) { m_LPSizesInTowers = lpSizes;};
00064       void setRingsToTowers(const TRingsToTowers & RingsToTowers) { m_RingsToTowers = RingsToTowers;};
00065       void setRingsToLP(const TRingsToLP & RingsToLP) {m_RingsToLP = RingsToLP;};
00066             
00067       void setConeConnectionMap(const TConMap & connMap) { m_coneConnectionMap = connMap;};
00068       //const TConMap & getConeConnectionMap() const { return m_coneConnectionMap;};
00069       
00070       /*
00071       const TStripConVec & getConVec(uint32_t det, unsigned char strip) const 
00072           { 
00073             //return const_cast<TConMap>(m_coneConnectionMap)[det][strip];
00074             return m_coneConnectionMap[det][strip];
00075       };*/
00076       
00077       std::pair<TStripConVec::const_iterator, TStripConVec::const_iterator> 
00078           getConVec(uint32_t det, unsigned char strip) const ;
00079 //      {
00080 //       return std::make_pair(m_coneConnectionMap[det][strip].begin(),m_coneConnectionMap[det][strip].end());
00081 //      };
00082       void setFirstTower(int tow) {m_firstTower = tow;};
00083       void setLastTower(int tow) {m_lastTower = tow;};
00084       
00085       const TLPSizesInTowers &  getLPSizes() const { return m_LPSizesInTowers;};
00086       
00087    private:
00088 //      L1RPCConeBuilder(const L1RPCConeBuilder&); // stop default
00089 
00090 //      const L1RPCConeBuilder& operator=(const L1RPCConeBuilder&); // stop default
00091 
00092       // ---------- member data --------------------------------
00093       
00094 //      const short m_towerCount;
00095       //const short m_logplaneCount;
00096          
00097       int m_firstTower;
00098       int m_lastTower;
00099       TLPSizesInTowers m_LPSizesInTowers;
00100       TRingsToTowers m_RingsToTowers;
00101       TRingsToLP m_RingsToLP;
00102       
00103       TConMap m_coneConnectionMap; // mutable needed for std::map [] operator :( ; should be better way
00104 };
00105 
00106 
00107 #endif

Generated on Tue Jun 9 17:26:45 2009 for CMSSW by  doxygen 1.5.4