Rename root_folder and channel_name to more sensible names

Since we are always using this recorders in the context of
Jungfraus, we should start naming things in this context as
well. Instead of root_folder we will be using detector_folder
(as root of the buffer on disk for a specific detector) and
module_name instead of device_name (to specify one module
inside the detector).
This commit is contained in:
2020-07-20 10:31:34 +02:00
parent bfaf7dd282
commit 376469b41c
2 changed files with 11 additions and 13 deletions
+4 -4
View File
@@ -6,8 +6,8 @@
class BinaryReader {
const std::string root_folder_;
const std::string device_name_;
const std::string detector_folder_;
const std::string module_name_;
std::string current_input_file_;
int input_file_fd_;
@@ -16,8 +16,8 @@ class BinaryReader {
void close_current_file();
public:
BinaryReader(const std::string &root_folder,
const std::string &device_name);
BinaryReader(const std::string &detector_folder,
const std::string &module_name);
~BinaryReader();
+7 -9
View File
@@ -6,20 +6,18 @@
#include <fcntl.h>
#include "BufferUtils.hpp"
#include "writer_config.hpp"
#include "buffer_config.hpp"
using namespace std;
using namespace writer_config;
using namespace buffer_config;
BinaryReader::BinaryReader(
const std::string &root_folder,
const std::string &device_name) :
root_folder_(root_folder),
device_name_(device_name),
current_input_file_(""),
input_file_fd_(-1)
const std::string &detector_folder,
const std::string &module_name) :
detector_folder_(detector_folder),
module_name_(module_name),
current_input_file_(""),
input_file_fd_(-1)
{}
BinaryReader::~BinaryReader()
@@ -32,7 +30,7 @@ void BinaryReader::get_frame(
{
auto current_frame_file = BufferUtils::get_filename(
root_folder_, device_name_, pulse_id);
detector_folder_, module_name_, pulse_id);
if (current_frame_file != current_input_file_) {
open_file(current_frame_file);