AculCalParsScintFile.h 1.6 KB
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 66 67 68 69 70 71 72 73 74
/*
 * AculCalParsScintFile.h
 *
 *  Created on: Oct 25, 2016
 *      Author: vratik
 */

#ifndef ACULCALIB_ACULCALPARSSCINTFILE_H_
#define ACULCALIB_ACULCALPARSSCINTFILE_H_

#include <vector>
#include <iostream>

#include "TFile.h"
#include "TCutG.h"
#include "TString.h"

using std::vector;
using std::cout;
using std::endl;
using std::cerr;

class AculCalParsScintFile {
private:

//	UInt_t fFileID;
	Int_t fNoCrystals;
	Double_t fE;
//	TCutG fCuts;
	TString fFileName;

	TString fCutsFileName;
	vector<TString> fCutName;
	vector<TCutG> fCut;


	vector<Int_t> fPeakMin;
	vector<Int_t> fPeakMax;

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

	void Init();

	Int_t GetNoCrystals() {return fNoCrystals;}
	const char* GetRawFileName() {return fFileName.Data();}
	const char* GetCutFileName() {return fCutsFileName.Data();}
	Double_t GetEnergy() {return fE;}
	Int_t GetNoCuts() {return (Int_t)fCut.size();}
	const char* GetCutName(Int_t i);
	TCutG* GetCut(Int_t i);
	TCutG* GetCut(const char* cutName);
	Int_t GetPeakMin(Int_t crystalID);
	Int_t GetPeakMax(Int_t crystalID);

	void SetNoCrystals(Int_t nocrystals) {fNoCrystals = nocrystals;};
	void SetEnergy(Double_t energy) {fE = energy;};
	void SetRawFileName(const char* filename);
	void SetCutFileName(const char* filename);
	void SetNoCuts(Int_t noCuts);
	void SetCutName(Int_t i, const char* cutname);
	void SetPeakMin(Int_t crystalID, Double_t limit);
	void SetPeakMax(Int_t crystalID, Double_t limit);

	void LoadCuts();
//	void Reset();

private:
//	void LoadCuts();
};

#endif /* ACULCALIB_ACULCALPARSSCINTFILE_H_ */