SiPM_root/src/DetectorData.cpp

68 lines
868 B
C++

//
// DetectorData.cpp
// sipm_root
//
// Created by Baranyai David on 2018. 09. 10..
//
#include "DetectorData.hpp"
DetectorData::DetectorData()
{
}
DetectorData::DetectorData(std::string name1)
{
name = name1;
dSize = 0;
}
DetectorData::~DetectorData()
{
}
void DetectorData::AddData(const Data& d)
{
data.push_back(d);
dSize++;
}
void DetectorData::SetName(std::string name1)
{
name = name1;
}
Data DetectorData::GetHit(unsigned int n) const
{
return data[n];
}
std::string DetectorData::GetName()
{
return name;
}
unsigned int DetectorData::Size()
{
return dSize;
}
void DetectorData::Clear()
{
dSize = 0;
name.clear();
data.clear();
}
int DetectorData::GetSipm(unsigned int num)
{
return data[num].sipm;
}
const std::vector<Data>* DetectorData::GetDataPointer() const
{
return &data;
}