22const char *blurbs[] = {
"Love",
"Peace",
"ROOT",
"Code",
"Courage",
"Quiche"};
23const int n_blurbs =
sizeof(blurbs) /
sizeof(
char *);
26const char *
fonts[] = {
"comic",
"comicbd",
"verdana",
"BlackChancery",
"georgia",
"georgiai"};
27const int n_fonts =
sizeof(
fonts) /
sizeof(
char *);
31const char *blurbs2[] = {
"Čüšék! Šèžëçàgïlá",
"Αβρασαξ",
"πφηθωμβτ"};
32const int n_blurbs2 =
sizeof(blurbs2) /
sizeof(
char *);
34const char *fonts2[] = {
"LiberationMono-Regular",
"LiberationSerif-Regular"};
35const int n_fonts2 =
sizeof(fonts2) /
sizeof(
char *);
40 const double lim = 300;
44 for (
int i = 0; i < N_Texts; i++) {
45 std::string word, font;
47 word = blurbs[
r.Integer(n_blurbs)];
48 font =
fonts[
r.Integer(n_fonts)];
50 word = blurbs2[
r.Integer(n_blurbs2)];
51 font = fonts2[
r.Integer(n_fonts2)];
54 auto name_text =
Form(
"%s_%d", word.data(), i);
56 text->SetText(name_text);
60 int mode =
r.Integer(2);
63 auto &t =
text->RefMainTrans();
64 t.SetRotByAngles(
r.Uniform(-pi, pi),
r.Uniform(-pi, pi),
r.Uniform(-pi, pi));
65 t.SetPos(
r.Uniform(-lim, lim),
r.Uniform(-lim, lim),
r.Uniform(-lim, lim));
66 text->SetFontSize(
r.Uniform(0.01 * lim, 0.2 * lim));
70 text->SetFontSize(
r.Uniform(0.001, 0.05));
73 TColor::GetColor((
float)
r.Uniform(0, 0.5), (
float)
r.Uniform(0, 0.5), (
float)
r.Uniform(0, 0.5)));
77 TColor::GetColor((
float)
r.Uniform(0, 0.2), (
float)
r.Uniform(0, 0.2), (
float)
r.Uniform(0, 0.2)));
78 text->SetLineAlpha(192);
80 TColor::GetColor((
float)
r.Uniform(0.7, 1.0), (
float)
r.Uniform(0.7, 1.0), (
float)
r.Uniform(0.7, 1.0)));
81 text->SetFillAlpha(128);
82 text->SetDrawFrame(
true);
93 for (
int i = 0; i < N_Jets; i++) {
96 jet->AddEllipticCone(
r.Uniform(-0.5, 0.5),
r.Uniform(0,
TMath::TwoPi()), 0.1, 0.2);
97 jet->SetFillColor(
kRed);
98 jet->SetLineColor(
kRed);
100 jetHolder->AddElement(jet);
107 eveMng->AllowMultipleRemoteConnections(
false,
false);
121 std::string rf_dir =
gSystem->ExpandPathName(
"${ROOTSYS}/fonts/");
122 for (
int i = 0; i < n_fonts; ++i) {
125 for (
int i = 0; i < n_fonts2; ++i) {
135 makeTexts(100, textHolder);
137 eveMng->GetEventScene()->AddElement(textHolder);
141 eveMng->GetEventScene()->AddElement(jetHolder);
double Double_t
Double 8 bytes.
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Base class for REveUtil visualization elements, providing hierarchy management, rendering control and...
Draws a jet cone with leading particle is specified in (eta,phi) and cone radius is given.
Eve representation of a GL view.
virtual void AddElement(REveElement *el)
Add el to the list of children.
static REveManager * Create()
If global REveManager* REX::gEve is not set initialize it.
void SetIsOverlay(bool x)
static bool AssertSdfFont(std::string_view font_name, std::string_view ttf_font)
Check if font exists, otherwise try to create it.
static Int_t GetColor(const char *hexcolor)
This is the base class for the ROOT Random number generators.
ROOT::Experimental::REveManager * eveMng
void makeJets(int N_Jets, REveElement *jetHolder)
Namespace for ROOT features in testing.
REveVectorT< Float_t > REveVector
constexpr Double_t TwoPi()