Commit 6c480de9 authored by Vratislav Chudoba's avatar Vratislav Chudoba

User interface was optimalized.

parent 6e1dd979
This diff is collapsed.
......@@ -22,6 +22,8 @@
#include <iomanip>
#include <sstream>
#include "../TELoss/TELoss.h"
#define DEFAULTNOPEAKS 20
#define ADDRESSNUMBER 32
......@@ -44,9 +46,9 @@ public:
//???? - pocet nespravne zkalibrovanych spekter
//fEnergy[4] - tabulka s energiemi piku, nacita se zvenci
//private:
private:
//todo: following variables should be deleted
// TObjArray *fHRawList; //list of raw histograms, list is set to owner
TObjArray fHRawList; //list of raw histograms, list is set to owner
TObjArray fHAnalyzedList; //list of fitted and analyzed histograms, list is set to owner
......@@ -74,20 +76,17 @@ public:
Double_t fFitMinSigma; //pouziva se, private
Double_t fFitPeakThreshold; //pouziva se, private, prozkoumat, k cemu vlastne slouzi ve fci ShowPeaks, popremyslet o vhodnem prednastaveni v konstruktoru
//these variables are the main for the class
// Double_t fAOld[BLOCKSNUMBER][ADDRESSNUMBER]; //calibration parameter, f(x) = fAOld*x + fBOld
// Double_t fBOld[BLOCKSNUMBER][ADDRESSNUMBER]; //calibration parameter, f(x) = fAOld*x + fBOld
// Double_t fC[BLOCKSNUMBER][ADDRESSNUMBER]; //treti kalibracni parametr, jine zavislosti nez pol1
// Double_t fD[BLOCKSNUMBER][ADDRESSNUMBER]; //ctvrty kalibracni parametr
private:
TArrayD fA;
TArrayD fB;
//these variables are the main for the class
TArrayD fA; //calibration parameter, f(x) = fA*x + fB
TArrayD fB; //calibration parameter, f(x) = fA*x + fB
// TArrayD fC;
// TArrayD fD;
TELoss fAlphaSi;
public:
//smysl je velmi pochybny
//it is very doubtful that we need this class variable
TFile *fCalInformation;
Double_t GetA(Int_t i); //to obtain calib parameter A
......@@ -99,8 +98,11 @@ private:
public:
AculCalibration();
//default constructor
AculCalibration(const char* parfile); //
AculCalibration(const char* calfile); //
virtual ~AculCalibration();
ClassDef(AculCalibration, 1);
void Init();
Bool_t SetInputParameters(const char* inputparfile = "parforcal.par");
// Function which loads text file containing parameters for calibration
......@@ -226,17 +228,19 @@ public:
//dodelat funkce TTree* Get...(...) pro raw, anal i E spectra
Bool_t AddCalFileToList(const char* calfilelist = "CalFileList.log");
// Bool_t AddCalFileToList(const char* calfilelist = "CalFileList.log");
void ClearHistograms(Option_t* option = "");
void DeleteStacks(Option_t* option = "");
void MakeCalibrationFile(Char_t* calibrationfile, Char_t* calfilelist);
// void MakeCalibrationFile(Char_t* calibrationfile, Char_t* calfilelist);
void Reset();
//reset calibration parameters fA, fB to zero
//private:
private:
void SetELosses();
ClassDef(AculCalibration, 1);
};
......@@ -2,7 +2,7 @@
# AculData input with some variables
################################################################################
ACULDATALIBS := -lCore -lCint -lRIO -lTree -lNet -lThread -lHist -lMatrix -lMathCore -lGpad -lGraf -lSpectrum
ACULDATALIBS := -lCore -lCint -lRIO -lTree -lNet -lThread -lHist -lMatrix -lMathCore -lGpad -lGraf -lSpectrum -lTELoss
# Add inputs and outputs from these tool invocations to the build variables
ACULDATA_HEADERS += \
......
{
gSystem->Load("/home/dariak/AculUtils/libAculData.so");
// gSystem->Load("/home/vratik/workspace/AculUtils/libAculData.so");
// gSystem->Load("/home/dariak/AculUtils/libAculData.so");
gSystem->Load("/home/vratik/workspace/AculUtils/libAculData.so");
AculCalibration cal;
cal.SetInputParameters(); //from .par
cal.SetInputParameters("../../parforcal.par"); //from .par
// cal.CalculateCalibParameters("clb08_0001.root", "SQ22", "AnalysisxTree", 100, 4095);
cal.CalculateCalibParameters("clb08_0001.root", "SQ22", "AnalysisxTree", 100, 4095);
cal.CalculateCalibParameters("../../clb_raw_files/clb08_0001.root", "SQ22", "AnalysisxTree", 100, 4095);
// CalculateCalibParameters(const char* inputfile, const char* block, const Int_t address, const char* treename, Int_t lowerchannel = 0, Int_t upperchannel = 4095, Int_t nEBins = 1000, Int_t lowersubaddress = 0, Int_t uppersubaddress = ADDRESSNUMBER-1);
TFile fr("SQ22[]E.root");
cout << fr.GetListOfKeys()->GetEntries() << " histograms" << endl;
TList *histList = fr.GetListOfKeys();
TH1 *hWork = 0;
for (Int_t i = 0; i < 32; i++)
{
fr.GetObject(histList->At(i)->GetName(), hWork);
cal->PeaksFitting(hWork);
}
// TFile fr("SQ22[]E.root");
// cout << fr.GetListOfKeys()->GetEntries() << " histograms" << endl;
// TList *histList = fr.GetListOfKeys();
// TH1 *hWork = 0;
// for (Int_t i = 0; i < 32; i++)
// {
// fr.GetObject(histList->At(i)->GetName(), hWork);
// cal->PeaksFitting(hWork);
// }
}
......@@ -61,10 +61,10 @@ $(TELOSS)/TELossCint.cpp:
-@echo ' '
#*.so files
libAculData.so: $(ACULDATAOBJS)
libAculData.so: libTELoss.so $(ACULDATAOBJS)
@echo 'Building target: $@'
@echo 'Invoking: GCC C++ Linker'
$(CC) -L $(ROOTLIBS) -shared -o"libAculData.so" $(ACULDATAOBJS) $(ACULDATALIBS)
$(CC) -L . -L $(ROOTLIBS) -shared -o"libAculData.so" $(ACULDATAOBJS) $(ACULDATALIBS)
@echo 'Finished building target: $@'
@echo ' '
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment