Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary op (for testing) #19

Open
wants to merge 104 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
9a613a2
Handle selection for filtered digits. Enable custom tooltip
alja Jun 9, 2022
7b524be
Add check if digit is visible in FillExtraSelectionData
alja Jun 10, 2022
9ccf060
Add example for RecHit proxy buiders
alja Jun 10, 2022
c8e617e
Remove debug prints
alja Jun 10, 2022
5547dec
Add check for empty boxset in makeBoxSet()
alja Jun 23, 2022
11c49f2
Changes comments
alja Jun 23, 2022
b386d38
[asimage] use unique_ptr for TBox created in ProcessEvent
linev Jun 23, 2022
0250f55
use std::vector to keep temporary array in TPolyLine::ExecuteEvent
linev Jun 23, 2022
7488ebd
Use std::unique_ptr for temporary TBox in TPad::ExecuteEventAxis
linev Jun 23, 2022
0c34796
Use std::vector<Int_t> for temp array in TGraph::ExecuteEvent
linev Jun 23, 2022
045129c
Use unique_ptr<TBox> for temp object in TH1::ExecuteEvent
linev Jun 23, 2022
3168b31
Use std::vector<Int_t> for static list of colors in TImagePalette
linev Jun 23, 2022
47593d6
Use std::unique_ptr<TBox> for static objects in THistPainter
linev Jun 23, 2022
98d05db
[skip-ci] put CONT5 option in the right place (#10819)
couet Jun 24, 2022
fe8d738
[RF] Delete wrongly implemented copy assignment operator of RooPolyFunc
guitargeek Jun 23, 2022
dbc9681
[RF] Second attempt to fix schema evolution for old RooProduct versions
guitargeek Jun 23, 2022
bac3ea9
[RF] Call base class method in RooHistFunc::ioStreamerPass2()
guitargeek Jun 23, 2022
7bf3179
[RF] Disable misleading copy assignment for RooCollectionProxy
guitargeek Jun 23, 2022
678c5b4
[ntuple,daos] Permanent pool EQs; parent events
glmiotto Jun 22, 2022
468d20a
[histpainter] use std::vector<Double_t> for interim buffer
linev Jun 23, 2022
8befe27
Fix memory leak with TGraph2DPainter allocated in hist painter
linev Jun 23, 2022
7420244
Use std::vectors in histpainter contour plot
linev Jun 24, 2022
28bba1e
Fix memory leak with "cont list" draw option
linev Jun 24, 2022
e1ddc19
Use std::vector in THistPainter methods instead of plain arrays
linev Jun 24, 2022
de4a1b3
[histpainter] use nullptr, avoid Form(), simplify TIter loops
linev Jun 24, 2022
011a98d
[NFC][DF] Fix typo in Python example
eguiraud Jun 22, 2022
45d1530
[DF] Remove redundant calls to RDefine::InitSlot
eguiraud Jun 22, 2022
9c440e5
[NFC][DF] Consistently use the imperative mood in docs
eguiraud Jun 22, 2022
0190901
[NFC][DF] Remove redundant `private:`
eguiraud Jun 22, 2022
09e5915
[NFC][DF] Move docstrings to source file
eguiraud Jun 22, 2022
674258c
bugfix to use HF-internal observables instead of dataset-internal ones
cburgard Jun 27, 2022
e9fa243
adding new classes to exporters and importers
cburgard Jun 27, 2022
943d31d
[cmake] set minimal nlohmann/json version to 3.9
linev Jun 23, 2022
c4cf25b
Use std::vector for dynamic arrays in 3d algorithms
linev Jun 27, 2022
ea5fe99
Use nullptr in 3d algorithms
linev Jun 27, 2022
ac254ff
Use members instead of global variables in graph painter
linev Jun 27, 2022
6ea3996
Use std::vector and local variables in graph painter
linev Jun 27, 2022
d8b5dd8
Use 2D vector in TGraphPainter::PaintGraphMultiErrors
linev Jun 27, 2022
f5b3de9
Use unique_ptr for highlight marker
linev Jun 27, 2022
d8fe614
Use std::vector for temp arrays in TGraph2DPainter
linev Jun 27, 2022
869602a
Check gPad before call gPad->GetView()
linev Jun 27, 2022
b0a386d
[DF] Make const method const
eguiraud Jun 27, 2022
02b6e59
[NFC][DF] Improve data member docs
eguiraud Jun 27, 2022
c6a2f50
[RF] Remove more dead HistFactory code in HistoToWorkspaceFactoryFast
guitargeek Jun 25, 2022
9a5cca1
[RF] Avoid some code duplication in RooRealSumFunc/RooRealSumPdf
guitargeek Jun 18, 2022
60b95a9
[RF] Avoid some code duplication in RooRealSumFunc/RooRealSumPdf part 2
guitargeek Jun 27, 2022
f5bff32
[RF][squash-on-merge] Avoid code duplication in RooRealSumPdf/Func
guitargeek Jun 27, 2022
f61a4e8
Fix compilation error of ntuple_types on Windows
bellenot Jun 28, 2022
1c5d570
Revert "Survive #pragma once from virtual file."
tapaswenipathak Jun 25, 2022
fb25d1a
Revert "Merge Ctors from nested transactions"
vgvassilev Jun 26, 2022
3e5a873
Added new starting point for cpt.py.
saisoma123 Jun 9, 2022
49b9fd3
Edited verbose output flag
saisoma123 Jun 10, 2022
0f2436d
Added verbose flag to the llvm_flags variable
saisoma123 Jun 13, 2022
5daf77a
Added verbose flag to the llvm_flags variable, if the verbose option …
saisoma123 Jun 14, 2022
fb4d845
Forgot extra plus sign
saisoma123 Jun 14, 2022
c84bd4d
Formatting changes
saisoma123 Jun 14, 2022
938815a
Fixed formatting and made new helper function for setting llvm_flags
saisoma123 Jun 28, 2022
ebf065a
[ntuple] Clarify 'compression settings' in specification (NFC)
jblomer Jun 27, 2022
a483a2b
[ntuple] Fix typo in specification (NFC)
jblomer Jun 28, 2022
34b2773
Use nullptr and TString::Form in TGraphPolargram
linev Jun 28, 2022
5048abe
Use std::vector for TLatex::fTabSize
linev Jun 28, 2022
f6658fa
Use vector for columnWidths in TLegend
linev Jun 28, 2022
949a2f9
Fix bug in TPie copy constructor
linev Jun 28, 2022
56f6ad1
Use nullptr in graf2d/graf classes
linev Jun 28, 2022
5cf8cf7
Fix memory leak reading old version of TPolyLine
linev Jun 28, 2022
e728d69
Use stack TLine and TLatex objects when drawing TGaxis
linev Jun 28, 2022
85968c2
Fix memory leak with TGaxis::fModLabs
linev Jun 28, 2022
01003da
Use stack variables and TString in TMarker::DisplayMarkerTypes()
linev Jun 28, 2022
fda2fd1
Use stack variables for TPie painting
linev Jun 28, 2022
6a9e6e5
Use stack variables for TPave painting
linev Jun 28, 2022
212c0dd
Set owner flag for TGaxis::fModLabs list of labels
linev Jun 28, 2022
a78a571
[DF] Declare single-argument ctor explicit
eguiraud Jun 28, 2022
d37a2ae
[DF] Fix iteration over multimap
eguiraud Jun 28, 2022
fc4e3e8
[gpad] use TString instead plain char arrays in TCanvas methods
linev Jun 29, 2022
9545522
use std::vector<bool> for collide grid in TPad
linev Jun 29, 2022
7d9f193
Use vector and TString in TPad methods
linev Jun 29, 2022
c6fe4f5
Use nullptr in TPad.cxx
linev Jun 29, 2022
5fca747
Fix memory leak in TPad::DrawCollideGrid and TPad::DrawColorTable
linev Jun 29, 2022
9bce4e9
Fix memory leaks in tmvagui
linev Jun 29, 2022
b306a89
Fix temporary TText leaking in tutorials
linev Jun 29, 2022
792d9b5
Fix TLatex memory leak in stressGraphics
linev Jun 29, 2022
4b38e64
Fix TLatex memory leak in tutorials and demos
linev Jun 29, 2022
a8567a3
Fix TLine::DrawLine memory leaks in tutorials and demos
linev Jun 29, 2022
702cf95
Fix TArrow::DrawArrow memory leak in tutorials
linev Jun 29, 2022
afa57c5
Fix TMarker::DrawMarker memory leaks in spectrum tutorials
linev Jun 29, 2022
b911b0b
Release memory and dynamic objects in TSpectrum2 tutorials
linev Jun 29, 2022
5c58340
Fix TArc::DrawArc related leaks
linev Jun 29, 2022
4a4b27b
Fix leak TPaveLabel::DrawPaveLabel usage
linev Jun 29, 2022
d18d368
[tree] Add interface to add a friend in RFriendInfo
vepadulano Jun 28, 2022
3febf4a
[tree][NFC] Clarify comment
vepadulano Jun 28, 2022
ed6f3bf
[tree][NFC] make formatter happy
vepadulano Jun 28, 2022
ea09711
Using higher-level wrapper of OpenSSL SHA1 hash function in civetweb
guitargeek Apr 11, 2022
08c41c6
[civetweb] use EVP_Digest only for OPENSSL 3.0
linev Jun 29, 2022
7b7983f
[TMVA][SOFIE] Fixed the implementation of MaxPool ONNX operator for 1…
Neel-Shah-29 Jun 29, 2022
3645164
[RF] Fix dirty flag resetting when the normalization set is changed
guitargeek Jun 29, 2022
1f0d5ad
[RF] Avoid duplication of RooRealSumPdf code in RooAddition
guitargeek Jun 28, 2022
6fa5c44
[RF] Avoid duplication of RooRealSumPdf code in RooAddPdf
guitargeek Jun 28, 2022
61a102d
Protect TF1 constructor against nullptr as formula parameter
linev Jun 29, 2022
1d20621
Fix memory leak in TF1 constructor NSUM(...) parsing
linev Jun 29, 2022
8baea4c
Protect hist classes against calling strlen with nullptr argument
linev Jun 29, 2022
4e0ef33
Some error messages and spelling mistakes fixed related to operators …
Neel-Shah-29 Jun 30, 2022
f799ed3
All the four Binary Operators:- Add,Sub,Mul,Div added with the corres…
Neel-Shah-29 Jun 30, 2022
9489b33
Required changes related to comments are done.
Neel-Shah-29 Jun 30, 2022
6df2e5e
Required changes made for the comments
Neel-Shah-29 Jun 30, 2022
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: 1 addition & 1 deletion cmake/modules/SearchInstalledSoftware.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ if(NOT builtin_nlohmannjson)
if(fail-on-missing)
find_package(nlohmann_json REQUIRED)
else()
find_package(nlohmann_json QUIET)
find_package(nlohmann_json 3.9 QUIET)
if(nlohmann_json_FOUND)
get_target_property(_nlohmann_json_incl nlohmann_json::nlohmann_json INTERFACE_INCLUDE_DIRECTORIES)
message(STATUS "Found nlohmann/json.hpp in ${_nlohmann_json_incl} (found version ${nlohmann_json_VERSION})")
Expand Down
13 changes: 7 additions & 6 deletions core/base/doc/macros/textalign.C
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
auto *Ta = new TCanvas("Ta","Ta",0,0,500,200);
Ta->Range(0,0,1,1);

auto *lv = new TLine;
lv->SetLineStyle(3); lv->SetLineColor(kBlue);
lv->DrawLine(0.33,0.0,0.33,1.0);
lv->DrawLine(0.6,0.165,1.,0.165);
lv->DrawLine(0.6,0.493,1.,0.493);
lv->DrawLine(0.6,0.823,1.,0.823);
TLine lv;
lv.SetLineStyle(3);
lv.SetLineColor(kBlue);
lv.DrawLine(0.33,0.0,0.33,1.0);
lv.DrawLine(0.6,0.165,1.,0.165);
lv.DrawLine(0.6,0.493,1.,0.493);
lv.DrawLine(0.6,0.823,1.,0.823);

// Horizontal alignment.
auto *th1 = new TText(0.33,0.165,"Left adjusted");
Expand Down
24 changes: 12 additions & 12 deletions core/base/doc/macros/textangle.C
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
auto *Ta = new TCanvas("Ta","Text angle",0,0,300,326);
Ta->Range(0,0,1,1);
auto *l = new TLine();
l->SetLineColor(kRed);
l->DrawLine(0.1,0.1,0.9,0.1);
l->DrawLine(0.1,0.1,0.9,0.9);
auto *m = new TMarker();
m->SetMarkerStyle(20);
m->SetMarkerColor(kBlue);
m->DrawMarker(0.1,0.1);
auto *a = new TArc();
a->SetFillStyle(0);
a->SetLineColor(kBlue); a->SetLineStyle(3);
a->DrawArc(0.1, 0.1, 0.2, 0.,45.,"only");
TLine l;
l.SetLineColor(kRed);
l.DrawLine(0.1,0.1,0.9,0.1);
l.DrawLine(0.1,0.1,0.9,0.9);
TMarker m;
m.SetMarkerStyle(20);
m.SetMarkerColor(kBlue);
m.DrawMarker(0.1,0.1);
TArc a;
a.SetFillStyle(0);
a.SetLineColor(kBlue); a->SetLineStyle(3);
a.DrawArc(0.1, 0.1, 0.2, 0.,45.,"only");
auto *tt = new TText(0.1,0.1,"Text angle is 45 degrees");
tt->SetTextAlign(11); tt->SetTextSize(0.1);
tt->SetTextAngle(45);
Expand Down
28 changes: 27 additions & 1 deletion etc/RooFitHS3_wsexportkeys.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@
"proxies": {
"set": "summands"
}
},
},
"RooBernstein": {
"type": "BernsteinPolynomial",
"proxies": {
"coefList": "coefficients",
"x": "x"
}
},
"RooArgusBG": {
"type": "ARGUS",
"proxies": {
Expand All @@ -63,5 +70,24 @@
"c": "slope",
"p": "power"
}
},
"RooCBShape": {
"type": "CrystalBallShape",
"proxies": {
"alpha": "alpha",
"m": "m",
"m0": "m0",
"n": "n",
"sigma": "sigma"
}
},
"RooBifurGauss": {
"type": "BifurkatedGaussian",
"proxies": {
"x": "x",
"mean": "mean",
"sigmaL": "sigmaL",
"sigmaR": "sigmaR"
}
}
}
26 changes: 26 additions & 0 deletions etc/RooFitHS3_wsfactoryexpressions.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,31 @@
"slope",
"power"
]
},
"BernsteinPolynomial": {
"class": "RooBernstein",
"arguments": [
"x",
"coefficients"
]
},
"CrystalBallShape": {
"class": "RooCBShape",
"arguments": [
"m",
"m0",
"sigma",
"alpha",
"n"
]
},
"BifurkatedGaussian": {
"class": "RooBifurGauss",
"arguments": [
"x",
"mean",
"sigmaL",
"sigmaR"
]
}
}
23 changes: 12 additions & 11 deletions graf2d/asimage/src/TASImage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ Several examples showing how to use this class are available in the
ROOT tutorials: `$ROOTSYS/tutorials/image/`
*/

# include <ft2build.h>
# include FT_FREETYPE_H
# include FT_GLYPH_H
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H

#include "TASImage.h"
#include "TASImagePlugin.h"
#include "TROOT.h"
Expand Down Expand Up @@ -89,6 +90,8 @@ ROOT tutorials: `$ROOTSYS/tutorials/image/`
#include "TVirtualPadPainter.h"
#include "snprintf.h"

#include <memory>

#ifndef WIN32
#ifndef R__HAS_COCOA
# include <X11/Xlib.h>
Expand Down Expand Up @@ -1703,7 +1706,7 @@ Int_t TASImage::DistancetoPrimitive(Int_t px, Int_t py)

void TASImage::ExecuteEvent(Int_t event, Int_t px, Int_t py)
{
static TBox *ZoomBox;
static std::unique_ptr<TBox> ZoomBox;

if (!gPad) return;

Expand Down Expand Up @@ -1762,9 +1765,8 @@ void TASImage::ExecuteEvent(Int_t event, Int_t px, Int_t py)
ZoomBox->SetY1(gPad->AbsPixeltoY(pyl));
ZoomBox->SetX2(gPad->AbsPixeltoX(pxt));
ZoomBox->SetY2(gPad->AbsPixeltoY(pyt));
}
else {
ZoomBox = new TBox(pxl, pyl, pxt, pyt);
} else {
ZoomBox = std::make_unique<TBox>(pxl, pyl, pxt, pyt);
ZoomBox->SetFillStyle(0);
ZoomBox->Draw("l*");
}
Expand Down Expand Up @@ -1800,10 +1802,9 @@ void TASImage::ExecuteEvent(Int_t event, Int_t px, Int_t py)
Zoom((imgX1 < imgX2) ? imgX1 : imgX2, (imgY1 < imgY2) ? imgY1 : imgY2,
TMath::Abs(imgX1 - imgX2) + 1, TMath::Abs(imgY1 - imgY2) + 1);

if (ZoomBox) {
ZoomBox->Delete();
ZoomBox = 0;
}
if (ZoomBox)
ZoomBox.reset();

gPad->Modified(kTRUE);
gPad->Update();
break;
Expand Down
3 changes: 2 additions & 1 deletion graf2d/gpad/inc/TPad.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "TVirtualPad.h"
#include "TAttBBox2D.h"
#include <vector>

class TVirtualViewer3D;
class TVirtualPadPainter;
Expand Down Expand Up @@ -111,7 +112,7 @@ class TPad : public TVirtualPad, public TAttBBox2D {
static Int_t fgMaxPickDistance; ///< Maximum Pick Distance
Int_t fNumPaletteColor; ///< Number of objects with an automatic color
Int_t fNextPaletteColor; ///< Next automatic color
Bool_t *fCollideGrid; ///<! Grid used to find empty space when adding a box (Legend) in a pad
std::vector<Bool_t> fCollideGrid;///<! Grid used to find empty space when adding a box (Legend) in a pad
Int_t fCGnx; ///<! Size of the collide grid along x
Int_t fCGny; ///<! Size of the collide grid along y

Expand Down
66 changes: 28 additions & 38 deletions graf2d/gpad/src/TCanvas.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -160,18 +160,18 @@ TCanvas::TCanvas(Bool_t build) : TPad(), fDoubleBuffer(0)
Constructor();
} else {
const char *defcanvas = gROOT->GetDefCanvasName();
char *cdef;
TString cdef;

auto lc = (TList*)gROOT->GetListOfCanvases();
if (lc->FindObject(defcanvas)) {
Int_t n = lc->GetSize()+1;
while (lc->FindObject(Form("%s_n%d",defcanvas,n))) n++;
cdef = StrDup(Form("%s_n%d",defcanvas,n));
Int_t n = lc->GetSize() + 1;
do {
cdef.Form("%s_n%d",defcanvas,n++);
} while (lc->FindObject(cdef.Data()));
} else {
cdef = StrDup(Form("%s",defcanvas));
cdef = defcanvas;
}
Constructor(cdef, cdef, 1);
delete [] cdef;
Constructor(cdef.Data(), cdef.Data(), 1);
}
}

Expand Down Expand Up @@ -1504,22 +1504,20 @@ void TCanvas::ls(Option_t *option) const
TCanvas *TCanvas::MakeDefCanvas()
{
const char *defcanvas = gROOT->GetDefCanvasName();
char *cdef;
TString cdef;

auto lc = (TList*)gROOT->GetListOfCanvases();
if (lc->FindObject(defcanvas)) {
Int_t n = lc->GetSize() + 1;
cdef = new char[strlen(defcanvas)+15];
do {
strlcpy(cdef,Form("%s_n%d", defcanvas, n++),strlen(defcanvas)+15);
} while (lc->FindObject(cdef));
cdef.Form("%s_n%d", defcanvas, n++);
} while (lc->FindObject(cdef.Data()));
} else
cdef = StrDup(Form("%s",defcanvas));
cdef = defcanvas;

TCanvas *c = new TCanvas(cdef, cdef, 1);
TCanvas *c = new TCanvas(cdef.Data(), cdef.Data(), 1);

::Info("TCanvas::MakeDefCanvas"," created default TCanvas with name %s",cdef);
delete [] cdef;
::Info("TCanvas::MakeDefCanvas"," created default TCanvas with name %s",cdef.Data());
return c;
}

Expand Down Expand Up @@ -1834,32 +1832,25 @@ void TCanvas::SaveSource(const char *filename, Option_t *option)

char quote = '"';
std::ofstream out;
Int_t lenfile = strlen(filename);
char * fname;
char lcname[10];
TString fname;
const char *cname = GetName();
Bool_t invalid = kFALSE;
// if filename is given, open this file, otherwise create a file
// with a name equal to the canvasname.C
if (lenfile) {
fname = (char*)filename;
out.open(fname, std::ios::out);
if (filename && (strlen(filename) > 0)) {
fname = filename;
} else {
Int_t nch = strlen(cname);
if (nch < 10) {
strlcpy(lcname,cname,10);
for (Int_t k=1;k<=nch;k++) {if (lcname[nch-k] == ' ') lcname[nch-k] = 0;}
if (lcname[0] == 0) {invalid = kTRUE; strlcpy(lcname,"c1",10); nch = 2;}
cname = lcname;
fname = cname;
fname = fname.Strip(TString::kBoth);
if (fname.IsNull()) {
invalid = kTRUE;
fname = "c1";
}
fname = new char[nch+3];
strlcpy(fname,cname,nch+3);
strncat(fname,".C",3);
out.open(fname, std::ios::out);
}
if (!out.good ()) {
Error("SaveSource", "Cannot open file: %s",fname);
if (!lenfile) delete [] fname;
fname.Append(".C");
}
out.open(fname.Data(), std::ios::out);
if (!out.good()) {
Error("SaveSource", "Cannot open file: %s", fname.Data());
return;
}

Expand Down Expand Up @@ -1887,7 +1878,7 @@ void TCanvas::SaveSource(const char *filename, Option_t *option)
topx = 1; topy = 1;
}

TString mname(fname);
TString mname = fname;
out << R"CODE(#ifdef __CLING__
#pragma cling optimize(0)
#endif
Expand Down Expand Up @@ -1960,14 +1951,13 @@ void TCanvas::SaveSource(const char *filename, Option_t *option)

out <<"}"<<std::endl;
out.close();
Info("SaveSource","C++ Macro file: %s has been generated", fname);
Info("SaveSource","C++ Macro file: %s has been generated", fname.Data());

// reset bit TClass::kClassSaved for all classes
next.Reset();
while((cl = (TClass*)next())) {
cl->ResetBit(TClass::kClassSaved);
}
if (!lenfile) delete [] fname;
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
Loading