Commit 553986c9 authored by Stezowski Olivier's avatar Stezowski Olivier
Browse files

modification of LoadWatchers to adapt to Legnaro/GSI

git-svn-id: svn+ssh://anonsvn.in2p3.fr/agata/gammaware/trunk@1751 c3abf467-7ff2-0310-b516-c5fb849bdde0
parent 4a567de4
......@@ -252,7 +252,7 @@ void AgataKeyWatcher::Exec(Option_t */*option*/)
current = buf->Offset();
(*buf) >> length >> message >> eventnumber >> timestamp ;
TString mess_tmp;
mess_tmp = AgataKeyFactory::theFactory()->GetMessage(message);
// cout << "[" << mess_tmp.Data() << "]" << endl;
......
void LoadWatchers_AGATA();
void LoadWatchers_Legnaro();
void LoadWatchers_GSI();
void BeginLoadWatchers();
void EndLoadWatchers();
namespace __LoadWatchers__ {
// to modify to Aclic compilation's options
// .L toto.C+[CompOpt] with CompOpt = "" or "+" or "+g"
const Char_t *CompOpt = "";
TString tmp;
}
using namespace __LoadWatchers__ ;
//!
/*!
This ROOT script configures a ROOT session so that the GammaWare facilities can be used to work with Watchers.
......@@ -6,10 +24,12 @@
Depending on the analysis, ancillaries could be added (see ANCILLARY_PART).
For this the path to includes and the additional libraries should be given.
Prisma is automatically loaded if the library is installed i.e. if PRISMA_PREPROC is defined.
Prisma is automatically loaded if the library is installed i.e. if PRISMA_PREPROC is defined.
Prespec is automatically loaded if the library is installed i.e. if PRESPEC is defined.
personnal watchers could be added in the MyWatchers directory
created by this macro if it does not exist and filled with watcher on prisma and tree watchers.
created by this macro if it does not exist and filled with watcher some default watchers.
Fill free to modify them and if you think it is worth sharing it, it could become the default watcher !
Usage:
root -l LoadWatchers.C
......@@ -18,36 +38,49 @@
*/
void LoadWatchers()
{
// to modify to Aclic compilation's options
// .L toto.C+[CompOpt] with CompOpt = "" or "+" or "+g"
const Char_t *CompOpt = "";
BeginLoadWatchers();
LoadWatchers_AGATA();
LoadWatchers_Legnaro();
LoadWatchers_GSI();
// Special to watchers
tmp = Form(".L MyWatchers/MyTree.C+%s",CompOpt);
gROOT->ProcessLine(tmp.Data());
EndLoadWatchers();
}
#include <fstream>
void BeginLoadWatchers()
{
// ---> GammaWare PART /////////////////////////
printf("******************************************************************** \n") ;
printf(" Messages from LoadWatchers.C \n") ;
printf("******************************************************************** \n") ;
// to add to ROOT the Gw path to look for macros
TString tmp, macroPATH;
macroPATH = gROOT->GetMacroPath(); tmp = Gw::Env::GetPath("MacrosPath");
if ( macroPATH.Contains(tmp.Data()) == false ) {
printf("- Add %s to the macros path \n",tmp.Data());
tmp += ":";
macroPATH.Prepend(tmp.Data()); gROOT->SetMacroPath(macroPATH.Data());
}
// add GammaWare include path to ROOT for compilation
tmp = Gw::Env::GetPath("IncludePath"); printf("- Add %s to the include path \n",tmp.Data());
tmp.Prepend(" .include ");
gROOT->ProcessLine(tmp.Data());
// load the different Gw libraries needed
gSystem->Load("libGWCORE.so");
gSystem->Load("libGWADF.so");
gSystem->Load("libGWADFE.so");
gSystem->Load("libGWTOOLS.so");
// compile and load the different watchers
tmp = "./MyWatchers" ; printf("- Add %s to the include path \n",tmp.Data());
tmp.Prepend(" .include ");
......@@ -55,10 +88,34 @@ void LoadWatchers()
tmp = "./DefaultWatchers" ; printf("- Add %s to the include path \n",tmp.Data());
tmp.Prepend(" .include ");
gROOT->ProcessLine(tmp.Data());
// basic setup not defined, take the default
if ( gSystem->AccessPathName("./SetupWatchers.C") ) { // does not exist
cout << "- Standard configuration (Default setup, SetupWatchers.C) installed " << endl;
//
// depending on ancillary it set WatchersConfig.h
TString isprisma = gSystem->Getenv("PRISMA_PREPROC"), isprespec = gSystem->Getenv("PRESPEC"), isgo4 = gSystem->Getenv("GOSYS");
std::ofstream fdefs("WatchersConfig.h",ios::out | ios::trunc);
if ( fdefs.is_open() ) {
fdefs << "// enable / disable prisma " << std::endl;
if ( isprisma == "" ) { // no prisma
fdefs << "//" ;
}
fdefs << "#define HAS_PRISMA " << std::endl;
fdefs << "// enable / disable prespec " << std::endl;
if ( isprespec == "" ) {
fdefs << "//" ;
}
fdefs << "#define HAS_PRESPEC " << std::endl;
fdefs << "// enable / disable go4 " << std::endl;
if ( isgo4 == "" ) {
fdefs << "//" ;
}
fdefs << "#define HAS_GO4 " << std::endl;
}
//
gSystem->CopyFile("Macros/SetupWatchers.C","./SetupWatchers.C");
}
// basic setup not defined, take the default
......@@ -83,8 +140,50 @@ void LoadWatchers()
gSystem->mkdir("./MyWatchers");
gSystem->CopyFile("Macros/MyTree.h","MyWatchers/MyTree.h");
gSystem->CopyFile("Macros/MyTree.C","MyWatchers/MyTree.C");
}
}
void EndLoadWatchers()
{
// Gives some command that can be run
cout << endl;
cout << " To start online (Local Level) Watchers : " << endl;
cout << " - to watch one selected actor " << endl;
cout << " .x OnlineWatchersLLP.C+ or .x OnlineWatchersLLP.C+(new TFile(\"MySpectra.root\",\"UPDATE\"),new TFile(\"MyTagSpectra.root\",\"UPDATE\"))" << endl;
cout << " - to watch simultaneously all the actors " << endl;
cout << " .x OnlineWatchersLLP.C+(0x0,0x0,true) or .x OnlineWatchersLLP.C+(new TFile(\"MySpectra.root\",\"UPDATE\"),new TFile(\"MyTagSpectra.root\",\"UPDATE\"),true)" << endl;
cout << " To start online (Global Level) Watchers : " << endl;
cout << " .x OnlineWatchersGLP.C+ or .x OnlineWatchersGLP.C+(new TFile(\"MySpectra.root\",\"UPDATE\"),new TFile(\"MyTagSpectra.root\",\"UPDATE\"))" << endl;
cout << " Then start the watching from the ROOT Browser " << endl << endl;
cout << " To start offline Watchers : " << endl;
cout << " 1 - Configure OfflineWatcher.C (it could be a copy of of the one in DefaultWatchers)" << endl;
cout << " 2 - Run the Watchers with : " << endl;
cout << " .x OfflineWatchers.C+ or .x OfflineWatchers.C+(new TFile(\"MySpectra.root\",\"UPDATE\"))" << endl;
cout << endl;
// check whether or not ADF_CONF_PATH has been set !
TString adf_path = gSystem->Getenv("ADF_CONF_PATH");
if ( adf_path == "" ) {
if ( ! gSystem->AccessPathName("./ADF.conf") ) { // does exist
// get the current directory
TString pwd_path = gSystem->Getenv("PWD");
// set ADF_CONF_PATH to the current directory
gSystem->Setenv("ADF_CONF_PATH",pwd_path.Data());
printf("\n [Info] ADF_CONF_PATH has been set to %s \n\n ",pwd_path.Data());
}
else
cout << "\n ** [WARNING] ** , ADF_CONF_PATH not set ! " << endl << endl;
}
else printf("\n [Info] ADF_CONF_PATH is %s \n\n ",adf_path.Data());
// start a ROOT TBrowser
TBrowser *b = new TBrowser();
}
void LoadWatchers_AGATA()
{
// Load the watchers
tmp = Form(".L DefaultWatchers/ADFWatchers.C+%s",CompOpt);
gROOT->ProcessLine(tmp.Data());
tmp = Form(".L DefaultWatchers/WatcherClient.C+%s",CompOpt);
......@@ -107,69 +206,82 @@ void LoadWatchers()
gROOT->ProcessLine(tmp.Data());
tmp = Form(".L DefaultWatchers/LLaBr3Watchers.C+%s",CompOpt);
gROOT->ProcessLine(tmp.Data());
// ---> ANCILLARY_PART /////////////////////////
// ---> Additional libraries if required
// PRISMA lib ... setup properly if PRISMA_PREPROC is set
TString isprisma = gSystem->Getenv("PRISMA_PREPROC");
if ( isprisma != "" ) {
// Directory where are the includes of the ancillary part for compilation
tmp = "$PRISMA_PREPROC/src/lib_prisma/include/"; printf("- Add %s to the include path \n",tmp.Data());
tmp.Prepend(" .include ");
gROOT->ProcessLine(tmp.Data());
// ---> the prisma library
gSystem->Load("$PRISMA_PREPROC/lib/libPRISMA.so");
// ---> Compile and load the watchers for PRISMA
if ( gSystem->AccessPathName("MyWatchers/PrismaWatchers.h") )
gSystem->CopyFile("Macros/PrismaWatchers.h","MyWatchers/PrismaWatchers.h");
if ( gSystem->AccessPathName("MyWatchers/PrismaWatchers.C") )
gSystem->CopyFile("Macros/PrismaWatchers.C","MyWatchers/PrismaWatchers.C");
tmp = Form(".L MyWatchers/PrismaWatchers.C+%s",CompOpt);
gROOT->ProcessLine(tmp.Data());
}
//! Load watchers for ancillaries @ Legnaro i.e. Prisma LIB
void LoadWatchers_Legnaro()
{
// check if PRISMA_PREPROC is defined
TString prisma = gSystem->Getenv("PRISMA_PREPROC");
if ( prisma == "" ) {
return;
}
// ---> END ANCILLARY_PART /////////////////////////
// do it after in case an ancillary part is added in the tree
tmp = Form(".L MyWatchers/MyTree.C+%s",CompOpt);
// tmp = Form(".L Macros/MyTree.C+%s",CompOpt);
// Directory where are the includes of the ancillary part for compilation
tmp = "$PRISMA_PREPROC/src/lib_prisma/include/"; printf("- Add %s to the include path \n",tmp.Data());
tmp.Prepend(" .include ");
gROOT->ProcessLine(tmp.Data());
// ---> the prisma library
gSystem->Load("$PRISMA_PREPROC/lib/libPRISMA.so");
// ---> Compile and load the watchers for PRISMA
if ( gSystem->AccessPathName("MyWatchers/PrismaWatchers.h") )
gSystem->CopyFile("Macros/PrismaWatchers.h","MyWatchers/PrismaWatchers.h");
if ( gSystem->AccessPathName("MyWatchers/PrismaWatchers.C") )
gSystem->CopyFile("Macros/PrismaWatchers.C","MyWatchers/PrismaWatchers.C");
tmp = Form(".L MyWatchers/PrismaWatchers.C+%s",CompOpt);
gROOT->ProcessLine(tmp.Data());
}
// Gives some command that can be run
cout << endl;
cout << " To start online (Local Level) Watchers : " << endl;
cout << " - to watch one selected actor " << endl;
cout << " .x OnlineWatchersLLP.C+ or .x OnlineWatchersLLP.C+(new TFile(\"MySpectra.root\",\"UPDATE\"),new TFile(\"MyTagSpectra.root\",\"UPDATE\"))" << endl;
cout << " - to watch simultaneously all the actors " << endl;
cout << " .x OnlineWatchersLLP.C+(0x0,0x0,true) or .x OnlineWatchersLLP.C+(new TFile(\"MySpectra.root\",\"UPDATE\"),new TFile(\"MyTagSpectra.root\",\"UPDATE\"),true)" << endl;
cout << " To start online (Global Level) Watchers : " << endl;
cout << " .x OnlineWatchersGLP.C+ or .x OnlineWatchersGLP.C+(new TFile(\"MySpectra.root\",\"UPDATE\"),new TFile(\"MyTagSpectra.root\",\"UPDATE\"))" << endl;
cout << " Then start the watching from the ROOT Browser " << endl << endl;
cout << " To start offline Watchers : " << endl;
cout << " 1 - Configure OfflineWatcher.C (it could be a copy of of the one in DefaultWatchers)" << endl;
cout << " 2 - Run the Watchers with : " << endl;
cout << " .x OfflineWatchers.C+ or .x OfflineWatchers.C+(new TFile(\"MySpectra.root\",\"UPDATE\"))" << endl;
cout << endl;
//! Load watchers for ancillaries @ GSI
void LoadWatchers_GSI()
{
// check prespec is defined
TString prespec = gSystem->Getenv("PRESPEC"), go4 = gSystem->Getenv("GOSYS");
if ( prespec == "" ) {
return;
}
// make sure some GSI Watchers are in MyWatchers
if ( gSystem->AccessPathName("MyWatchers/GSIWatchers.h") )
gSystem->CopyFile("Macros/GSIWatchers.h","MyWatchers/GSIWatchers.h");
if ( gSystem->AccessPathName("MyWatchers/GSIWatchers.C") )
gSystem->CopyFile("Macros/GSIWatchers.C","MyWatchers/GSIWatchers.C");
// check whether or not ADF_CONF_PATH has been set !
TString adf_path = gSystem->Getenv("ADF_CONF_PATH");
if ( adf_path == "" ) {
if ( ! gSystem->AccessPathName("./ADF.conf") ) { // does exist
// get the current directory
TString pwd_path = gSystem->Getenv("PWD");
// set ADF_CONF_PATH to the current directory
gSystem->Setenv("ADF_CONF_PATH",pwd_path.Data());
if ( gSystem->AccessPathName("MyWatchers/GSIPrespecWatchers.h") )
gSystem->CopyFile("Macros/GSIPrespecWatchers.h","MyWatchers/GSIPrespecWatchers.h");
if ( gSystem->AccessPathName("MyWatchers/GSIPrespecWatchers.C") )
gSystem->CopyFile("Macros/GSIPrespecWatchers.C","MyWatchers/GSIPrespecWatchers.C");
if ( gSystem->AccessPathName("MyWatchers/GSIGO4Watchers.h") )
gSystem->CopyFile("Macros/GSIGO4Watchers.h","MyWatchers/GSIGO4Watchers.h");
if ( gSystem->AccessPathName("MyWatchers/GSIGO4Watchers.C") )
gSystem->CopyFile("Macros/GSIGO4Watchers.C","MyWatchers/GSIGO4Watchers.C");
printf("\n [Info] ADF_CONF_PATH has been set to %s \n\n ",pwd_path.Data());
}
else
cout << "\n ** [WARNING] ** , ADF_CONF_PATH not set ! " << endl << endl;
}
else printf("\n [Info] ADF_CONF_PATH is %s \n\n ",adf_path.Data());
// external includes / define / libraries
tmp = Form("-I%s",prespec.Data());
gSystem->AddIncludePath(tmp.Data()); //To include Prespec path
tmp = Form("-I%s/eventapiV50",prespec.Data());
gSystem->AddIncludePath(tmp.Data()); //To include Go4 path
tmp = Form("%s/release/lib/libgsievt.so",prespec.Data());
gSystem->Load(tmp.Data()) ;
tmp = Form("%s/release/lib/libPRESPEC.so",prespec.Data());
gSystem->Load(tmp.Data()) ;
// start a ROOT TBrowser
TBrowser *b = new TBrowser();
// ---> Compile and load the watchers for GSI
tmp = Form(".L MyWatchers/GSIWatchers.C+%s",CompOpt);
gROOT->ProcessLine(tmp.Data());
//
if ( go4 == "" ) {
tmp = Form(".L MyWatchers/GSIPrespecWatchers.C+%s",CompOpt);
gROOT->ProcessLine(tmp.Data());
}
else {
std::cout << "GO4 Watchers not yet defined ! " << std::endl;
}
}
#if !defined(__CINT__)
#include "WatchersConfig.h"
// GW
#include "FrameDispatcher.h"
// Watchers
......@@ -54,7 +57,7 @@ void DoTSRateCollector(TTask *top_task, TSRateCollector *collector)
*/
Bool_t SetupWatchers(const char *df_type, FrameDispatcher *fd, const char *ext = "")
{
Bool_t ok = false; TString DFtype = df_type; TString isprisma = gSystem->Getenv("PRISMA_PREPROC");
Bool_t ok = false; TString DFtype = df_type;
// ANY KIND OF DATA FLOW
// ADF ----------------------------------------------------------------
......@@ -232,17 +235,17 @@ Bool_t SetupWatchers(const char *df_type, FrameDispatcher *fd, const char *ext =
// set the main trigger to coincidences between ancillary et gammas
fd->SetTrigger(trig);
#ifdef HAS_PRISMA
// apply doppler correction from PRISMA if configuand check it
if ( isprsma != "" ) {
DoPrismaDoppler *prisma_dop = fd->Add<DoPrismaDoppler>("DoDoppler","Set Doppler event by event");
prisma_dop->Configure("Conf/PRISMA/manager.conf","Conf/PRISMA/lutPRISMA_WEEK49.txt");
DoPrismaDoppler *prisma_dop = fd->Add<DoPrismaDoppler>("DoDoppler","Set Doppler event by event");
prisma_dop->Configure("Conf/PRISMA/manager.conf","Conf/PRISMA/lutPRISMA_WEEK49.txt");
fd->Add<GlobalDC>(GetWN("CheckDoppler",ext),"Doppler as delivered by Prisma");
fd->Add<GlobalDC>(GetWN("CheckDoppler",ext),"Doppler as delivered by Prisma");
// add a wacther on raw data
DisplayPrisma *prisma_2 = fd->Add<DisplayPrisma>("DisplayPrima","Some usefull calibrated spectra for PRISMA ");
prisma_2->Configure("Conf/PRISMA/manager.conf","Conf/PRISMA/lutPRISMA_WEEK49.txt");
}
// add a wacther on raw data
DisplayPrisma *prisma_2 = fd->Add<DisplayPrisma>("DisplayPrima","Some usefull calibrated spectra for PRISMA ");
prisma_2->Configure("Conf/PRISMA/manager.conf","Conf/PRISMA/lutPRISMA_WEEK49.txt");
#endif
// specific to tracked frame
// gamma-gamma matrix
......@@ -264,10 +267,10 @@ Bool_t SetupWatchers(const char *df_type, FrameDispatcher *fd, const char *ext =
// rootmaster->Add<DoMyRawAncillaryTree>("RawAncTree","Branch on ancillary");
// rootmaster->Add<DoMyHitTree>("HitTree","Branch on hits");
// rootmaster->Add<DoMyTrackTree>("TrackTree","Branch on track");
if ( isprsma != "" ) {
#ifdef HAS_PRISMA
MyPrismaTree *prisma_tree = rootmaster->Add<MyPrismaTree>("Prisma","Branch on track");
prisma_tree->Configure("Conf/PRISMA/manager.conf","Conf/PRISMA/lutPRISMA_WEEK49.txt");
}
#endif
ok = true;
}
......
# CMake for module of GW
# CMake for module of ADF/Standalone
# O. Stezowski
cmake_minimum_required (VERSION 2.6)
#
project (adf)
#
set(adf_VERSION "0.9.0")
#
MESSAGE("[ADF] ${PROJECT_NAME}")
#
if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) # standalone
#
include(config/standalone.cmake)
#
set(LIB_NAME ADF)
#
# define format for libraries (force .so for macos)
if(WIN32)
set(_libprefix lib)
set(_libsuffix .dll)
elseif(APPLE)
set(_libprefix lib)
set(_libsuffix .so)
else()
#
set(_LIB_NAME GWADF)
# add to includes
#
set(_libprefix lib)
set(_libsuffix .so)
endif()
set(ADF_LIBRARY_PROPERTIES
SUFFIX ${_libsuffix}
PREFIX ${_libprefix} )
#
# internal and external dependencies
#
#set( EXTRA_INTERNAL_LIBRARIES AgataDPPCommon)
#set( EXTRA_EXTERNAL_LIBRARIES ${ADF_LIBRARY})
set( EXTRA_INTERNAL_LIBRARIES )
set( EXTRA_EXTERNAL_LIBRARIES )
#
# CMake directories
#
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
#
# headers / sources
#
if ( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/ADFConfig.h ) # in case build with configure has been called previously
file(REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/ADFConfig.h)
endif()
file(GLOB headers ${CMAKE_CURRENT_SOURCE_DIR}/*.h standalone/*.h)
file(GLOB sources ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp standalone/*.cpp)
# Remove if any
if ( DO_NARVAL_INTERFACE )
list(ADD_ITEMS sources ${PROJECT_SOURCE_DIR}/libPreprocessingFilter.cpp)
file(GLOB sources ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp standalone/*.cpp)
#
include_directories(${CMAKE_BINARY_DIR}/include)
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR})
#
# configure file
#
set ( IS_STANDALONE 1 )
set ( IS_NARVAL 0 )
if ( EXISTS /agata/narval/narval_install )
set( HAS_NARVAL 1 )
endif()
option(DO_OFT "Built internal OFT" ON)
#
configure_file (
"${CMAKE_CURRENT_SOURCE_DIR}/ADFConfig.h.cmake"
"${CMAKE_BINARY_DIR}/include/ADFConfig.h"
)
#
#----------------------------------------------------------------------------
#
add_library(${_LIB_NAME} SHARED ${sources})
add_library(${LIB_NAME} SHARED ${sources})
#
target_link_libraries(${_LIB_NAME} ${EXTRA_EXTERNAL_LIBRARIES} ${EXTRA_INTERNAL_LIBRARIES})
target_link_libraries(${LIB_NAME} ${EXTRA_EXTERNAL_LIBRARIES} ${EXTRA_INTERNAL_LIBRARIES})
#
set_target_properties(${_LIB_NAME} PROPERTIES ${GW_LIBRARY_PROPERTIES})
set_target_properties(${LIB_NAME} PROPERTIES ${ADF_LIBRARY_PROPERTIES})
#
install(TARGETS ${_LIB_NAME} RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
COMPONENT libraries)
# copy headers file in a single directory
# because cmake2.6 does not provide COPY in file, do it another way
if( ${CMAKE_VERSION} VERSION_GREATER "2.8.0" )
......@@ -56,5 +80,12 @@ else()
foreach ( f ${headers} )
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${f} ${CMAKE_BINARY_DIR}/include/ )
endforeach()
endif()
endif()
#
install(TARGETS ${LIB_NAME} RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
COMPONENT libraries)
#
install(FILES ${headers} DESTINATION include COMPONENT headers )
install(FILES ADF.conf DESTINATION lib COMPONENT libraries )
......@@ -7,6 +7,7 @@ MESSAGE("[GW] + ${PROJECT_NAME}")
#
#
set(GWLIBNAME GWADF)
set(adf_VERSION ${GammaWare_VERSION}) # to snchronize adf version and gw version
#
# internal and external dependencies
#
......@@ -18,6 +19,10 @@ set( EXTRA_EXTERNAL_LIBRARIES )
# so far no automatic methods for computing which class has a dictionnary or not
# manual method : base file name separated in two lists with different treatment.
#
if ( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/ADFConfig.h ) # in case build with configure has been called previously
file(REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/ADFConfig.h)
endif()
#
set( with_dictionnaries
)
set( without_dictionnaries
......@@ -81,6 +86,12 @@ link_directories(${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
#
# configure file
#
set ( IS_STANDALONE 0 )
set ( IS_NARVAL 0 )
if ( EXISTS /agata/narval/narval_install )
set( IS_NARVAL 1 )
endif()
#
configure_file (
"${CMAKE_CURRENT_SOURCE_DIR}/ADFConfig.h.cmake"
"${CMAKE_BINARY_DIR}/include/ADFConfig.h"
......@@ -110,7 +121,9 @@ endforeach()
#
foreach( f ${without_dictionnaries} )
set(sources ${sources} ${CMAKE_CURRENT_SOURCE_DIR}/${f}.cpp)
set(headers ${headers} ${CMAKE_CURRENT_SOURCE_DIR}/${f}.h)
if ( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${f}.h )
set(headers ${headers} ${CMAKE_CURRENT_SOURCE_DIR}/${f}.h)
endif()
endforeach()
#
......@@ -131,6 +144,7 @@ ROOT_GENERATE_ROOTMAP(${GWLIBNAME} LINKDEF ${linkdefs} DEPENDENCIES ${EXTRA_INTE
# because cmake2.6 does not provide COPY in file, do it another way
if( ${CMAKE_VERSION} VERSION_GREATER "2.8.0" )
file(COPY ${headers} DESTINATION ${CMAKE_BINARY_DIR}/include)
file(COPY ADF.conf DESTINATION ${CMAKE_BINARY_DIR}/lib)
else()
if ( EXISTS ${CMAKE_BINARY_DIR}/include )
else()
......@@ -139,6 +153,7 @@ else()
foreach ( f ${headers} )
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${f} ${CMAKE_BINARY_DIR}/include/ )
endforeach()
file(COPY ADF.conf DESTINATION ${CMAKE_BINARY_DIR}/lib)
endif()
#
......@@ -150,6 +165,7 @@ install(TARGETS ${GWLIBNAME} RUNTIME DESTINATION bin
COMPONENT libraries)
#
install(FILES ${headers} DESTINATION include COMPONENT headers )
install(FILES ADF.conf DESTINATION lib COMPONENT libraries )
......
......@@ -74,6 +74,10 @@ namespace ADF
virtual void SetTrapSGh(Double_t v)
{fTrapSGh = v;}
virtual void SetHit(const Hit &ahit) {
FullHit::SetHit(ahit);
}
virtual void SetHit(const PSAHit &ahit) {
SetXYZ(ahit.GetX(),ahit.GetY(),ahit.GetZ());
SetDXYZ(ahit.GetDX(),ahit.GetDY(),ahit.GetDZ());
......
......@@ -18,6 +18,10 @@ set( EXTRA_EXTERNAL_LIBRARIES Core Cint Graf MathCore XMLParser Hist)
# so far no automatic methods for computing which class has a dictionnary or not
# manual method : base file name separated in two lists with different treatment.
#
if ( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/GwConfig.h ) # in case build with configure has been called previously
file(REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/GwConfig.h)
endif()
#
set( with_dictionnaries
BaseNucleus
Data
......
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