Q3D-Calibration/include/FileHandler.h

37 lines
663 B
C
Raw Normal View History

#pragma once
#ifndef file_handler_h
#define file_handler_h
#include "utils.h"
using std::string;
using std::to_string;
class FileHandler {
public:
FileHandler() {};
FileHandler(string, int n_ = 6, int thMin_ = 800, int thMax_ = 4000);
~FileHandler() {};
public:
int n = 6, m = 8;
int thMin, thMax, pX;
string file;
2022-07-06 23:42:52 +08:00
std::vector<int> adcValue[6][8][2];
public:
2022-07-06 23:42:52 +08:00
void readData();
};
FileHandler::FileHandler(string file_, int n_, int thMin_, int thMax_) {
file = file_;
n = n_;
thMin = thMin_;
thMax = thMax_;
}
2022-07-06 23:42:52 +08:00
void FileHandler::readData() { readROOTData(file.c_str(), adcValue, n, m, thMin, thMax); }
#endif