mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 23:30:03 +02:00
clang-tidy modernize
This commit is contained in:
parent
3f6736ad23
commit
ab5aa78b8a
@ -53,7 +53,7 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
|
||||
* Destructor
|
||||
* Calls Base Class DestroyThread() and decrements NumberofDataProcessors
|
||||
*/
|
||||
~DataProcessor();
|
||||
~DataProcessor() override;
|
||||
|
||||
|
||||
//*** getters ***
|
||||
@ -61,7 +61,7 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
|
||||
* Returns if the thread is currently running
|
||||
* @returns true if thread is running, else false
|
||||
*/
|
||||
bool IsRunning();
|
||||
bool IsRunning() override;
|
||||
|
||||
/**
|
||||
* Get acquisition started flag
|
||||
@ -170,7 +170,7 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
|
||||
void SetupFileWriter(bool fwe, int* nd, uint32_t* maxf, char* fname,
|
||||
char* fpath, uint64_t* findex,
|
||||
bool* owenable, int* dindex, int* nunits, uint64_t* nf, uint32_t* dr,
|
||||
uint32_t* portno, GeneralData* g = 0);
|
||||
uint32_t* portno, GeneralData* g = nullptr);
|
||||
|
||||
/**
|
||||
* Create New File
|
||||
@ -231,7 +231,7 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
|
||||
* Get Type
|
||||
* @return type
|
||||
*/
|
||||
std::string GetType();
|
||||
std::string GetType() override;
|
||||
|
||||
/**
|
||||
* Record First Indices (firstAcquisitionIndex, firstMeasurementIndex)
|
||||
@ -250,7 +250,7 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
|
||||
* Pop bound addresses, process them,
|
||||
* write to file if needed & free the address
|
||||
*/
|
||||
void ThreadExecution();
|
||||
void ThreadExecution() override;
|
||||
|
||||
/**
|
||||
* Frees dummy buffer,
|
||||
|
@ -16,9 +16,9 @@
|
||||
#include "DataStreamer.h"
|
||||
#include "sls_detector_exceptions.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <errno.h>
|
||||
#include <cerrno>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
|
||||
const std::string DataProcessor::TypeName = "DataProcessor";
|
||||
|
||||
@ -31,7 +31,7 @@ DataProcessor::DataProcessor(int ind, detectorType dtype, Fifo* f,
|
||||
std::vector <int> * cdl, int* cdo, int* cad) :
|
||||
|
||||
ThreadObject(ind),
|
||||
runningFlag(0),
|
||||
runningFlag(false),
|
||||
generalData(nullptr),
|
||||
fifo(f),
|
||||
myDetectorType(dtype),
|
||||
@ -281,7 +281,7 @@ void DataProcessor::ThreadExecution() {
|
||||
"pop 0x" << std::hex << (void*)(buffer) << std::dec << ":" << buffer;
|
||||
|
||||
//check dummy
|
||||
uint32_t numBytes = (uint32_t)(*((uint32_t*)buffer));
|
||||
auto numBytes = (uint32_t)(*((uint32_t*)buffer));
|
||||
FILE_LOG(logDEBUG1) << "DataProcessor " << index << ", Numbytes:" << numBytes;
|
||||
if (numBytes == DUMMY_PACKET_VALUE) {
|
||||
StopProcessing(buffer);
|
||||
@ -316,7 +316,7 @@ void DataProcessor::StopProcessing(char* buf) {
|
||||
|
||||
void DataProcessor::ProcessAnImage(char* buf) {
|
||||
|
||||
sls_receiver_header* rheader = (sls_receiver_header*) (buf + FIFO_HEADER_NUMBYTES);
|
||||
auto* rheader = (sls_receiver_header*) (buf + FIFO_HEADER_NUMBYTES);
|
||||
sls_detector_header header = rheader->detHeader;
|
||||
uint64_t fnum = header.frameNumber;
|
||||
currentFrameIndex = fnum;
|
||||
@ -371,7 +371,7 @@ void DataProcessor::ProcessAnImage(char* buf) {
|
||||
|
||||
// call back with modified size
|
||||
else if (rawDataModifyReadyCallBack) {
|
||||
uint32_t revsize = (uint32_t)(*((uint32_t*)buf));
|
||||
auto revsize = (uint32_t)(*((uint32_t*)buf));
|
||||
rawDataModifyReadyCallBack(
|
||||
(char*)rheader,
|
||||
buf + FIFO_HEADER_NUMBYTES + sizeof(sls_receiver_header),
|
||||
@ -456,7 +456,7 @@ void DataProcessor::PadMissingPackets(char* buf) {
|
||||
FILE_LOG(logDEBUG) << index << ": Padding Missing Packets";
|
||||
|
||||
uint32_t pperFrame = generalData->packetsPerFrame;
|
||||
sls_receiver_header* header = (sls_receiver_header*) (buf + FIFO_HEADER_NUMBYTES);
|
||||
auto* header = (sls_receiver_header*) (buf + FIFO_HEADER_NUMBYTES);
|
||||
uint32_t nmissing = pperFrame - header->detHeader.packetNumber;
|
||||
sls_bitset pmask = header->packetsMask;
|
||||
|
||||
@ -521,7 +521,7 @@ void DataProcessor::RearrangeDbitData(char* buf) {
|
||||
memset(result, 0, numResult32Bits * sizeof(uint32_t));
|
||||
|
||||
uint32_t* dest = result;
|
||||
uint64_t* source = (uint64_t*)(buf + digOffset + (*ctbDbitOffset));
|
||||
auto* source = (uint64_t*)(buf + digOffset + (*ctbDbitOffset));
|
||||
|
||||
// loop through digital bit enable vector
|
||||
int bitoffset = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user