CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TritonEDProducer.h
Go to the documentation of this file.
1 #ifndef HeterogeneousCore_SonicTriton_TritonEDProducer
2 #define HeterogeneousCore_SonicTriton_TritonEDProducer
3 
4 //TritonDummyCache include comes first for overload resolution
10 
11 //inherited classes that use a non-default GlobalCache should be sure to call the parent initializeGlobalCache()
12 template <typename G, typename... Capabilities>
13 class TritonEDProducerT : public SonicEDProducer<TritonClient, edm::GlobalCache<G>, Capabilities...> {
14 public:
16  : SonicEDProducer<TritonClient, edm::GlobalCache<G>, Capabilities...>(cfg) {}
17 
18  //use this function to avoid calling TritonService functions Nstreams times
19  static std::unique_ptr<G> initializeGlobalCache(edm::ParameterSet const& pset) {
21  const auto& clientPset = pset.getParameterSet("Client");
22  ts->addModel(clientPset.getParameter<std::string>("modelName"),
23  clientPset.getParameter<edm::FileInPath>("modelConfigPath").fullPath());
24  return nullptr;
25  }
26 
27  static void globalEndJob(G*) {}
28 };
29 
30 template <typename... Capabilities>
32 
33 #endif
tuple cfg
Definition: looper.py:296
static std::unique_ptr< G > initializeGlobalCache(edm::ParameterSet const &pset)
void addModel(const std::string &modelName, const std::string &path)
ParameterSet const & getParameterSet(std::string const &) const
TritonEDProducerT(edm::ParameterSet const &cfg)
static void globalEndJob(G *)
std::string fullPath() const
Definition: FileInPath.cc:161