CMS 3D CMS Logo

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

N. Neumeister CERN EP

Definition at line 38 of file L1MuDTSecProcMap.h.

Member Typedef Documentation

◆ SPmap

Definition at line 40 of file L1MuDTSecProcMap.h.

◆ SPmap_iter

typedef SPmap::iterator L1MuDTSecProcMap::SPmap_iter

Definition at line 41 of file L1MuDTSecProcMap.h.

Constructor & Destructor Documentation

◆ L1MuDTSecProcMap()

L1MuDTSecProcMap::L1MuDTSecProcMap ( )

constructor

Definition at line 43 of file L1MuDTSecProcMap.cc.

43 : m_map() {}

◆ ~L1MuDTSecProcMap()

L1MuDTSecProcMap::~L1MuDTSecProcMap ( )
virtual

destructor

Definition at line 49 of file L1MuDTSecProcMap.cc.

49  {
50  SPmap_iter iter = m_map.begin();
51  while (iter != m_map.end()) {
52  delete (*iter).second;
53  iter++;
54  }
55  m_map.clear();
56 }

References m_map.

Member Function Documentation

◆ begin()

SPmap_iter L1MuDTSecProcMap::begin ( void  )
inline

return iterator which points to the first entry of the container

Definition at line 59 of file L1MuDTSecProcMap.h.

59 { return m_map.begin(); }

References m_map.

◆ end()

SPmap_iter L1MuDTSecProcMap::end ( void  )
inline

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

Definition at line 62 of file L1MuDTSecProcMap.h.

62 { return m_map.end(); }

References m_map.

◆ insert()

void L1MuDTSecProcMap::insert ( const L1MuDTSecProcId id,
L1MuDTSectorProcessor sp 
)

insert a Sector Processor into the container

Definition at line 77 of file L1MuDTSecProcMap.cc.

77  {
78  //SPmap::const_iterator it = m_map.find(id);
79  // if ( it != m_map.end() )
80  // cerr << "Error: More than one Sector Processor with same identifier"
81  // << endl;
82  m_map[id] = sp;
83 }

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

◆ size()

int L1MuDTSecProcMap::size ( void  ) const
inline

return number of entries present in the container

Definition at line 56 of file L1MuDTSecProcMap.h.

56 { return m_map.size(); }

References m_map.

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

◆ sp()

L1MuDTSectorProcessor * L1MuDTSecProcMap::sp ( const L1MuDTSecProcId id) const

return pointer to Sector Processor

Definition at line 65 of file L1MuDTSecProcMap.cc.

65  {
66  SPmap::const_iterator it = m_map.find(id);
67  if (it == m_map.end()) {
68  // cerr << "Error: Sector Processor not in the map" << endl;
69  return nullptr;
70  }
71  return (*it).second;
72 }

References m_map.

Referenced by insert().

Member Data Documentation

◆ m_map

SPmap L1MuDTSecProcMap::m_map
private

Definition at line 65 of file L1MuDTSecProcMap.h.

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

L1MuDTSecProcMap::m_map
SPmap m_map
Definition: L1MuDTSecProcMap.h:65
L1MuDTSecProcMap::sp
L1MuDTSectorProcessor * sp(const L1MuDTSecProcId &) const
return pointer to Sector Processor
Definition: L1MuDTSecProcMap.cc:65
L1MuDTSecProcMap::SPmap_iter
SPmap::iterator SPmap_iter
Definition: L1MuDTSecProcMap.h:41
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29