Belle II Software development
CDCTriggerNeuroConfig Class Reference

The payload class for all CDC Neurotrigger information. More...

#include <CDCTriggerNeuroConfig.h>

Inheritance diagram for CDCTriggerNeuroConfig:

Classes

struct  B2FormatLine
 

Public Member Functions

 CDCTriggerNeuroConfig ()
 constructor
 
virtual ~CDCTriggerNeuroConfig ()
 destructor
 
void setB2Format (const std::vector< B2FormatLine > &format)
 function to directly set b2link format
 
B2FormatLine getB2FormatLine (const std::string &name) const
 function to return right line of b2link format
 
void addB2FormatLine (const B2FormatLine &line)
 function to add line to b2link format, overloaded

 
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 setNNName (const std::string &filename)
 set name of neural network version

 
void loadMLPs (const std::string &filename, const std::string &arrayname)
 load MLP objects from file
 
void setNNNotes (const std::string &notes)
 add some notes to the verison of MLPS

 
void setUseETF (bool b)
 set bool wether ETF is used or not
 
void setPPNotes (const std::string &notes)
 add some notes about the preprocessing
 
void setNNTFirmwareVersionID (const std::string &version)
 set the firmware version id
 
void setNNTFirmwareComment (const std::string &notes)
 add a comment to the firmware version
 
std::vector< B2FormatLinegetB2Format () const
 return b2link format

 
std::string getNNName () const
 return neural network name

 
std::vector< CDCTriggerMLPgetMLPs () const
 return loaded CDCTriggerMPL objects

 
std::string getNNNotes () const
 return neural network notes

 
bool getUseETF () const
 return bool wether ETF is used or not

 
std::string getPPNotes () const
 return notes on preprocessing

 
std::string getNNTFirmwareVersionID () const
 return firmware version

 
std::string getNNTFirmwareComment () const
 returncomment on firmware version

 

Private Member Functions

 ClassDef (CDCTriggerNeuroConfig, 3)
 ClassDef, must be the last term before the closing {}.
 

Private Attributes

std::vector< B2FormatLinem_B2Format = {}
 B2Format.
 
std::string m_NNName
 Used neurotrigger filename.
 
std::vector< CDCTriggerMLPm_MLPs
 weights of expert networks
 
std::string m_NNNotes
 short field for notes
 
bool m_useETF = false
 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.
 
std::string m_NNTFirmwareComment
 Short comment on Firmware.
 

Detailed Description

The payload class for all CDC Neurotrigger information.

struct to hold a line of information of b2link format

Definition at line 26 of file CDCTriggerNeuroConfig.h.

Constructor & Destructor Documentation

◆ CDCTriggerNeuroConfig()

constructor

Definition at line 29 of file CDCTriggerNeuroConfig.h.

29{}

◆ ~CDCTriggerNeuroConfig()

virtual ~CDCTriggerNeuroConfig ( )
inlinevirtual

destructor

Definition at line 32 of file CDCTriggerNeuroConfig.h.

32{};

Member Function Documentation

◆ addB2FormatLine() [1/2]

void addB2FormatLine ( const B2FormatLine line)
inline

function to add line to b2link format, overloaded

Definition at line 68 of file CDCTriggerNeuroConfig.h.

69 {
70 m_B2Format.push_back(line);
71 }
std::vector< B2FormatLine > m_B2Format
B2Format.

◆ addB2FormatLine() [2/2]

void addB2FormatLine ( int  start,
int  end,
int  offset,
const std::string &  name,
const std::string &  description 
)
inline

function to add line to b2link format, overloaded

Definition at line 73 of file CDCTriggerNeuroConfig.h.

74 {
75 B2FormatLine b;
76 b.start = start;
77 b.end = end;
78 b.offset = offset;
79 b.name = name;
80 b.description = description;
82 }
void addB2FormatLine(const B2FormatLine &line)
function to add line to b2link format, overloaded

◆ getB2Format()

std::vector< B2FormatLine > getB2Format ( ) const
inline

return b2link format

Definition at line 142 of file CDCTriggerNeuroConfig.h.

142{return m_B2Format;}

◆ getB2FormatLine()

B2FormatLine getB2FormatLine ( const std::string &  name) const
inline

function to return right line of b2link format

Definition at line 55 of file CDCTriggerNeuroConfig.h.

56 {
57 B2FormatLine ret;
58 for (auto line : m_B2Format) {
59 if (name == line.name) {
60 ret = line;
61 continue;
62 }
63 }
64 return ret;
65 }

◆ getMLPs()

std::vector< CDCTriggerMLP > getMLPs ( ) const
inline

return loaded CDCTriggerMPL objects

Definition at line 146 of file CDCTriggerNeuroConfig.h.

146{return m_MLPs;}
std::vector< CDCTriggerMLP > m_MLPs
weights of expert networks

◆ getNNName()

std::string getNNName ( ) const
inline

return neural network name

Definition at line 144 of file CDCTriggerNeuroConfig.h.

144{return m_NNName;}
std::string m_NNName
Used neurotrigger filename.

◆ getNNNotes()

std::string getNNNotes ( ) const
inline

return neural network notes

Definition at line 148 of file CDCTriggerNeuroConfig.h.

148{return m_NNNotes;}
std::string m_NNNotes
short field for notes

◆ getNNTFirmwareComment()

std::string getNNTFirmwareComment ( ) const
inline

returncomment on firmware version

Definition at line 156 of file CDCTriggerNeuroConfig.h.

156{return m_NNTFirmwareComment;}
std::string m_NNTFirmwareComment
Short comment on Firmware.

◆ getNNTFirmwareVersionID()

std::string getNNTFirmwareVersionID ( ) const
inline

return firmware version

Definition at line 154 of file CDCTriggerNeuroConfig.h.

std::string m_NNTFirmwareVersionID
Firmware Version ID.

◆ getPPNotes()

std::string getPPNotes ( ) const
inline

return notes on preprocessing

Definition at line 152 of file CDCTriggerNeuroConfig.h.

152{return m_PPNotes;}
std::string m_PPNotes
short field for notes

◆ getUseETF()

bool getUseETF ( ) const
inline

return bool wether ETF is used or not

Definition at line 150 of file CDCTriggerNeuroConfig.h.

150{return m_useETF;}
bool m_useETF
switch wether the ETF is used or the first priority time of the TSF is used during preprocessing

◆ loadMLPs()

void loadMLPs ( const std::string &  filename,
const std::string &  arrayname 
)
inline

load MLP objects from file

Definition at line 91 of file CDCTriggerNeuroConfig.h.

92 {
93 TFile datafile(filename.c_str(), "READ");
94 TObjArray* MLPs = (TObjArray*)datafile.Get(arrayname.c_str());
95 if (!MLPs) {
96 datafile.Close();
97 return;
98 }
99 m_MLPs.clear();
100 for (int isector = 0; isector < MLPs->GetEntriesFast(); ++isector) {
101 CDCTriggerMLP* expert = dynamic_cast<CDCTriggerMLP*>(MLPs->At(isector));
102 if (expert) m_MLPs.push_back(*expert);
103 }
104 MLPs->Clear();
105 delete MLPs;
106 datafile.Close();
107 }

◆ setB2Format()

void setB2Format ( const std::vector< B2FormatLine > &  format)
inline

function to directly set b2link format

Definition at line 48 of file CDCTriggerNeuroConfig.h.

49 {
50 for (auto line : format) {
51 addB2FormatLine(line);
52 }
53 }

◆ setNNName()

void setNNName ( const std::string &  filename)
inline

set name of neural network version

Definition at line 84 of file CDCTriggerNeuroConfig.h.

85 {
86 if (filename.size() <= 255) {
87 m_NNName = filename;
88 }
89 }

◆ setNNNotes()

void setNNNotes ( const std::string &  notes)
inline

add some notes to the verison of MLPS

Definition at line 109 of file CDCTriggerNeuroConfig.h.

110 {
111 if (notes.size() <= 255) {
112 m_NNNotes = notes;
113 }
114 }

◆ setNNTFirmwareComment()

void setNNTFirmwareComment ( const std::string &  notes)
inline

add a comment to the firmware version

Definition at line 135 of file CDCTriggerNeuroConfig.h.

136 {
137 if (notes.size() <= 255) {
138 m_NNTFirmwareComment = notes;
139 }
140 }

◆ setNNTFirmwareVersionID()

void setNNTFirmwareVersionID ( const std::string &  version)
inline

set the firmware version id

Definition at line 128 of file CDCTriggerNeuroConfig.h.

129 {
130 if (version.size() <= 255) {
131 m_NNTFirmwareVersionID = version;
132 }
133 }

◆ setPPNotes()

void setPPNotes ( const std::string &  notes)
inline

add some notes about the preprocessing

Definition at line 121 of file CDCTriggerNeuroConfig.h.

122 {
123 if (notes.size() <= 255) {
124 m_PPNotes = notes;
125 }
126 }

◆ setUseETF()

void setUseETF ( bool  b)
inline

set bool wether ETF is used or not

Definition at line 116 of file CDCTriggerNeuroConfig.h.

117 {
118 m_useETF = b;
119 }

Member Data Documentation

◆ m_B2Format

std::vector<B2FormatLine> m_B2Format = {}
private

B2Format.

Definition at line 160 of file CDCTriggerNeuroConfig.h.

◆ m_MLPs

std::vector<CDCTriggerMLP> m_MLPs
private

weights of expert networks

Definition at line 166 of file CDCTriggerNeuroConfig.h.

◆ m_NNName

std::string m_NNName
private

Used neurotrigger filename.

Definition at line 163 of file CDCTriggerNeuroConfig.h.

◆ m_NNNotes

std::string m_NNNotes
private

short field for notes

Definition at line 169 of file CDCTriggerNeuroConfig.h.

◆ m_NNTFirmwareComment

std::string m_NNTFirmwareComment
private

Short comment on Firmware.

Definition at line 182 of file CDCTriggerNeuroConfig.h.

◆ m_NNTFirmwareVersionID

std::string m_NNTFirmwareVersionID
private

Firmware Version ID.

Definition at line 179 of file CDCTriggerNeuroConfig.h.

◆ m_PPNotes

std::string m_PPNotes
private

short field for notes

Definition at line 176 of file CDCTriggerNeuroConfig.h.

◆ m_useETF

bool m_useETF = false
private

switch wether the ETF is used or the first priority time of the TSF is used during preprocessing

Definition at line 173 of file CDCTriggerNeuroConfig.h.


The documentation for this class was generated from the following file: