CMS 3D CMS Logo

moduleAlloc_setupFile.h
Go to the documentation of this file.
1 #ifndef FWCore_Services_moduleAlloc_setupFile_h
2 #define FWCore_Services_moduleAlloc_setupFile_h
3 
4 #include <string>
5 #include <atomic>
6 #include <vector>
7 
8 namespace edm {
9  class ActivityRegistry;
10  namespace service::moduleAlloc {
11  struct ThreadAllocInfo;
12 
13  class Filter {
14  public:
15  //a negative module id corresponds to an ES module
16  Filter(std::vector<int> const* moduleIDs);
17  //returns true if should keep this
18  bool startOnThread(int moduleID) const;
19  const ThreadAllocInfo* stopOnThread(int moduleID) const;
20 
21  bool startOnThread() const;
22  const ThreadAllocInfo* stopOnThread() const;
23 
24  void setGlobalKeep(bool iShouldKeep);
25  bool globalKeep() const { return globalKeep_.load(); }
26 
27  bool keepModuleInfo(int moduleID) const;
28 
29  private:
30  std::atomic<bool> globalKeep_ = true;
31  std::vector<int> const* moduleIDs_ = nullptr;
32  };
33  void setupFile(std::string const& iFileName, edm::ActivityRegistry&, Filter const*);
34  } // namespace service::moduleAlloc
35 } // namespace edm
36 
37 #endif
const ThreadAllocInfo * stopOnThread() const
Filter(std::vector< int > const *moduleIDs)
void setupFile(std::string const &iFileName, edm::ActivityRegistry &iRegistry, Filter const *iFilter)
bool keepModuleInfo(int moduleID) const
Definition: Filter.py:1
std::vector< int > const * moduleIDs_
HLT enums.