CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
L1MuBMSecProcMap Class Reference

#include <L1MuBMSecProcMap.h>

Public Types

typedef std::map< L1MuBMSecProcId, L1MuBMSectorProcessor *, std::less< L1MuBMSecProcId > > 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 L1MuBMSecProcId &, L1MuBMSectorProcessor *sp)
 insert a Sector Processor into the container More...
 
 L1MuBMSecProcMap ()
 constructor More...
 
int size () const
 return number of entries present in the container More...
 
L1MuBMSectorProcessorsp (const L1MuBMSecProcId &) const
 return pointer to Sector Processor More...
 
virtual ~L1MuBMSecProcMap ()
 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 39 of file L1MuBMSecProcMap.h.

Member Typedef Documentation

◆ SPmap

Definition at line 41 of file L1MuBMSecProcMap.h.

◆ SPmap_iter

typedef SPmap::iterator L1MuBMSecProcMap::SPmap_iter

Definition at line 42 of file L1MuBMSecProcMap.h.

Constructor & Destructor Documentation

◆ L1MuBMSecProcMap()

L1MuBMSecProcMap::L1MuBMSecProcMap ( )

constructor

Definition at line 43 of file L1MuBMSecProcMap.cc.

43 : m_map() {}

◆ ~L1MuBMSecProcMap()

L1MuBMSecProcMap::~L1MuBMSecProcMap ( )
virtual

destructor

Definition at line 49 of file L1MuBMSecProcMap.cc.

References m_map.

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 }
SPmap::iterator SPmap_iter

Member Function Documentation

◆ begin()

SPmap_iter L1MuBMSecProcMap::begin ( void  )
inline

return iterator which points to the first entry of the container

Definition at line 60 of file L1MuBMSecProcMap.h.

References m_map.

Referenced by L1MuBMTrackFinder::reset(), and L1MuBMTrackFinder::run().

60 { return m_map.begin(); }

◆ end()

SPmap_iter L1MuBMSecProcMap::end ( void  )
inline

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

Definition at line 63 of file L1MuBMSecProcMap.h.

References m_map.

Referenced by L1MuBMTrackFinder::reset(), and L1MuBMTrackFinder::run().

63 { return m_map.end(); }

◆ insert()

void L1MuBMSecProcMap::insert ( const L1MuBMSecProcId id,
L1MuBMSectorProcessor sp 
)

insert a Sector Processor into the container

Definition at line 77 of file L1MuBMSecProcMap.cc.

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

Referenced by L1MuBMTrackFinder::setup().

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 }
L1MuBMSectorProcessor * sp(const L1MuBMSecProcId &) const
return pointer to Sector Processor

◆ size()

int L1MuBMSecProcMap::size ( void  ) const
inline

return number of entries present in the container

Definition at line 57 of file L1MuBMSecProcMap.h.

References m_map.

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

57 { return m_map.size(); }

◆ sp()

L1MuBMSectorProcessor * L1MuBMSecProcMap::sp ( const L1MuBMSecProcId id) const

return pointer to Sector Processor

Definition at line 65 of file L1MuBMSecProcMap.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and m_map.

Referenced by insert(), and L1MuBMTrackFinder::sp().

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 }

Member Data Documentation

◆ m_map

SPmap L1MuBMSecProcMap::m_map
private

Definition at line 66 of file L1MuBMSecProcMap.h.

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