This macro runs three "games" that each nicely illustrate the graphics capabilities of ROOT.
Thanks to the clever usage of TTimer objects it looks like they are all executing in parallel (emulation of multi-threading). It uses the small classes generated in $ROOTSYS/test/Hello, Aclock, Tetris
#ifndef __RUN_GAMES__
{
printf(
"===>The macro games will try to build the Aclock library\n");
else
gSystem->
Exec(
"(cd %ROOTSYS%\test && nmake -f Makefile.win32 Aclock.dll)");
}
printf(
"===>The macro games will try to build the Hello library\n");
else
gSystem->
Exec(
"(cd %ROOTSYS%\test && nmake -f Makefile.win32 Hello.dll)");
}
printf(
"===>The macro games will try to build the Tetris library\n");
} else {
gSystem->
Exec(
"(cd %ROOTSYS%\test && nmake -f Makefile.win32 Tetris.dll)");
}
}
printf(
"ERROR: one of the shared libs in $ROOTSYS/test didn't load properly\n");
return;
}
gROOT->ProcessLine(
"#define __RUN_GAMES__ 1");
gROOT->ProcessLine(
"#include \"Hello.h\"");
gROOT->ProcessLine(
"#include \"Aclock.h\"");
gROOT->ProcessLine(
"#include \"Tetris.h\"");
gROOT->ProcessLine(
"#include \"games.C\"");
gROOT->ProcessLine(
"rungames()");
gROOT->ProcessLine(
"#undef __RUN_GAMES__");
}
#else
{
}
#endif
std::string hello(std::string who, std::string msg)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
R__EXTERN TSystem * gSystem
const char * GetName() const override
Returns name of object.
virtual Int_t Exec(const char *shellcmd)
Execute a command.
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
- Author
- Valeriy Onuchin
Definition in file games.C.