/* * AnalyzeData.cpp * * Created on: Dec 28, 2016 * Author: daria */ #include "AnalyzeData.h" AnalyzeData::AnalyzeData() { // TODO Auto-generated constructor stub TGraph gr; } AnalyzeData::~AnalyzeData() { // TODO Auto-generated destructor stub } Bool_t AnalyzeData::SetRawDataFile(const char* inprawfile, const char* treename) { TString iFileName = inprawfile; TFile *fraw = new TFile(iFileName.Data()); if ( !fraw->IsOpen() ) { Error("SetRawDataFile", "File %s was not opened and won't be processed", iFileName.Data()); return 0; } TTree *traw = (TTree*)fraw->Get(treename); if (!traw) { Error("SetRawDataFile", "Tree %s was not found in file %s", treename, iFileName.Data()); return 0; } //traw->Draw } /* void RawData::Reset() { for (Int_t i = 0; i < NCELLS; i++) { Amp[i] = 0; Time[i] = 0; } } void RawData::PrintTime(Int_t i) { cout << Time[i] << endl; } void RawData::PrintAmp(Int_t i) { cout << Amp[i] << endl; } void RawData::SetAmp(Double_t a, Int_t i) { if (i >=NCELLS) { cout << "Error: array with raw amplitudes is overloaded!" << endl; return; } Amp[i] = a; return; } 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; }*/