CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GlobalCacheTMTT.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTMTT_GlobalCacheTMTT_h
2 #define L1Trigger_TrackFindingTMTT_GlobalCacheTMTT_h
3 
4 // Data shared across all streams by TMTT L1 tracking.
5 //
6 // Provides the python configuration parameters
7 // & optional histogramming/debugging.
8 
15 
16 #include <list>
17 #include <memory>
18 
19 namespace tmtt {
20 
22  public:
24  : settings_(iConfig), // Python configuration params
25  htRphiErrMon_(), // rphi HT error monitoring
26  stubWindowSuggest_(&settings_), // Recommend FE stub window sizes.
27  hists_(&settings_) // Histograms
28  {
29  hists_.book();
30  }
31 
32  // Get functions
33  const Settings& settings() const { return settings_; }
36  const std::list<TrackerModule>& listTrackerModule() const { return listTrackerModule_; }
37  Histos& hists() const { return hists_; }
38 
39  // Set functions
40  void setListTrackerModule(const std::list<TrackerModule>& list) const {
41  // Allow only one thread to run this function at a time
42  static std::mutex myMutex;
43  std::lock_guard<std::mutex> myGuard(myMutex);
44 
45  // Only need one copy of tracker geometry for histogramming.
46  if (listTrackerModule_.empty())
47  listTrackerModule_ = list;
48  }
49 
50  private:
54  mutable std::list<TrackerModule> listTrackerModule_;
55  mutable Histos hists_;
56  };
57 
58 } // namespace tmtt
59 
60 #endif
const Settings & settings() const
StubWindowSuggest stubWindowSuggest_
void setListTrackerModule(const std::list< TrackerModule > &list) const
HTrphi::ErrorMonitor htRphiErrMon_
static std::mutex mutex
Definition: Proxy.cc:8
StubWindowSuggest & stubWindowSuggest() const
virtual void book()
Definition: Histos.cc:55
std::list< TrackerModule > listTrackerModule_
const std::list< TrackerModule > & listTrackerModule() const
GlobalCacheTMTT(const edm::ParameterSet &iConfig)
HTrphi::ErrorMonitor & htRphiErrMon() const
Histos & hists() const