RawData.cpp 1006 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
/*
 * RawData.cpp
 *
 *  Created on: Dec 27, 2016
 *      Author: vratik
 */

#include "RawData.h"

RawData::RawData() {
	// TODO Auto-generated constructor stub

	TGraph gr;

}

RawData::~RawData() {
	// TODO Auto-generated destructor stub
}

void RawData::Reset() {

23
	for (Int_t i = 0; i < NCELLS; i++) {
24 25 26 27
		Amp[i] = 0;
		Time[i] = 0;
	}

28
}
29

30 31
void RawData::PrintTime(Int_t i) {
		cout << Time[i] << endl;
32 33
}

34
void RawData::PrintAmp(Int_t i) {
35
		cout << Amp[i] << endl;
36 37 38 39 40 41
}

void RawData::SetAmp(Double_t a, Int_t i) {
	if (i >=NCELLS) {
		cout << "Error: array with raw amplitudes is overloaded!" << endl;
		return;
42
	}
43 44
	Amp[i] = a;
	return;
45
}
46 47 48 49 50 51 52 53 54 55

void RawData::SetTime(Double_t t, Int_t i) {
	if (i >=NCELLS) {
		cout << "Error: array with raw times is overloaded!" << endl;
		return;
	}
	Time[i] = t;
	return;
}

56 57 58 59 60 61 62 63 64
void RawData::InvertAmp(Double_t a,Int_t i) {
	if (i >=NCELLS) {
		cout << "Error: array with raw amplitudes for turn over is overloaded!" << endl;
		return;
	}
	Amplitude[i] = a*(-1.);
	return;
}