 |
Belle II Software
release-05-02-19
|
14 #include <trg/cdc/dataobjects/CDCTriggerMLP.h>
28 class CDCTriggerNeuroConfig:
public TObject {
50 void setB2Format(
const std::vector<B2FormatLine>& format)
52 for (
auto line : format) {
61 if (name == line.name) {
75 void addB2FormatLine(
int start,
int end,
int offset,
const std::string& name,
const std::string& description)
82 b.description = description;
86 void setNNName(
const std::string& filename)
88 if (filename.size() <= 255) {
93 void loadMLPs(
const std::string& filename,
const std::string& arrayname)
95 TFile datafile(filename.c_str(),
"READ");
96 TObjArray* MLPs = (TObjArray*)datafile.Get(arrayname.c_str());
101 for (
int isector = 0; isector < MLPs->GetEntriesFast(); ++isector) {
103 if (expert)
m_MLPs.push_back(*expert);
112 if (notes.size() <= 255) {
124 if (notes.size() <= 255) {
131 if (version.size() <= 255) {
138 if (notes.size() <= 255) {
167 std::vector<CDCTriggerMLP>
m_MLPs;
ClassDef(CDCTriggerNeuroConfig, 3)
ClassDef, must be the last term before the closing {}.
CDCTriggerNeuroConfig()
constructor
std::vector< CDCTriggerMLP > getMLPs() const
return loaded CDCTriggerMPL objects
void setB2Format(const std::vector< B2FormatLine > &format)
function to directly set b2link format
void addB2FormatLine(const B2FormatLine &line)
function to add line to b2link format, overloaded
std::vector< B2FormatLine > getB2Format() const
return b2link format
std::vector< B2FormatLine > m_B2Format
B2Format.
std::string m_NNNotes
short field for notes
void setNNName(const std::string &filename)
set name of neural network version
std::vector< CDCTriggerMLP > m_MLPs
weights of expert networks
bool getUseETF() const
return bool wether ETF is used or not
B2FormatLine getB2FormatLine(const std::string &name) const
function to return right line of b2link format
bool m_useETF
switch wether the ETF is used or the first priority time of the TSF is used during preprocessing
std::string m_PPNotes
short field for notes
std::string m_NNTFirmwareVersionID
Firmware Version ID.
void setNNTFirmwareVersionID(const std::string &version)
set the firmware version id
std::string getNNTFirmwareVersionID() const
return firmware version
std::string getNNTFirmwareComment() const
returncomment on firmware version
Abstract base class for different kinds of events.
std::string getPPNotes() const
return notes on preprocessing
void addB2FormatLine(int start, int end, int offset, const std::string &name, const std::string &description)
function to add line to b2link format, overloaded
void setUseETF(bool b)
set bool wether ETF is used or not
The payload class for all CDC Neurotrigger information.
void setPPNotes(const std::string ¬es)
add some notes about the preprocessing
std::string m_NNTFirmwareComment
Short comment on Firmware.
std::string m_NNName
Used neurotrigger filename.
virtual ~CDCTriggerNeuroConfig()
destructor
void setNNTFirmwareComment(const std::string ¬es)
add a comment to the firmware version
void setNNNotes(const std::string ¬es)
add some notes to the verison of MLPS
std::string getNNNotes() const
return neural network notes
void loadMLPs(const std::string &filename, const std::string &arrayname)
load MLP objects from file
std::string getNNName() const
return neural network name
Class to keep all parameters of an expert MLP for the neuro trigger.