CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuGMTReadoutCollection.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: DataFormats/L1GlobalMuonTrigger
4 // Class : L1MuGMTReadoutCollection
5 //
6 // Implementation:
7 // [Notes on implementation]
8 //
9 // Original Author: Christopher Jones
10 // Created: Mon, 04 Nov 2013 17:08:29 GMT
11 //
12 
13 // system include files
14 #include "tbb/concurrent_unordered_map.h"
15 
16 // user include files
18 
19 static tbb::concurrent_unordered_map<int, L1MuGMTReadoutRecord> s_empty_record_cache;
20 
23  // if bx not found return empty readout record
24  auto itFound = s_empty_record_cache.find(bx);
25  if ( itFound == s_empty_record_cache.end()) {
26  auto foundPair = s_empty_record_cache.insert( std::make_pair(bx, L1MuGMTReadoutRecord(bx)) );
27  itFound = foundPair.first;
28  }
29  return itFound->second;
30 }
static tbb::concurrent_unordered_map< int, L1MuGMTReadoutRecord > s_empty_record_cache
string bx
Definition: rpc-layouts.py:13
static L1MuGMTReadoutRecord const & getDefaultFor(int bx)