CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
L1MuDTSecProcMap Class Reference

#include <L1MuDTSecProcMap.h>

Public Types

typedef std::map
< L1MuDTSecProcId,
L1MuDTSectorProcessor
*, std::less< L1MuDTSecProcId > > 
SPmap
 
typedef SPmap::iterator SPmap_iter
 

Public Member Functions

SPmap_iter begin ()
 return iterator which points to the first entry of the container More...
 
SPmap_iter end ()
 return iterator which points to the one-past-last entry of the container More...
 
void insert (const L1MuDTSecProcId &, L1MuDTSectorProcessor *sp)
 insert a Sector Processor into the container More...
 
 L1MuDTSecProcMap ()
 constructor More...
 
int size () const
 return number of entries present in the container More...
 
L1MuDTSectorProcessorsp (const L1MuDTSecProcId &) const
 return pointer to Sector Processor More...
 
virtual ~L1MuDTSecProcMap ()
 destructor More...
 

Private Attributes

SPmap m_map
 

Detailed Description

Sector Processor container map which contains all sector processors

Date:
2006/06/26 16:11:13
Revision:
1.1

N. Neumeister CERN EP

Definition at line 40 of file L1MuDTSecProcMap.h.

Member Typedef Documentation

Definition at line 44 of file L1MuDTSecProcMap.h.

typedef SPmap::iterator L1MuDTSecProcMap::SPmap_iter

Definition at line 45 of file L1MuDTSecProcMap.h.

Constructor & Destructor Documentation

L1MuDTSecProcMap::L1MuDTSecProcMap ( )

constructor

Definition at line 45 of file L1MuDTSecProcMap.cc.

45 : m_map() {}
L1MuDTSecProcMap::~L1MuDTSecProcMap ( )
virtual

destructor

Definition at line 51 of file L1MuDTSecProcMap.cc.

References m_map.

51  {
52 
53  SPmap_iter iter = m_map.begin();
54  while ( iter != m_map.end() ) {
55  delete (*iter).second;
56  iter++;
57  }
58  m_map.clear();
59 
60 }
SPmap::iterator SPmap_iter

Member Function Documentation

SPmap_iter L1MuDTSecProcMap::begin ( void  )
inline

return iterator which points to the first entry of the container

Definition at line 63 of file L1MuDTSecProcMap.h.

References m_map.

63 { return m_map.begin(); }
SPmap_iter L1MuDTSecProcMap::end ( void  )
inline

return iterator which points to the one-past-last entry of the container

Definition at line 66 of file L1MuDTSecProcMap.h.

References m_map.

66 { return m_map.end(); }
void L1MuDTSecProcMap::insert ( const L1MuDTSecProcId id,
L1MuDTSectorProcessor sp 
)

insert a Sector Processor into the container

Definition at line 85 of file L1MuDTSecProcMap.cc.

References ExpressReco_HICollisions_FallBack::id, m_map, and sp().

85  {
86 
87  SPmap::const_iterator it = m_map.find(id);
88  // if ( it != m_map.end() )
89  // cerr << "Error: More than one Sector Processor with same identifier"
90  // << endl;
91  m_map[id] = sp;
92 
93 }
L1MuDTSectorProcessor * sp(const L1MuDTSecProcId &) const
return pointer to Sector Processor
int L1MuDTSecProcMap::size ( void  ) const
inline

return number of entries present in the container

Definition at line 60 of file L1MuDTSecProcMap.h.

References m_map.

60 { return m_map.size(); }
L1MuDTSectorProcessor * L1MuDTSecProcMap::sp ( const L1MuDTSecProcId id) const

return pointer to Sector Processor

Definition at line 70 of file L1MuDTSecProcMap.cc.

References m_map.

Referenced by insert().

70  {
71 
72  SPmap::const_iterator it = m_map.find(id);
73  if ( it == m_map.end() ) {
74  // cerr << "Error: Sector Processor not in the map" << endl;
75  return 0;
76  }
77  return (*it).second;
78 
79 }

Member Data Documentation

SPmap L1MuDTSecProcMap::m_map
private

Definition at line 70 of file L1MuDTSecProcMap.h.

Referenced by begin(), end(), insert(), size(), sp(), and ~L1MuDTSecProcMap().