mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-06 06:54:13 +02:00
Improve const correctness
This commit is contained in:
+1
-1
@@ -195,7 +195,7 @@ void H5Writer::create_file(hsize_t frame_chunk)
|
||||
current_frame_chunk = frame_chunk;
|
||||
}
|
||||
|
||||
bool H5Writer::is_file_open()
|
||||
bool H5Writer::is_file_open() const
|
||||
{
|
||||
return (file.getId() != -1);
|
||||
}
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ class H5Writer
|
||||
public:
|
||||
H5Writer(const std::string& filename, hsize_t frames_per_file=0, hsize_t initial_dataset_size=1000, hsize_t dataset_increase_step=1000);
|
||||
virtual ~H5Writer();
|
||||
bool is_file_open();
|
||||
bool is_file_open() const;
|
||||
void close_file();
|
||||
void write_data(const std::string& dataset_name, const size_t data_index, const char* data, const std::vector<size_t>& data_shape,
|
||||
const size_t data_bytes_size, const std::string& data_type, const std::string& endianness);
|
||||
|
||||
@@ -49,12 +49,12 @@ string WriterManager::get_status()
|
||||
}
|
||||
}
|
||||
|
||||
string WriterManager::get_output_file()
|
||||
string WriterManager::get_output_file() const
|
||||
{
|
||||
return output_file;
|
||||
}
|
||||
|
||||
map<string, uint64_t> WriterManager::get_statistics()
|
||||
map<string, uint64_t> WriterManager::get_statistics() const
|
||||
{
|
||||
map<string, uint64_t> result = {{"n_received_frames", n_received_frames.load()},
|
||||
{"n_written_frames", n_written_frames.load()},
|
||||
@@ -96,7 +96,7 @@ void WriterManager::set_parameters(const map<string, boost::any>& new_parameters
|
||||
#endif
|
||||
}
|
||||
|
||||
const map<string, DATA_TYPE>& WriterManager::get_parameters_type()
|
||||
const map<string, DATA_TYPE>& WriterManager::get_parameters_type() const
|
||||
{
|
||||
return parameters_type;
|
||||
}
|
||||
@@ -111,7 +111,7 @@ bool WriterManager::is_running()
|
||||
return running_flag.load();
|
||||
}
|
||||
|
||||
bool WriterManager::is_killed()
|
||||
bool WriterManager::is_killed() const
|
||||
{
|
||||
return killed_flag.load();
|
||||
}
|
||||
@@ -131,7 +131,7 @@ void WriterManager::lost_frame(size_t frame_index)
|
||||
n_lost_frames++;
|
||||
}
|
||||
|
||||
bool WriterManager::are_all_parameters_set()
|
||||
bool WriterManager::are_all_parameters_set()
|
||||
{
|
||||
lock_guard<mutex> lock(parameters_mutex);
|
||||
|
||||
|
||||
@@ -32,16 +32,16 @@ class WriterManager
|
||||
void stop();
|
||||
void kill();
|
||||
bool is_running();
|
||||
bool is_killed();
|
||||
bool is_killed() const;
|
||||
std::string get_status();
|
||||
bool are_all_parameters_set();
|
||||
std::string get_output_file();
|
||||
std::string get_output_file() const;
|
||||
|
||||
const std::map<std::string, DATA_TYPE>& get_parameters_type();
|
||||
const std::map<std::string, DATA_TYPE>& get_parameters_type() const;
|
||||
std::map<std::string, boost::any> get_parameters();
|
||||
void set_parameters(const std::map<std::string, boost::any>& new_parameters);
|
||||
|
||||
std::map<std::string, uint64_t> get_statistics();
|
||||
std::map<std::string, uint64_t> get_statistics() const;
|
||||
void received_frame(size_t frame_index);
|
||||
void written_frame(size_t frame_index);
|
||||
void lost_frame(size_t frame_index);
|
||||
|
||||
Reference in New Issue
Block a user