RawData.h 1.15 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
/*
 * RawData.h
 *
 *  Created on: Dec 27, 2016
 *      Author: vratik
 */

#ifndef DATACLASSES_RAWDATA_H_
#define DATACLASSES_RAWDATA_H_
#include <iostream>
#include "TGraph.h"
12
#define NCELLS 1024
13 14 15 16 17 18 19

using std::cout;
using std::endl;

class RawData {

private:
20 21
	Double_t Amp[NCELLS]; //array for raw amplitudes
	Double_t Time[NCELLS]; //array for raw times
22
	Double_t Amplitude[NCELLS]; //array for inverted amplitudes
23 24 25 26 27 28
public:
	RawData();
	virtual ~RawData();
	ClassDef(RawData,1);

	void Reset();
29
	//Resets arrays to zeros
30 31 32 33

	const Double_t* GetAmp() const {
		return Amp;
	}
34
	
35 36 37 38
	const Double_t* GetTime() const {
		return Time;
	}

39 40 41 42 43 44 45
	void SetAmp(Double_t a, Int_t i);
	//Takes amplitude (raw data, voltage from binary file) 
	//and places it in the array Amp[NCELLS]

	void SetTime(Double_t t, Int_t i);
	//Takes time (raw data, times from binary file) 
	//and places it in the array Time[NCELLS]
46

47
	void PrintAmp(Int_t i);
48 49
	//Prints i amplitudes (to make sense i shold be NCELLS)

50
	void PrintTime(Int_t i);
51 52 53 54 55

	void InvertAmp(Double_t a, Int_t i);
	//Inverts the amplitudes i.e. makes from negative singals 
	//posititve signals and vise versa.

56 57 58
};

#endif /* DATACLASSES_RAWDATA_H_ */