Skip to content

Commit 8982298

Browse files
SpectreVertguitargeek
authored andcommitted
Translate the root/io/bigevent make to cmake
1 parent 9d29623 commit 8982298

File tree

4 files changed

+36
-41
lines changed

4 files changed

+36
-41
lines changed

root/io/bigevent/CMakeLists.txt

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,32 @@
1-
#-------------------------------------------------------------------------------
2-
#
3-
# Placeholder file to translate the tests to the new CTest system. Meanwhile we
4-
# define a CTest test that calls 'make' in ${CMAKE_CURRENT_SOURCE_DIR}
5-
#
6-
#-------------------------------------------------------------------------------
7-
ROOTTEST_ADD_OLDTEST()
1+
ROOT_GENERATE_DICTIONARY(G__IoBigEventGeneration
2+
${CMAKE_CURRENT_SOURCE_DIR}/Event.h
3+
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/EventLinkDef.h)
4+
5+
ROOT_LINKER_LIBRARY(IoBigEventGeneration
6+
${CMAKE_CURRENT_SOURCE_DIR}/IoBigEventGeneration.cxx
7+
G__IoBigEventGeneration.cxx
8+
LIBRARIES Core Tree Hist MathCore Physics Graf Matrix)
9+
10+
if(MSVC)
11+
add_custom_command(TARGET IoBigEventGeneration POST_BUILD
12+
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/libIoBigEventGeneration.dll
13+
${CMAKE_CURRENT_BINARY_DIR}/libIoBigEventGeneration.dll
14+
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/libIoBigEventGeneration.lib
15+
${CMAKE_CURRENT_BINARY_DIR}/libIoBigEventGeneration.lib)
16+
endif()
17+
18+
ROOTTEST_GENERATE_EXECUTABLE(IoBigEventGenerator
19+
${CMAKE_CURRENT_SOURCE_DIR}/IoBigEventGenerator.cxx
20+
LIBRARIES Core RIO Net Tree Hist MathCore IoBigEventGeneration
21+
DEPENDS IoBigEventGeneration MathCore
22+
FIXTURES_SETUP io-bigevent-generator)
23+
24+
ROOTTEST_ADD_TEST(write
25+
COMMAND ./IoBigEventGenerator 10 1 1 1
26+
FIXTURES_REQUIRED io-bigevent-generator
27+
RESOURCE_LOCK io-bigevent-file)
28+
29+
ROOTTEST_ADD_TEST(read
30+
COMMAND ./IoBigEventGenerator 10 1 1 20
31+
FIXTURES_REQUIRED io-bigevent-generator
32+
RESOURCE_LOCK io-bigevent-file)
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
//
6363
////////////////////////////////////////////////////////////////////////
6464

65+
#include "TLine.h"
6566
#include "TRandom.h"
6667
#include "TDirectory.h"
6768
#include "TAttLine.h"
@@ -178,7 +179,7 @@ Event::Event()
178179
}
179180

180181
//______________________________________________________________________________
181-
Event::Event(Int_t enumber)
182+
Event::Event(Int_t /*enumber*/)
182183
{
183184
// Create an Event object.
184185
// When the constructor is invoked for the first time, the class static
@@ -266,7 +267,7 @@ void Event::Clear(Option_t *option)
266267
}
267268

268269
//______________________________________________________________________________
269-
void Event::Reset(Option_t *option)
270+
void Event::Reset(Option_t * /*option*/)
270271
{
271272
// Static function to reset all static objects for this event
272273
// fgTracks->Delete(option);
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ int main(int argc, char **argv)
115115

116116

117117
TFile *hfile;
118-
TTree *tree;
119118
Event *event = 0;
120119

121120
// Fill event, header and tracks with some random numbers
@@ -136,7 +135,7 @@ int main(int argc, char **argv)
136135
// Read case
137136
if (read) {
138137
hfile = new TFile("Event.root");
139-
tree = (TTree*)hfile->Get("T");
138+
TTree *tree = (TTree*)hfile->Get("T");
140139
TBranch *branch = tree->GetBranch("event");
141140
branch->SetAddress(&event);
142141
Int_t nentries = (Int_t)tree->GetEntries();

root/io/bigevent/Makefile

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)