mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-15 06:17:12 +02:00
@ -10,9 +10,9 @@
|
||||
|
||||
namespace sls {
|
||||
|
||||
CtbConfig::CtbConfig(){
|
||||
for (size_t i=0; i!=num_dacs; ++i){
|
||||
setDacName(i, "dac"+ToString(i));
|
||||
CtbConfig::CtbConfig() {
|
||||
for (size_t i = 0; i != num_dacs; ++i) {
|
||||
setDacName(i, "dac" + ToString(i));
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,11 +25,11 @@ void CtbConfig::check_index(size_t i) const {
|
||||
}
|
||||
|
||||
void CtbConfig::check_size(const std::string &name) const {
|
||||
|
||||
|
||||
if (name.empty())
|
||||
throw RuntimeError("Name needs to be at least one character");
|
||||
|
||||
// dacname_length -1 to account for \0 termination
|
||||
// dacname_length -1 to account for \0 termination
|
||||
if (!(name.size() < (name_length - 1))) {
|
||||
std::ostringstream oss;
|
||||
oss << "Length of name needs to be less than " << name_length - 1
|
||||
@ -48,8 +48,8 @@ void CtbConfig::setDacName(size_t index, const std::string &name) {
|
||||
memcpy(dst, &name[0], name.size());
|
||||
}
|
||||
|
||||
void CtbConfig::setDacNames(const std::vector<std::string>& names){
|
||||
for (size_t i = 0; i!=num_dacs; ++i){
|
||||
void CtbConfig::setDacNames(const std::vector<std::string> &names) {
|
||||
for (size_t i = 0; i != num_dacs; ++i) {
|
||||
setDacName(i, names[i]);
|
||||
}
|
||||
}
|
||||
@ -65,8 +65,6 @@ std::vector<std::string> CtbConfig::getDacNames() const {
|
||||
return names;
|
||||
}
|
||||
|
||||
const char* CtbConfig::shm_tag(){
|
||||
return shm_tag_;
|
||||
}
|
||||
const char *CtbConfig::shm_tag() { return shm_tag_; }
|
||||
|
||||
} // namespace sls
|
Reference in New Issue
Block a user