File indexing completed on 2023-03-17 10:50:17
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #include "oneapi/tbb/concurrent_unordered_map.h"
0015
0016
0017 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTReadoutCollection.h"
0018
0019 static tbb::concurrent_unordered_map<int, L1MuGMTReadoutRecord> s_empty_record_cache;
0020
0021 L1MuGMTReadoutRecord const& L1MuGMTReadoutCollection::getDefaultFor(int bx) {
0022
0023 auto itFound = s_empty_record_cache.find(bx);
0024 if (itFound == s_empty_record_cache.end()) {
0025 auto foundPair = s_empty_record_cache.insert(std::make_pair(bx, L1MuGMTReadoutRecord(bx)));
0026 itFound = foundPair.first;
0027 }
0028 return itFound->second;
0029 }