ATLAS Offline Software
Loading...
Searching...
No Matches
TGCModuleMap.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONTGC_CABLING_TGCMODULEMAP_HH
6#define MUONTGC_CABLING_TGCMODULEMAP_HH
7
8#include <map>
9#include <memory>
10
12
13namespace MuonTGC_Cabling {
14
16 public:
17 using Store_t = std::map<int, std::unique_ptr<TGCModuleId>>;
18 // Constructor & Destructor
19 TGCModuleMap() = default;
21 TGCModuleMap(TGCModuleMap&& other) = default;
23 TGCModuleMap(const TGCModuleMap&) = delete;
25 TGCModuleMap& operator=(TGCModuleMap&& other) = default;
27 TGCModuleMap& operator=(const TGCModuleMap& other) = delete;
29 Store_t::const_iterator begin() const;
31 Store_t::const_iterator end() const;
32
33 Store_t::iterator begin();
34
35 Store_t::iterator end();
36
37 virtual ~TGCModuleMap();
41 std::unique_ptr<TGCModuleId> popModule(const int connector);
42
43 void insert(int connector, std::unique_ptr<TGCModuleId> moduleId);
44
45 std::size_t size() const;
46
47 bool empty() const;
48
49 void clear();
50
51 private:
53};
54
55} // namespace MuonTGC_Cabling
56
57#endif
Store_t::const_iterator end() const
Returns the end iterator of the underlying map.
TGCModuleMap & operator=(const TGCModuleMap &other)=delete
Copy assignment operator.
TGCModuleMap(TGCModuleMap &&other)=default
Move constructor.
std::map< int, std::unique_ptr< TGCModuleId > > Store_t
TGCModuleMap(const TGCModuleMap &)=delete
Copy constructor.
Store_t::const_iterator begin() const
Returns the begin iterator of the underlying map.
TGCModuleMap & operator=(TGCModuleMap &&other)=default
Move assignment operator.
void insert(int connector, std::unique_ptr< TGCModuleId > moduleId)
std::unique_ptr< TGCModuleId > popModule(const int connector)
Return a certain module and remove it from the map.