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...>(
17  cfg, debugName, cfg.getParameterSet("Client").getUntrackedParameter<bool>("verbose")) {}
18 
19  //use this function to avoid calling TritonService functions Nstreams times
20  static std::unique_ptr<G> initializeGlobalCache(edm::ParameterSet const& pset) {
22  const auto& clientPset = pset.getParameterSet("Client");
23  ts->addModel(clientPset.getParameter<std::string>("modelName"),
24  clientPset.getParameter<edm::FileInPath>("modelConfigPath").fullPath());
25  return nullptr;
26  }
27 
28  static void globalEndJob(G*) {}
29 };
30 
31 template <typename... Capabilities>
33 
34 #endif
tuple cfg
Definition: looper.py:296
static std::unique_ptr< G > initializeGlobalCache(edm::ParameterSet const &pset)
ParameterSet const & getParameterSet(ParameterSetID const &id)
void addModel(const std::string &modelName, const std::string &path)
ParameterSet const & getParameterSet(std::string const &) const
static void globalEndJob(G *)
TritonEDProducerT(edm::ParameterSet const &cfg, const std::string &debugName)
std::string fullPath() const
Definition: FileInPath.cc:161