AEvent.h 1018 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 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
/*
 * AEvent.h
 *
 *  Created on: Dec 28, 2016
 *      Author: daria
 */

#ifndef DATACLASSES_AEVENT_H_
#define DATACLASSES_AEVENT_H_

#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>

#include "TError.h"
#include "TString.h"
#include "TTree.h"
#include "TFile.h"
//#include "TMath.h"


#include "RawEvent.h"

#define NCELLS 1024

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

class AEvent {

private:

	const Int_t fNPoints;	//!
	Double_t fAmpPos[NCELLS];	//array for raw amplitudes
	Double_t fTime[NCELLS];		//array for raw times
	Double_t fAmpMax;
	Double_t fTimeAmpMax;

	TGraph *gSignal;

	RawEvent *fInputEvent;		//!

public:
	AEvent();
	virtual ~AEvent();ClassDef(AEvent,1)
	;

	void SetRawDataFile(const char* inprawfile, const char* treename);
	void ProcessEvent();
//	void Integral()
	void SetInputEvent(RawEvent** event);
	void Reset();
	 //Resets arrays to zeros

	void SetGraphs();
	TGraph* GetGraph() {
		return gSignal;
	}

private:
	void Init();
};

#endif /* DATACLASSES_AEVENT_H_ */