CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/L1Trigger/RPCTrigger/interface/RPCConeBuilder.h

Go to the documentation of this file.
00001 #ifndef L1Trigger_RPCConeBuilder_RPCConeBuilder_h
00002 #define L1Trigger_RPCConeBuilder_RPCConeBuilder_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     RPCConeBuilder
00006 // Class  :     RPCConeBuilder
00007 // 
00016 //
00017 // Original Author:  
00018 //         Created:  Mon Feb 25 12:06:44 CET 2008
00019 // $Id: RPCConeBuilder.h,v 1.2 2009/09/15 13:49:41 fruboes Exp $
00020 //
00021 #include <memory>
00022 #include "boost/shared_ptr.hpp"
00023 #include "FWCore/Framework/interface/ESProducer.h"
00024 #include "FWCore/Framework/interface/ESHandle.h"
00025 #include "Geometry/RPCGeometry/interface/RPCGeometry.h"
00026 #include "CondFormats/RPCObjects/interface/L1RPCConeBuilder.h"
00027 #include "CondFormats/DataRecord/interface/L1RPCConeBuilderRcd.h"
00028 
00029 
00030 #include "CondFormats/L1TObjects/interface/L1RPCConeDefinition.h"
00031 
00032 #include <map>
00033 //#include "L1TriggerConfig/RPCConeBuilder/interface/RPCStripsRing.h"
00034 #include "L1Trigger/RPCTrigger/interface/RPCStripsRing.h"
00035 
00036 #include "CondFormats/DataRecord/interface/L1RPCConeDefinitionRcd.h"
00037 class RPCConeBuilder : public edm::ESProducer {
00038    public:
00039       
00040       RPCConeBuilder(const edm::ParameterSet&);
00041       ~RPCConeBuilder() {};
00042 
00043       typedef boost::shared_ptr<L1RPCConeBuilder> ReturnType;
00044       
00045 
00046       ReturnType produce(const L1RPCConeBuilderRcd&);
00047       //ReturnType produce(const L1RPCConfigRcd&);
00048       void geometryCallback( const MuonGeometryRecord &);
00049       void coneDefCallback( const L1RPCConeDefinitionRcd &);
00050       
00051    private:
00052      
00053       void buildCones(const edm::ESHandle<RPCGeometry> & rpcGeom);
00054       void buildConnections();
00055       
00056       std::pair<int, int> areConnected(RPCStripsRing::TIdToRindMap::iterator ref,
00057                         RPCStripsRing::TIdToRindMap::iterator other); 
00058       
00059       
00060       // ----------member data ---------------------------
00061       int m_towerBeg;
00062       int m_towerEnd;
00063       int m_rollBeg;
00064       int m_rollEnd;
00065       int m_hwPlaneBeg;
00066       int m_hwPlaneEnd;
00067       
00068       edm::ESHandle<L1RPCConeDefinition> m_L1RPCConeDefinition;
00069       edm::ESHandle<RPCGeometry> m_rpcGeometry;          
00070       bool m_runOnceBuildCones; 
00071           
00072       RPCStripsRing::TIdToRindMap m_ringsMap;
00073       
00074 };
00075 
00076 
00077 
00078 #endif