diff --git a/AculData/CMakeLists.txt b/AculData/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..3cf53b2df681770a0fb4e1c53e988b5069b4064b --- /dev/null +++ b/AculData/CMakeLists.txt @@ -0,0 +1,26 @@ +############################################################################ +# 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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 12a3f320af8649b8c59b96b92b82624e92adbb02..2fbc3f1b58f9e7fed23125295f8db92a79399231 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/README b/README index 5cfa9ef73248454cf876f2805defc8f0f0b178ff..9e04925efe4495953f34e0208d6311ac8a4176bb 100755 --- a/README +++ b/README @@ -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 @@ -18,4 +18,12 @@ II. Use with cmake (TELoss.so build only in this commit) 3) cmake .. -4) make \ No newline at end of file +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 diff --git a/TELoss/CMakeLists.txt b/TELoss/CMakeLists.txt index dae8f498a15b200661b1170c12737c45f7404589..c48b777294dbdf6ccc235265aa826e42c79bd730 100644 --- a/TELoss/CMakeLists.txt +++ b/TELoss/CMakeLists.txt @@ -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 diff --git a/macros/parforcal.par b/macros/parforcal.par new file mode 100644 index 0000000000000000000000000000000000000000..34fcb5a2dd603600438a31823c8c70b80e0cba25 --- /dev/null +++ b/macros/parforcal.par @@ -0,0 +1,21 @@ +//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// diff --git a/macros/rootlogon.C b/macros/rootlogon.C index c93c330f425cd04b7e1fb28ba72960c344b264e6..efd6007f3c683e8137000df0b399a282e1a7c4db 100644 --- a/macros/rootlogon.C +++ b/macros/rootlogon.C @@ -1,9 +1,16 @@ { 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 diff --git a/macros/testOfAculData.cxx b/macros/testOfAculData.cxx new file mode 100644 index 0000000000000000000000000000000000000000..3236fd8bf4270037a9c344b1ac2df1078f0d1b25 --- /dev/null +++ b/macros/testOfAculData.cxx @@ -0,0 +1,16 @@ +#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(); + +}