66 lines
1.0 KiB
C++
66 lines
1.0 KiB
C++
//
|
|
// DetectorData.hpp
|
|
// sipm_root
|
|
//
|
|
// Created by Baranyai David on 2018. 09. 10..
|
|
//
|
|
|
|
#ifndef DetectorData_hpp
|
|
#define DetectorData_hpp
|
|
|
|
#include <stdio.h>
|
|
#include <iostream>
|
|
#include <vector>
|
|
|
|
struct position
|
|
{
|
|
unsigned int x;
|
|
unsigned int y;
|
|
};
|
|
|
|
struct Data
|
|
{
|
|
double x;
|
|
double y;
|
|
double e;
|
|
int sipm;
|
|
double time;
|
|
|
|
std::istream& operator >> (std::istream& is)
|
|
{
|
|
is >> x >> y >> e >> sipm >> time;
|
|
return is;
|
|
}
|
|
};
|
|
|
|
std::istream& operator >> (std::istream& is, Data &d);
|
|
|
|
class DetectorData
|
|
{
|
|
private:
|
|
std::string name;
|
|
std::vector<Data> data;
|
|
|
|
unsigned int dSize;
|
|
|
|
public:
|
|
DetectorData();
|
|
DetectorData(std::string name1);
|
|
~DetectorData();
|
|
|
|
void AddData(const Data&);
|
|
void SetName(std::string);
|
|
|
|
int GetSipm(unsigned int);
|
|
|
|
Data GetHit(unsigned int) const;
|
|
std::string GetName();
|
|
unsigned int Size();
|
|
|
|
const std::vector<Data>* GetDataPointer() const;
|
|
|
|
void Clear();
|
|
};
|
|
|
|
#endif /* DetectorData_hpp */
|