src
HeterogeneousCore
SonicTriton
interface
TritonOneEDAnalyzer.h
Go to the documentation of this file.
1
#ifndef HeterogeneousCore_SonicTriton_TritonOneEDAnalyzer
2
#define HeterogeneousCore_SonicTriton_TritonOneEDAnalyzer
3
4
#include "
HeterogeneousCore/SonicCore/interface/SonicOneEDAnalyzer.h
"
5
#include "
HeterogeneousCore/SonicTriton/interface/TritonClient.h
"
6
#include "
FWCore/ParameterSet/interface/FileInPath.h
"
7
#include "
FWCore/ServiceRegistry/interface/Service.h
"
8
#include "
HeterogeneousCore/SonicTriton/interface/TritonService.h
"
9
10
#include <string>
11
12
template
<
typename
... Capabilities>
13
class
TritonOneEDAnalyzer
:
public
SonicOneEDAnalyzer
<TritonClient, Capabilities...> {
14
public
:
15
TritonOneEDAnalyzer
(
edm::ParameterSet
const
&
cfg
) :
SonicOneEDAnalyzer
<
TritonClient
, Capabilities...>(
cfg
) {
16
edm::Service<TritonService>
ts;
17
ts->
addModel
(this->
clientPset_
.template getParameter<std::string>(
"modelName"
),
18
this->clientPset_.template getParameter<edm::FileInPath>(
"modelConfigPath"
).fullPath());
19
}
20
21
//destroy client before destructor called to unregister any shared memory before TritonService shuts down fallback server
22
virtual
void
tritonEndJob
() {}
23
void
endJob
() final {
24
tritonEndJob
();
25
this->
client_
.reset();
26
}
27
};
28
29
#endif
edm::Service
Definition:
Service.h:30
SonicOneEDAnalyzer< TritonClient, Capabilities... >::clientPset_
edm::ParameterSet clientPset_
Definition:
SonicOneEDAnalyzer.h:73
TritonService.h
FileInPath.h
TritonService::addModel
void addModel(const std::string &modelName, const std::string &path)
Definition:
TritonService.cc:144
TritonClient.h
SonicOneEDAnalyzer.h
TritonOneEDAnalyzer::TritonOneEDAnalyzer
TritonOneEDAnalyzer(edm::ParameterSet const &cfg)
Definition:
TritonOneEDAnalyzer.h:15
Service.h
looper.cfg
cfg
Definition:
looper.py:296
TritonOneEDAnalyzer::endJob
void endJob() final
Definition:
TritonOneEDAnalyzer.h:23
TritonClient
Definition:
TritonClient.h:19
SonicOneEDAnalyzer< TritonClient, Capabilities... >::client_
std::unique_ptr< TritonClient > client_
Definition:
SonicOneEDAnalyzer.h:74
edm::ParameterSet
Definition:
ParameterSet.h:47
SonicOneEDAnalyzer
Definition:
SonicOneEDAnalyzer.h:18
TritonOneEDAnalyzer::tritonEndJob
virtual void tritonEndJob()
Definition:
TritonOneEDAnalyzer.h:22
TritonOneEDAnalyzer
Definition:
TritonOneEDAnalyzer.h:13
Generated for CMSSW Reference Manual by
1.8.14