Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions roottest/root/meta/ROOT-7181/.rootrc

This file was deleted.

51 changes: 43 additions & 8 deletions roottest/root/meta/ROOT-7181/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,43 @@
#-------------------------------------------------------------------------------
#
# Placeholder file to translate the tests to the new CTest system. Meanwhile we
# define a CTest test that calls 'make' in ${CMAKE_CURRENT_SOURCE_DIR}
#
#-------------------------------------------------------------------------------

ROOTTEST_ADD_OLDTEST()
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/inc)

ROOTTEST_GENERATE_REFLEX_DICTIONARY(btag
inc/BTagVertex_v1.h
SELECTION inc/btag_selection.xml
FIXTURES_SETUP root-meta-7181-btag-fixture)

ROOTTEST_GENERATE_REFLEX_DICTIONARY(jet
inc/Jet_v1.h
SELECTION inc/jet_selection.xml
FIXTURES_SETUP root-meta-7181-jet-fixture)

ROOTTEST_GENERATE_REFLEX_DICTIONARY(sjet
inc/SJet_v1.h
SELECTION inc/sjet_selection.xml
FIXTURES_SETUP root-meta-7181-sjet-fixture)

macro(ROOT_7181_TEST name use_rmap)
if(${use_rmap} STREQUAL "true")
set(testname rmap-${name})
else()
set(testname ${name})
endif()

ROOTTEST_ADD_TEST(${testname}
MACRO runscript.C
MACROARG "\"${CMAKE_CURRENT_SOURCE_DIR}/scripts/${name}.script\",${use_rmap}"
ROOTEXE_OPTS -e "gInterpreter->AddIncludePath(\"-I${CMAKE_CURRENT_SOURCE_DIR}/inc\")"
OUTREF ${testname}.ref
FIXTURES_REQUIRED root-meta-7181-btag-fixture
root-meta-7181-jet-fixture
root-meta-7181-sjet-fixture)
endmacro(ROOT_7181_TEST)

ROOT_7181_TEST(case1 false)
ROOT_7181_TEST(case2 false)
ROOT_7181_TEST(case3 false)
ROOT_7181_TEST(case4 false)

ROOT_7181_TEST(case1 true)
ROOT_7181_TEST(case2 true)
ROOT_7181_TEST(case3 true)
ROOT_7181_TEST(case4 true)
57 changes: 0 additions & 57 deletions roottest/root/meta/ROOT-7181/Makefile

This file was deleted.

30 changes: 30 additions & 0 deletions roottest/root/meta/ROOT-7181/runscript.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#include <fstream>
#include <iostream>
#include <string>

void runscript(const std::string &fname, bool with_rootmap = false)
{
if (with_rootmap) {
int old = gInterpreter->SetClassAutoloading(kFALSE);
gInterpreter->LoadLibraryMap("libbtag.rootmap");
gInterpreter->LoadLibraryMap("libjet.rootmap");
gInterpreter->LoadLibraryMap("libsjet.rootmap");
gInterpreter->SetClassAutoloading(old);
}

std::ifstream f(fname);

std::string str;
while (std::getline(f, str)) {

if (gSystem->InheritsFrom("TWinNTSystem"))
if (str.find(".L") == 0) {
auto p = str.find(".so");
if (p != std::string::npos)
str = str.substr(0, p) + ".dll";
}

if (str.length() > 0)
gInterpreter->ProcessLineSynch(str.c_str());
}
}
6 changes: 4 additions & 2 deletions roottest/root/meta/ROOT-7181/scripts/case1.script
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.L lib/libjet.so
.L lib/libbtag.so
.L libjet_dictrflx.so
.L libbtag_dictrflx.so

#include "DataVector.h"

TClass::GetClass("SG::AuxTypeVectorFactory<std::vector<ElementLink<DataVector<xAOD::Jet_v1> > > >");
auto c = TClass::GetClass("DataVector<xAOD::Jet_v1>")->GetClassInfo();
printf("Classinfo for DataVector<xAOD::Jet_v1> is %s\n",gInterpreter->ClassInfo_IsValid(c) ? "valid" : "invalid");
6 changes: 4 additions & 2 deletions roottest/root/meta/ROOT-7181/scripts/case2.script
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.L lib/libsjet.so
.L lib/libbtag.so
.L libsjet_dictrflx.so
.L libbtag_dictrflx.so

#include "DataVector.h"

TClass::GetClass("SG::AuxTypeVectorFactory<std::vector<ElementLink<SDataVector<xAOD::SJet_v1> > > >");
auto c = TClass::GetClass("SDataVector<xAOD::SJet_v1>")->GetClassInfo();
printf("Classinfo for SDataVector<xAOD::SJet_v1> is %s\n",gInterpreter->ClassInfo_IsValid(c) ? "valid" : "invalid");
Expand Down
6 changes: 4 additions & 2 deletions roottest/root/meta/ROOT-7181/scripts/case3.script
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.L lib/libjet.so
.L lib/libbtag.so
.L libjet_dictrflx.so
.L libbtag_dictrflx.so

#include "DataVector.h"

auto c = TClass::GetClass("DataVector<xAOD::Jet_v1>");
printf("TClass for DataVector<xAOD::Jet_v1> is %s\n",c->IsLoaded() ? "loaded" : "not loaded");

Expand Down
6 changes: 4 additions & 2 deletions roottest/root/meta/ROOT-7181/scripts/case4.script
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.L lib/libjet.so
.L lib/libbtag.so
.L libjet_dictrflx.so
.L libbtag_dictrflx.so

#include "DataVector.h"

DataVector<xAOD::Jet_v1> obj;

std::string name;
Expand Down
8 changes: 0 additions & 8 deletions roottest/root/meta/ROOT-7181/scripts/loadrootmap.C

This file was deleted.

Loading