Skip to content
Snippets Groups Projects
Commit feb4ad73 authored by Oleg Golosov's avatar Oleg Golosov Committed by Oleg Golosov
Browse files

remove DataTree, DataTreeCbmInterface and DataTreeQA - replaced by AnalysisTree

parent 6516ec1e
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !157. Comments created here will be created in the context of that merge request.
Showing
with 0 additions and 1362 deletions
......@@ -6,7 +6,6 @@ add_subdirectory (PWGDIL/dielectron/lmvm)
add_subdirectory (PWGDIL/dimuon)
add_subdirectory (PWGC2F/femtoscopy/nicafemto)
add_subdirectory (PWGC2F/flow)
add_subdirectory (PWGCHA/jpsi)
......
add_subdirectory (DataTreeCbmInterface)
#set(UNIGENQA_VERSION "1.0")
#set(UNIGENQA_SRC_URL "https://cbmgsi.githost.io/pwg-c2f/UnigenQA.git")
#set(UNIGENQA_DESTDIR "${CMAKE_BINARY_DIR}/analysis/flow/UNIGENQA-prefix")
#set(UNIGENQA_LIBNAME "${CMAKE_SHARED_LIBRARY_PREFIX}UnigenQA${CMAKE_SHARED_LIBRARY_SUFFIX}")
#download_project(PROJ UnigenQA_source
# GIT_REPOSITORY ${UNIGENQA_SRC_URL}
# GIT_TAG ${UNIGENQA_VERSION}
# SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/UnigenQA
#)
#If(ProjectUpdated)
# File(REMOVE_RECURSE ${UNIGENQA_DESTDIR})
# Message("UnigenQA source directory was changed so build directory was deleted")
#EndIf()
#ExternalProject_Add(UNIGENQA
# BUILD_IN_SOURCE 0
# SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/UnigenQA
# BUILD_BYPRODUCTS ${UNIGENQA_LIBRARY}
# LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
# CMAKE_ARGS -G ${CMAKE_GENERATOR}
# -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
# -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
# -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
# -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
# -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
# -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}
# -DFIXTARGET=TRUE
# -DROOTSYS=${SIMPATH}
# -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
# INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install
#)
#add_library(UnigenQA SHARED IMPORTED)
#set_target_properties(UnigenQA PROPERTIES IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/lib)
#add_dependencies(UnigenQA UNIGENQA)
#set(UnigenQA_LIB_DIR ${CMAKE_BINARY_DIR}/lib)
#set(UnigenQA_LIBRARIES UnigenQA)
#set(UnigenQA_INCLUDE_DIR "${CMAKE_BINARY_DIR}/include")
#set(UnigenQA_FOUND TRUE)
#Install(FILES ${CMAKE_BINARY_DIR}/lib/${UNIGENQA_LIBNAME}
# ${CMAKE_BINARY_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}UnigenQA.rootmap
# ${CMAKE_BINARY_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}UnigenQA_rdict.pcm
# DESTINATION lib
# )
Set(INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}
${CBMBASE_DIR}
${CBMDATA_DIR}
${CBMDATA_DIR}/base
${CBMDATA_DIR}/sts
${CBMDATA_DIR}/global
${CBMDATA_DIR}/psd
${CBMDATA_DIR}/tof
${CBMROOT_SOURCE_DIR}/generators
${CBMROOT_SOURCE_DIR}/reco/KF
${CBMROOT_SOURCE_DIR}/reco/KF/Interface
${CBMROOT_SOURCE_DIR}/reco/KF/KFQA
${CBMROOT_SOURCE_DIR}/reco/L1
${CBMROOT_SOURCE_DIR}/reco/L1/L1Algo
${CBMROOT_SOURCE_DIR}/reco/L1/ParticleFinder
)
Include_Directories (${INCLUDE_DIRECTORIES})
Set(SYSTEM_INCLUDE_DIRECTORIES
${VC_INCLUDE_DIRS}
${BASE_INCLUDE_DIRECTORIES}
${Boost_INCLUDE_DIR}
${KFParticle_INCLUDE_DIR}
${DataTree_INCLUDE_DIR}
)
Include_Directories (SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES})
set (LINK_DIRECTORIES
${ROOT_LIBRARY_DIR}
${FAIRROOT_LIBRARY_DIR}
${Boost_LIBRARY_DIRS}
${Vc_LIB_DIR}
${KFParticle_LIB_DIR}
${DataTree_LIB_DIR}
)
link_directories( ${LINK_DIRECTORIES})
set (SRCS
DataTreeCbmInterface.cxx
)
set (HEADERS
DataTreeCbmInterface.h
)
IF (SSE_FOUND)
Message(STATUS "DataTreeCbmInterface will be compiled with SSE support")
ADD_DEFINITIONS(-DHAVE_SSE)
SET_SOURCE_FILES_PROPERTIES(${SRCS} PROPERTIES COMPILE_FLAGS
"-msse -O3")
ELSE (SSE_FOUND)
MESSAGE(STATUS "DataTreeCbmInterface will be compiled without SSE support")
SET_SOURCE_FILES_PROPERTIES(${SRCS} PROPERTIES COMPILE_FLAGS
"-O3")
ENDIF (SSE_FOUND)
Set(LINKDEF DataTreeCbmInterfaceLinkDef.h)
Set(LIBRARY_NAME DataTreeCbmInterface)
Set(_DataTree_LIB DataTree)
Set(DEPENDENCIES
${_DataTree_LIB}
CbmData
CbmBase
CbmSimGenerators
KF
L1
Vc.a)
Set(DEFINITIONS -DDO_TPCCATRACKER_EFF_PERFORMANCE -DNonhomogeneousField -DCBM -DUSE_TIMERS -DDATATREE_CBM)
ADD_DEFINITIONS(${DEFINITIONS})
GENERATE_LIBRARY()
Add_Dependencies(DataTreeCbmInterface DATATREE)
This diff is collapsed.
#ifndef DataTreeCbmInterface_H
#define DataTreeCbmInterface_H 1
#include "CbmKFPartEfficiencies.h"
#include "CbmKFParticleFinder.h"
#include "CbmVertex.h"
#include "FairTask.h"
#include "TLorentzVector.h"
#include <cstring>
#include <map>
#include <vector>
#include "FairMCEventHeader.h"
#include "TCanvas.h"
#include "TClonesArray.h"
#include "TFile.h"
#include "TGraphErrors.h"
#include "TH2F.h"
#include "TProfile.h"
#include <TGeoManager.h>
#include <iostream>
#include "CbmKFVertex.h"
#include "CbmTrackMatch.h"
class DataTreeEvent;
class TClonesArray;
class CbmVertex;
class TDirectory;
class TH1F;
class TProfile;
class TH2F;
class CbmDigiManager;
class DataTreeCbmInterface : public FairTask {
public:
DataTreeCbmInterface();
~DataTreeCbmInterface();
virtual InitStatus Init();
virtual void Exec(Option_t* opt);
virtual void Finish();
void SetOutputFile(const TString filename) { fOutputFileName = filename; }
void LoadGeo(const TString& geoFile);
void SetKFParticleFinderTOF(const CbmKFParticleFinder* finder) {
fFinderTOF = finder;
}
void SetKFParticleFinderMC(const CbmKFParticleFinder* finder) {
fFinderMC = finder;
}
private:
void InitInput();
void InitOutput();
void InitOutputTree();
void InitDataTreeEvent();
void ClearEvent();
void ReadEvent();
void ReadPSD();
void ReadTracks();
void LinkSTS();
void ReadTOF();
void ReadMC();
int GetMCTrackMatch(const int idx);
void ReadV0(const int UseMCpid = 0);
void ReadPsdPrimaryParticles();
TString fOutputFileName {""};
TFile* fTreeFile {nullptr};
TTree* fDataTree {nullptr};
CbmVertex* fPrimVtx {nullptr};
FairMCEventHeader* fHeader {nullptr};
CbmDigiManager* fDigiMan {nullptr};
TClonesArray* flistPSDhit {nullptr};
TClonesArray* flistMCtrack {nullptr};
TClonesArray* flistSTSRECOtrack {nullptr};
TClonesArray* flistSTStrackMATCH {nullptr};
TClonesArray* fGlobalTrackArray {nullptr};
TClonesArray* fTofHitArray {nullptr};
TClonesArray* fTofHitMatchArray {nullptr};
TClonesArray* fPsdPointArray {nullptr};
DataTreeEvent* fDTEvent {nullptr};
int fPsdModules {0};
TVector3 fPsdPosition;
std::map<int, TVector3> fPsdModulePositions;
std::vector<int> fMCTrackIDs;
std::vector<int> fTrackIDs;
const CbmKFParticleFinder* fFinderTOF {nullptr};
const CbmKFParticleFinder* fFinderMC {nullptr};
ClassDef(DataTreeCbmInterface, 1)
};
#endif
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class DataTreeCbmInterface + ;
//#pragma link C++ class DataTreeEvent+;
//#pragma link C++ class DataTreeTrack+;
//#pragma link C++ class DataTreeTrackParams+;
//#pragma link C++ class DataTreePSDSection+;
//#pragma link C++ class DataTreePSDModule+;
//#pragma link C++ class DataTreeTOFHit+;
//#pragma link C++ class DataTreeV0Candidate+;
//#pragma link C++ class DataTreeMCTrack+;
//#pragma link C++ class DataTreeTrigger+;
//#pragma link C++ class DataTreeBPD+;
//#pragma link C++ class DataTreeWFA+;
//#pragma link C++ class DataTreeTrackMatch+;
#endif
const std::vector<float> Psd44PositionX = {
-70, -70, -70, -70, -50, -50, -50, -50, -50, -50, -30, -30, -30, -30, -30,
-30, -10, -10, -10, -10, -10, -10, 10, 10, 10, 10, 10, 10, 30, 30,
30, 30, 30, 30, 50, 50, 50, 50, 50, 50, 70, 70, 70, 70};
const std::vector<float> Psd44PositionY = {
-30, -10, 10, 30, -50, -30, -10, 10, 30, 50, -50, -30, -10, 10, 30,
50, -50, -30, -10, 10, 30, 50, -50, -30, -10, 10, 30, 50, -50, -30,
-10, 10, 30, 50, -50, -30, -10, 10, 30, 50, -30, -10, 10, 30};
const std::array<float, 46> Psd46PositionX = {
.0, 20.0, 20.0, 20.0, .0, -20.0, -20.0, -20.0, .0, 20.0,
40.0, 40.0, 40.0, 40.0, 40.0, 20.0, .0, -20.0, -40.0, -40.0,
-40.0, -40.0, -40.0, -20.0, -60.0, -60.0, -60.0, -60.0, -60.0, 60.0,
60.0, 60.0, 60.0, 60.0, .0, -20.0, 20.0, .0, -20.0, 20.0,
-80.0, -80.0, -80.0, 80.0, 80.0, 80.0};
const std::array<float, 46> Psd46PositionY = {
20.0, 20.0, .0, -20.0, -20.0, -20.0, .0, 20.0, 40.0, 40.0,
40.0, 20.0, .0, -20.0, -40.0, -40.0, -40.0, -40.0, -40.0, -20.0,
.0, 20.0, 40.0, 40.0, -40.0, -20.0, .0, 20.0, 40.0, -40.0,
-20.0, .0, 20.0, 40.0, 60.0, 60.0, 60.0, -60.0, -60.0, -60.0,
.0, -20.0, 20.0, .0, -20.0, 20.0};
const std::vector<float> Psd52PositionX = {
-15, -15, -15, -15, -5, -5, 5, 5, 15, 15, 15, 15, -70,
-70, -70, -70, -50, -50, -50, -50, -50, -50, -30, -30, -30, -30,
-30, -30, -10, -10, -10, -10, 10, 10, 10, 10, 30, 30, 30,
30, 30, 30, 50, 50, 50, 50, 50, 50, 70, 70, 70, 70};
const std::vector<float> Psd52PositionY = {
-15, -5, 5, 15, -15, 15, -15, 15, -15, -5, 5, 15, -30,
-10, 10, 30, -50, -30, -10, 10, 30, 50, -50, -30, -10, 10,
30, 50, -50, -30, 30, 50, -50, -30, 30, 50, -50, -30, -10,
10, 30, 50, -50, -30, -10, 10, 30, 50, -30, -10, 10, 30};
# DataTreeCbmInterface
//#include "variables.h" //patch
void run_treemaker(Int_t nEvents = 2,
TString dataSet = "test",
TString setupName = "sis100_electron") {
// ========================================================================
// Adjust this part according to your requirements
// --- Logger settings ----------------------------------------------------
TString logLevel = "INFO";
TString logVerbosity = "LOW";
// ------------------------------------------------------------------------
// ----- Environment --------------------------------------------------
TString myName = "run_treemaker"; // this macro's name for screen output
TString srcDir = gSystem->Getenv("VMCWORKDIR"); // top source directory
TString paramDir = srcDir + "/parameters";
// ------------------------------------------------------------------------
// ----- In- and output file names ------------------------------------
TString traFile = dataSet + ".tra.root";
TString rawFile = dataSet + ".event.raw.root";
TString recFile = dataSet + ".rec.root";
TString geoFile = dataSet + ".geo.root";
TString parFile = dataSet + ".par.root";
TString outFile = dataSet + ".tree.root";
TString KFeffFile = dataSet + ".KFeff.txt";
TString KFqaFile = dataSet + ".KFQA.root";
// ------------------------------------------------------------------------
// ----- Load the geometry setup -------------------------------------
std::cout << std::endl;
TString setupFile = srcDir + "/geometry/setup/setup_" + setupName + ".C";
TString setupFunct = "setup_";
setupFunct = setupFunct + setupName + "()";
std::cout << "-I- " << myName << ": Loading macro " << setupFile << std::endl;
gROOT->LoadMacro(setupFile);
gROOT->ProcessLine(setupFunct);
CbmSetup* setup = CbmSetup::Instance();
// You can modify the pre-defined setup by using
// CbmSetup::Instance()->RemoveModule(ESystemId) or
// CbmSetup::Instance()->SetModule(ESystemId, const char*, Bool_t) or
// CbmSetup::Instance()->SetActive(ESystemId, Bool_t)
// See the class documentation of CbmSetup.
// ------------------------------------------------------------------------
// ----- Timer --------------------------------------------------------
TStopwatch timer;
timer.Start();
// ------------------------------------------------------------------------
TString geoTag;
TList* parFileList = new TList();
std::cout << "-I- " << myName << ": Using raw file " << rawFile << std::endl;
std::cout << "-I- " << myName << ": Using parameter file " << parFile
<< std::endl;
std::cout << "-I- " << myName << ": Using reco file " << recFile << std::endl;
std::cout << "-I- " << myName << ": Using geo file " << geoFile << std::endl;
// ----- Reconstruction run -------------------------------------------
FairRunAna* run = new FairRunAna();
FairFileSource* inputSource = new FairFileSource(recFile);
inputSource->AddFriend(traFile);
inputSource->AddFriend(rawFile);
run->SetSource(inputSource);
run->SetOutputFile(outFile);
run->SetGenerateRunInfo(kTRUE);
// ------------------------------------------------------------------------
// ----- Mc Data Manager ------------------------------------------------
CbmMCDataManager* mcManager = new CbmMCDataManager("MCManager", 1);
mcManager->AddFile(traFile);
run->AddTask(mcManager);
// ------------------------------------------------------------------------
// --- STS track matching ----------------------------------------------
CbmMatchRecoToMC* matchTask = new CbmMatchRecoToMC();
run->AddTask(matchTask);
// ------------------------------------------------------------------------
CbmKF* KF = new CbmKF();
run->AddTask(KF);
CbmL1* l1 = new CbmL1("CbmL1", 1, 3);
if (setup->IsActive(ECbmModuleId::kMvd)) {
setup->GetGeoTag(ECbmModuleId::kMvd, geoTag);
const TString mvdMatBudgetFileName =
srcDir + "/parameters/mvd/mvd_matbudget_" + geoTag + ".root";
l1->SetMvdMaterialBudgetFileName(mvdMatBudgetFileName.Data());
}
if (setup->IsActive(ECbmModuleId::kSts)) {
setup->GetGeoTag(ECbmModuleId::kSts, geoTag);
const TString stsMatBudgetFileName =
srcDir + "/parameters/sts/sts_matbudget_" + geoTag + ".root";
l1->SetStsMaterialBudgetFileName(stsMatBudgetFileName.Data());
}
run->AddTask(l1);
//BEGIN finder
CbmKFParticleFinderPID* kfParticleFinderPID_TOF =
new CbmKFParticleFinderPID("fkfParticleFinderPID_TOF");
kfParticleFinderPID_TOF->SetSIS100();
kfParticleFinderPID_TOF->SetPIDMode(2); //0 - topology, 1 - mc, 2 - tof
run->AddTask(kfParticleFinderPID_TOF);
CbmKFParticleFinder* kfParticleFinder_TOF =
new CbmKFParticleFinder("fCbmKFParticleFinder_TOF");
kfParticleFinder_TOF->SetPIDInformation(kfParticleFinderPID_TOF);
kfParticleFinder_TOF->AddDecayToReconstructionList(3122);
kfParticleFinder_TOF->AddDecayToReconstructionList(-3122);
kfParticleFinder_TOF->AddDecayToReconstructionList(310);
run->AddTask(kfParticleFinder_TOF);
CbmKFParticleFinderPID* kfParticleFinderPID_MC =
new CbmKFParticleFinderPID("fkfParticleFinderPID_MC");
kfParticleFinderPID_MC->SetSIS100();
kfParticleFinderPID_MC->SetPIDMode(1); //0 - topology, 1 - mc, 2 - tof
run->AddTask(kfParticleFinderPID_MC);
CbmKFParticleFinder* kfParticleFinder_MC =
new CbmKFParticleFinder("fCbmKFParticleFinder_MC");
kfParticleFinder_MC->SetPIDInformation(kfParticleFinderPID_MC);
kfParticleFinder_MC->AddDecayToReconstructionList(3122);
kfParticleFinder_MC->AddDecayToReconstructionList(-3122);
kfParticleFinder_MC->AddDecayToReconstructionList(310);
run->AddTask(kfParticleFinder_MC);
// ----- KF Particle Finder QA --------------------------------------------
CbmKFParticleFinderQA* kfParticleFinderQA =
new CbmKFParticleFinderQA("CbmKFParticleFinderQA",
0,
kfParticleFinder_MC->GetTopoReconstructor(),
KFqaFile.Data());
kfParticleFinderQA->SetPrintEffFrequency(100); //nEvents);
// kfParticleFinderQA->SetSuperEventAnalysis(); // SuperEvent
kfParticleFinderQA->SetEffFileName(KFeffFile.Data());
run->AddTask(kfParticleFinderQA);
//END finder
cout << "KF done" << endl;
// ----- KF Particle Finder QA --------------------------------------------
DataTreeCbmInterface* fInterface = new DataTreeCbmInterface();
fInterface->LoadGeo(geoFile);
fInterface->SetKFParticleFinderTOF(kfParticleFinder_TOF);
fInterface->SetKFParticleFinderMC(kfParticleFinder_MC);
fInterface->SetOutputFile(outFile);
run->AddTask(fInterface);
cout << "DataTreeCbmInterface set" << endl;
// ------------------------------------------------------------------------
// ----- KF Track QA --------------------------------------------
CbmKFTrackQA* kfTrackQA = new CbmKFTrackQA();
run->AddTask(kfTrackQA);
// ------------------------------------------------------------------------
// ----- Parameter database --------------------------------------------
FairRuntimeDb* rtdb = run->GetRuntimeDb();
FairParRootFileIo* parIo1 = new FairParRootFileIo();
FairParAsciiFileIo* parIo2 = new FairParAsciiFileIo();
parIo1->open(parFile.Data());
parIo2->open(parFileList, "in");
rtdb->setFirstInput(parIo1);
rtdb->setSecondInput(parIo2);
rtdb->setOutput(parIo1);
rtdb->saveOutput();
// ------------------------------------------------------------------------
// ----- Intialise and run --------------------------------------------
run->Init();
cout << "Starting run" << endl;
run->Run(0, nEvents);
// ------------------------------------------------------------------------
timer.Stop();
Double_t rtime = timer.RealTime();
Double_t ctime = timer.CpuTime();
cout << "Macro finished succesfully." << endl;
cout << "Output file is " << outFile << endl;
cout << "Parameter file is " << parFile << endl;
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime);
// ----- CTest resource monitoring ------------------------------------
FairSystemInfo sysInfo;
Float_t maxMemory = sysInfo.GetMaxMemory();
std::cout << "<DartMeasurement name=\"MaxMemory\" type=\"numeric/double\">";
std::cout << maxMemory;
std::cout << "</DartMeasurement>" << std::endl;
std::cout << "<DartMeasurement name=\"WallTime\" type=\"numeric/double\">";
std::cout << rtime;
std::cout << "</DartMeasurement>" << std::endl;
Float_t cpuUsage = ctime / rtime;
std::cout << "<DartMeasurement name=\"CpuLoad\" type=\"numeric/double\">";
std::cout << cpuUsage;
std::cout << "</DartMeasurement>" << std::endl;
// ------------------------------------------------------------------------
// ----- Finish -------------------------------------------------------
std::cout << " Test passed" << std::endl;
std::cout << " All ok " << std::endl;
RemoveGeoManager();
// ------------------------------------------------------------------------
}
DataTree
AnalysisTree
AnalysisTreeQA
DataTreeQA
KFParticle
NicaFemto
Vc
......
......@@ -32,8 +32,6 @@ if(DOWNLOAD_EXTERNALS)
Include(InstallVC.cmake)
Include(InstallKFParticle.cmake)
Include(InstallDataTree.cmake)
Include(InstallDataTreeQA.cmake)
Include(InstallNicaFemto.cmake)
Include(InstallAnalysisTree.cmake)
# Include(InstallAnalysisTreeQA.cmake)
......@@ -44,7 +42,6 @@ if(DOWNLOAD_EXTERNALS)
else()
# Define targets which are needed by CbmRoot but are not available
# whithout the external packages
add_library(DATATREE SHARED IMPORTED GLOBAL)
add_library(ANALYSISTREE SHARED IMPORTED GLOBAL)
add_library(NICAFEMTO SHARED IMPORTED GLOBAL)
add_library(KFPARTICLE SHARED IMPORTED GLOBAL)
......
set(DATATREE_VERSION f9b31d3d3362f5a98665d8d192440fba98181f31)
#set(DATATREE_VERSION a99224d7e9fd20b7a7e3b203cfe2778af8632ecb)
set(DATATREE_SRC_URL "https://git.cbm.gsi.de/pwg-c2f/DataTree.git")
set(DATATREE_DESTDIR "${CMAKE_BINARY_DIR}/external/DATATREE-prefix")
set(DATATREE_LIBNAME "${CMAKE_SHARED_LIBRARY_PREFIX}DataTree${CMAKE_SHARED_LIBRARY_SUFFIX}")
download_project_if_needed(PROJECT DataTree_source
GIT_REPOSITORY ${DATATREE_SRC_URL}
GIT_TAG ${DATATREE_VERSION}
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/DataTree
TEST_FILE CMakeLists.txt
)
If(ProjectUpdated)
File(REMOVE_RECURSE ${DATATREE_DESTDIR})
Message("DataTree source directory was changed so build directory was deleted")
EndIf()
ExternalProject_Add(DATATREE
BUILD_IN_SOURCE 0
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/DataTree
BUILD_BYPRODUCTS ${DATATREE_LIBRARY}
LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
CMAKE_ARGS -G ${CMAKE_GENERATOR}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}
-DFIXTARGET=TRUE
-DROOTSYS=${SIMPATH}
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
-DEXPERIMENT=CBM
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install
)
add_library(DataTree SHARED IMPORTED)
set_target_properties(DataTree PROPERTIES IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/lib)
add_dependencies(DataTree DATATREE)
set(DataTree_LIB_DIR ${CMAKE_BINARY_DIR}/lib)
set(DataTree_LIBRARIES DataTree)
set(DataTree_INCLUDE_DIR "${CMAKE_BINARY_DIR}/include")
set(DataTree_FOUND TRUE)
Install(FILES ${CMAKE_BINARY_DIR}/lib/${DATATREE_LIBNAME}
${CMAKE_BINARY_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}DataTree.rootmap
${CMAKE_BINARY_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}DataTree_rdict.pcm
DESTINATION lib
)
set(DATATREEQA_VERSION e549c95c1489012a3fa2c5d0c8908478babd08b7) # hash is tag 1.0. Needed for test
set(DATATREEQA_SRC_URL "https://git.cbm.gsi.de/pwg-c2f/DataTreeQA.git")
set(DATATREEQA_DESTDIR "${CMAKE_BINARY_DIR}/external/DATATREEQA-prefix")
set(DATATREEQA_LIBNAME "${CMAKE_SHARED_LIBRARY_PREFIX}DataTreeQA${CMAKE_SHARED_LIBRARY_SUFFIX}")
download_project_if_needed(PROJECT DataTreeQA_source
GIT_REPOSITORY ${DATATREEQA_SRC_URL}
GIT_TAG ${DATATREEQA_VERSION}
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/DataTreeQA
TEST_FILE CMakeLists.txt
)
If(ProjectUpdated)
File(REMOVE_RECURSE ${DATATREEQA_DESTDIR})
Message("DataTreeQA source directory was changed so build directory was deleted")
EndIf()
ExternalProject_Add(DATATREEQA
DEPENDS DataTree
BUILD_IN_SOURCE 0
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/DataTreeQA
BUILD_BYPRODUCTS ${DATATREEQA_LIBRARY}
LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
CMAKE_ARGS -G ${CMAKE_GENERATOR}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}
-DFIXTARGET=TRUE
-DROOTSYS=${SIMPATH}
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
-DEXPERIMENT=CBM
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install
)
add_library(DataTreeQA SHARED IMPORTED)
set_target_properties(DataTreeQA PROPERTIES IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/lib)
add_dependencies(DataTreeQA DATATREE)
set(DataTreeQA_LIB_DIR ${CMAKE_BINARY_DIR}/lib)
set(DataTreeQA_LIBRARIES DataTreeQA)
set(DataTreeQA_INCLUDE_DIR "${CMAKE_BINARY_DIR}/include")
set(DataTreeQA_FOUND TRUE)
Install(FILES ${CMAKE_BINARY_DIR}/lib/${DATATREEQA_LIBNAME}
${CMAKE_BINARY_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}DataTreeQA.rootmap
${CMAKE_BINARY_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}DataTreeQA_rdict.pcm
DESTINATION lib
)
......@@ -3,11 +3,8 @@ Set(MACRO_DIR ${CBMROOT_BINARY_DIR}/macro/C2F)
GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/C2F/c2f_transport.C)
GENERATE_CBM_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/run/run_digi.C ${MACRO_DIR})
GENERATE_CBM_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/run/run_reco_event.C ${MACRO_DIR})
GENERATE_CBM_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/analysis/PWGC2F/flow/DataTreeCbmInterface/macro/run_treemaker.C ${MACRO_DIR})
GENERATE_CBM_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/analysis/common/analysis_tree_converter/run_analysis_tree_maker.C ${MACRO_DIR})
GENERATE_CBM_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/analysis/common/at_kfpf_interface/run_at_kfpf.C ${MACRO_DIR})
GENERATE_CBM_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/external/DataTreeQA/macro/PopulateQAConfigurations.C ${MACRO_DIR})
GENERATE_CBM_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/external/DataTreeQA/macro/RunDataTreeQA.C ${MACRO_DIR})
# Put the .rootrc file into the directory from which root is executed.
# Otherwise the rootalias file is not loaded
......@@ -55,15 +52,6 @@ If( ($ENV{ctest_model} MATCHES Nightly) OR ($ENV{ctest_model} MATCHES Weekly) )
Set(fixture_c2f_ana fixture_c2f_ana_${testname})
set_tests_properties(${testname} PROPERTIES FIXTURES_SETUP ${fixture_c2f_ana})
# --- DataTree
Set(testname c2f_treemaker_${setup})
Add_Test(${testname} ${MACRO_DIR}/run_treemaker.sh ${NumEvents} \"data/${setup}_test\" \"${setup}\")
Set_Tests_Properties(${testname} PROPERTIES TIMEOUT "300")
Set_Tests_Properties(${testname} PROPERTIES PASS_REGULAR_EXPRESSION "Test Passed;All ok")
set_tests_properties(${testname} PROPERTIES FIXTURES_REQUIRED ${fixture_c2f_ana})
Set(fixture_c2f_datatree fixture_c2f_datatree_${testname})
set_tests_properties(${testname} PROPERTIES FIXTURES_SETUP ${fixture_c2f_datatree})
# --- AnalysisTree
Set(testname analysis_tree_maker_${setup})
Add_Test(${testname} ${MACRO_DIR}/run_analysis_tree_maker.sh ${NumEvents} \"data/${setup}_test\" \"${setup}\")
......@@ -82,20 +70,6 @@ If( ($ENV{ctest_model} MATCHES Nightly) OR ($ENV{ctest_model} MATCHES Weekly) )
Set(fixture_c2f_at_kfpf_interface fixture_c2f_at_kfpf_interface_${testname})
set_tests_properties(${testname} PROPERTIES FIXTURES_SETUP ${fixture_c2f_at_kfpf_interface})
# --- DataTreeQA input
Set(testname c2f_datatreeqa_input_${setup})
Add_Test(${testname} ${MACRO_DIR}/PopulateQAConfigurations.sh)
Set_Tests_Properties(${testname} PROPERTIES TIMEOUT "10")
set_tests_properties(${testname} PROPERTIES FIXTURES_REQUIRED ${fixture_c2f_datatree})
Set(fixture_c2f_datatreeqa_input fixture_c2f_datatreeqa_input_${testname})
set_tests_properties(${testname} PROPERTIES FIXTURES_SETUP ${fixture_c2f_datatreeqa_input})
# --- DataTreeQA
Set(testname c2f_datatreeqa_${setup})
Add_Test(${testname} ${MACRO_DIR}/RunDataTreeQA.sh \"${setup}.tree.list\" \"\" \"data/${setup}_test.qa.root\" \"QAConfigurations.root\" \"cbm_12agev_config\" )
Set_Tests_Properties(${testname} PROPERTIES TIMEOUT "30")
set_tests_properties(${testname} PROPERTIES FIXTURES_REQUIRED ${fixture_c2f_datatreeqa_input})
EndForEach(setup IN LISTS cbm_setup)
# end of test CBM setups from geometry/setup
EndIf()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment