#include <RingerSelector.h>
Definition at line 27 of file RingerSelector.h.
◆ RingerSelector()
Ringer::onnx::RingerSelector::RingerSelector |
( |
const std::string & |
name | ) |
|
◆ ~RingerSelector()
Ringer::onnx::RingerSelector::~RingerSelector |
( |
| ) |
|
|
default |
◆ accept()
Accept method.
Definition at line 109 of file RingerSelector.cxx.
117 if ( eta < cutDef.etaMin() || eta >= cutDef.etaMax() )
continue;
118 return cutDef.accept( discr, avgmu );
◆ GetBasePath()
std::string Ringer::onnx::RingerSelector::GetBasePath |
( |
const std::string & |
path | ) |
const |
|
private |
Get basepath from calib path.
Definition at line 286 of file RingerSelector.cxx.
289 if (!ret.empty() && ret.front()==
'/') ret.erase(0, 1);
◆ GetPaths()
std::vector< std::string > Ringer::onnx::RingerSelector::GetPaths |
( |
const std::string & |
input, |
|
|
TEnv & |
env |
|
) |
| |
|
private |
Get the list of paths inside of tenv.
Definition at line 269 of file RingerSelector.cxx.
271 std::vector<std::string> CutVector;
272 std::string env_input(
env.GetValue(
input.c_str(),
""));
273 if (!env_input.empty()) {
274 std::string::size_type
end;
276 end = env_input.find(
';');
277 CutVector.push_back( env_input.substr(0,
end) );
278 if (
end != std::string::npos) {
279 env_input= env_input.substr(
end+2);
281 }
while (
end != std::string::npos);
◆ GetValues()
template<typename T >
std::vector< T > Ringer::onnx::RingerSelector::GetValues |
( |
const std::string & |
input, |
|
|
TEnv & |
env |
|
) |
| |
|
private |
Get the list of values inside of tenv.
Definition at line 247 of file RingerSelector.cxx.
249 std::vector<T> CutVector;
250 std::string env_input(
env.GetValue(
input.c_str(),
""));
251 if (!env_input.empty()) {
252 std::string::size_type
end;
254 end = env_input.find(
';');
256 if(
strtof(env_input.substr(0,
end),myValue)){
257 CutVector.push_back(myValue);
259 if (
end != std::string::npos) {
260 env_input= env_input.substr(
end+1);
262 }
while (
end != std::string::npos);
◆ initMessaging()
void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ msg() [1/2]
MsgStream & asg::AsgMessaging::msg |
( |
| ) |
const |
|
inherited |
The standard message stream.
- Returns
- A reference to the default message stream of this object.
Definition at line 49 of file AsgMessaging.cxx.
50 #ifndef XAOD_STANDALONE
52 #else // not XAOD_STANDALONE
54 #endif // not XAOD_STANDALONE
◆ msg() [2/2]
MsgStream & asg::AsgMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inherited |
The standard message stream.
- Parameters
-
lvl | The message level to set the stream to |
- Returns
- A reference to the default message stream, set to level "lvl"
Definition at line 57 of file AsgMessaging.cxx.
58 #ifndef XAOD_STANDALONE
60 #else // not XAOD_STANDALONE
63 #endif // not XAOD_STANDALONE
◆ msgLvl()
bool asg::AsgMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inherited |
Test the output level of the object.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicting if messages at given level will be printed
-
true
If messages at level "lvl" will be printed
Definition at line 41 of file AsgMessaging.cxx.
42 #ifndef XAOD_STANDALONE
43 return ::AthMessaging::msgLvl( lvl );
44 #else // not XAOD_STANDALONE
45 return m_msg.msgLevel( lvl );
46 #endif // not XAOD_STANDALONE
◆ predict()
◆ prepare_inputs()
prepare all inputs
Definition at line 151 of file RingerSelector.cxx.
155 std::vector< std::vector< float > >
inputs;
158 if ( PreprocessingMode == 0 ){
159 const std::vector<float> rings = ringsCluster->
rings();
160 std::vector<float> refRings(rings.size());
161 refRings.assign(rings.begin(), rings.end());
163 for(
auto &ring : refRings )
energy+=ring;
166 for(
auto &ring : refRings ) ring/=
energy;
169 inputs.push_back( refRings );
172 }
else if ( PreprocessingMode == 1){
174 const std::vector<float> rings = ringsCluster->
rings();
175 std::vector<float> refRings(rings.size());
176 refRings.assign(rings.begin(), rings.end());
178 std::vector<float> halfRings;
180 constexpr
int PS = 8;
181 constexpr
int EM1 = 64;
182 constexpr
int EM2 = 8;
183 constexpr
int EM3 = 8;
184 constexpr
int HAD1 = 4;
185 constexpr
int HAD2 = 4;
186 constexpr
int HAD3 = 4;
188 halfRings.insert(halfRings.end(), refRings.begin(), refRings.begin() +
PS/2);
189 halfRings.insert(halfRings.end(), refRings.begin() +
PS, refRings.begin() +
PS + (
EM1/2));
190 halfRings.insert(halfRings.end(), refRings.begin() +
PS +
EM1, refRings.begin() +
PS +
EM1 + (
EM2/2));
191 halfRings.insert(halfRings.end(), refRings.begin() +
PS +
EM1 +
EM2, refRings.begin() +
PS +
EM1 +
EM2 + (
EM3/2));
192 halfRings.insert(halfRings.end(), refRings.begin() +
PS +
EM1 +
EM2 +
EM3, refRings.begin() +
PS +
EM1 +
EM2 +
EM3 + (
HAD1/2));
198 for(
auto &ring : halfRings )
energy+=ring;
201 for(
auto &ring : halfRings ) ring/=
energy;
204 inputs.push_back( halfRings );
◆ read_from()
read tunings from configuration file
Definition at line 26 of file RingerSelector.cxx.
37 return StatusCode::FAILURE;
47 unsigned size =
env.GetValue(
"Model__size" , 0 );
48 auto PreprocessingMode = GetValues<int>(
"Model__barcode",
env);
51 auto etmin = GetValues<float>(
"Model__etmin",
env );
52 auto etmax = GetValues<float>(
"Model__etmax",
env );
55 auto etamin = GetValues<float>(
"Model__etamin",
env );
56 auto etamax = GetValues<float>(
"Model__etamax",
env );
76 unsigned size =
env.GetValue(
"Threshold__size" , 0);
77 auto max_avgmu = GetValues<float>(
"Threshold__MaxAverageMu",
env );
80 auto etmin = GetValues<float>(
"Threshold__etmin",
env );
81 auto etmax = GetValues<float>(
"Threshold__etmax",
env );
83 auto etamin = GetValues<float>(
"Threshold__etamin",
env );
84 auto etamax = GetValues<float>(
"Threshold__etamax",
env );
86 auto slopes = GetValues<float>(
"Threshold__slope",
env );
88 auto offsets = GetValues<float>(
"Threshold__offset",
env );
103 return StatusCode::SUCCESS;
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ strtof()
template<typename T >
bool Ringer::onnx::RingerSelector::strtof |
( |
const std::string & |
input, |
|
|
T & |
f |
|
) |
| |
|
private |
parse tenv string into list with type T
Definition at line 216 of file RingerSelector.cxx.
220 std::string::size_type
first(0);
221 std::string::size_type last(0);
225 if (
first == std::string::npos) {
234 if (last == std::string::npos) {
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_models
◆ m_msg_tls
boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_thresholds
The documentation for this class was generated from the following files: