Commit bcb132d1 authored by Vratislav Chudoba's avatar Vratislav Chudoba

Compilation of AculData.so by cmake added.

Script to test AculData.so library added.
parent 12754847
############################################################################
# CMakeLists.txt file for building AculData package
############################################################################
ROOT_STANDARD_LIBRARY_PACKAGE(AculData
HEADERS
AculCalibCsI.h
AculCalibration.h
# ConfigDictionary.h
# ReturnCodes.h
# AculDataLinkDef.h
SOURCES
AculCalibCsI.cpp
AculCalibration.cpp
# ConfigDictionary.cpp
# DICTIONARY_OPTIONS
# -writeEmptyRootPCM
# DEPENDENCIES
# MathCore
# Matrix
# RIO
LINKDEF
AculDataLinkDef.h
)
ROOT_ADD_TEST_SUBDIRECTORY(test)
\ No newline at end of file
......@@ -15,6 +15,7 @@ message(STATUS "ROOT include directories: ${ROOT_INCLUDE_DIRS}")
# Add the TELoss directory
add_subdirectory(TELoss)
add_subdirectory(AculData)
# Add the "TELoss" directory to the include path
# include_directories(TELoss)
......
......@@ -10,7 +10,7 @@ I. Use with GNU make
3) add the install folder to LD_LIBRARY_PATH
II. Use with cmake (TELoss.so build only in this commit)
II. Use with cmake
1) mkdir build
......@@ -19,3 +19,11 @@ II. Use with cmake (TELoss.so build only in this commit)
3) cmake ..
4) make
III. Test of compiled libraries
1) cd macros
2) rootlogon.C script will automatically load compiled libraries libTELoss.so and libAculData.so, then
root -l testOfAculData.cxx
root -l testOfTELoss.cxx
\ No newline at end of file
......@@ -23,8 +23,11 @@ set(FORTRAN_SOURCES
)
# Generate dictionary for TELoss class
ROOT_GENERATE_DICTIONARY(G__TELoss ${CMAKE_CURRENT_SOURCE_DIR}/TELoss.h
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/TELossLinkDef.h)
ROOT_GENERATE_DICTIONARY(
G__TELoss
${CMAKE_CURRENT_SOURCE_DIR}/TELoss.h
LINKDEF
${CMAKE_CURRENT_SOURCE_DIR}/TELossLinkDef.h)
#working
# ROOT_GENERATE_DICTIONARY(G__TELoss ${CMAKE_CURRENT_SOURCE_DIR}/TELoss/TELoss.h
......
//226Ra
//relative units are normalized to 1
4 noPeaks //number of peaks// число пиков, по которым происходит калибровка
4.751 E1 //in MeV including dead layer of alpha source//энергии альфа источника
5.459 E2 //in MeV//
5.972 E3 //in MeV//
7.661 E4 //in MeV//
2.3 deadLayer
0 lowersubaddress
15 uppersubaddress
ANS block
AnalysisxTree treename
400 lowerChannel //in channels//каналы,
2000 upperChannel //in channels//каналы
0.5 lowerPeakHight //in relative units; minimal range of the peak//
0.5 upperPeakHight //in relative units; minimal range of the peak//
0.1 peakPositionTolerance //in relative units; for check of the peaks positions in channels//
2 fitFunctionLineWidth //integer 1 - 10; graphics//
20 minFitSigma //minimal sigma of the peaks to be fitted//
0.3 fitHightThreshold //in relative units; the minimal height of the treated peak//
{
TString pathToTELoss = "../build/TELoss/libTELoss.so";
TString pathToAculData = "../build/AculData/libAculData.so";
//libTELoss.so loading
Int_t teloss = gSystem->Load(pathToTELoss);
if (teloss==0) Info("rootlogon.C", "Library %s was successfully loaded.", pathToTELoss.Data());
else Error("rootlogon.C", "Some error with %s loading", pathToTELoss.Data());
//libAculData.so loading
Int_t aculdata = gSystem->Load(pathToAculData);
if (aculdata==0) Info("rootlogon.C", "Library %s was successfully loaded.", pathToAculData.Data());
else Error("rootlogon.C", "Some error with %s loading", pathToAculData.Data());
}
\ No newline at end of file
#include "../AculData/AculCalibration.h"
void testOfAculData()
{
// gSystem->Load("/home/aculina/AculUt/libAculData.so");
// gSystem->Load("/home/aculina/AculUt/libTELoss.so");
AculCalibration cal;
cal.SetParFileName("./parforcal.par");
cal.Init(); //takes parameters from .par
cal.PrintInputParameters();
cal.PrintCalibrationParameters();
}
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