Skip to content
Merged
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
9 changes: 9 additions & 0 deletions README/ReleaseNotes/v640/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ The following people have contributed to this new version:
* The `TGLIncludes.h` and `TGLWSIncludes.h` that were deprecated in ROOT 6.38 and scheduled for removal are gone now. Please include your required headers like `<GL/gl.h>` or `<GL/glu.h>` directly.
* The GLEW headers (`GL/eglew.h`, `GL/glew.h`, `GL/glxew.h`, and `GL/wglew.h`) that were installed when building ROOT with `builtin_glew=ON` are no longer installed. This is done because ROOT is moving away from GLEW for loading OpenGL extensions.
* The `TF1`, `TF2`, and `TF3` constructors for CINT compatibility were removed. This concerns the templated constructors that additionally took the name of the used functor class and member function. With ROOT 6, these names can be omitted.
* The `TMultiGraph::Add(TMultiGraph*, Option_t*)` overload that adds the graphs in another **TMultiGraph** to a **TMultiGraph** is removed without deprecation.
It was inconsistent from a memory ownership standpoint.
A **TMultiGraph** always owns all the added graphs, so adding the same graph instances to two **TMultiGraphs** forcibly led to double-deletes.
If you want to add all graphs from `otherMultiGraph` to `multiGraph`, please use a for-loop and clone the graphs instead:
```c++
for (TObject *gr : *otherMultiGraph) {
multiGraph->Add(static_cast<TGraph*>(gr->Clone()));
}
```

## Build System

Expand Down
1 change: 0 additions & 1 deletion hist/hist/inc/TMultiGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class TMultiGraph : public TNamed {
~TMultiGraph() override;

virtual void Add(TGraph *graph, Option_t *chopt = "");
virtual void Add(TMultiGraph *multigraph, Option_t *chopt = "");
void Browse(TBrowser *b) override;
Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
void Draw(Option_t *chopt = "") override;
Expand Down
26 changes: 0 additions & 26 deletions hist/hist/src/TMultiGraph.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -422,32 +422,6 @@ void TMultiGraph::Add(TGraph *graph, Option_t *chopt)
}


////////////////////////////////////////////////////////////////////////////////
/// Add all the graphs in "multigraph" to the list of graphs.
///
/// - If "chopt" is defined all the graphs in "multigraph" will be added with
/// the "chopt" option.
/// - If "chopt" is undefined each graph will be added with the option it had
/// in "multigraph".

void TMultiGraph::Add(TMultiGraph *multigraph, Option_t *chopt)
{
TList *graphlist = multigraph->GetListOfGraphs();
if (!graphlist) return;

if (!fGraphs) fGraphs = new TList();

auto lnk = graphlist->FirstLink();

while (lnk) {
auto obj = lnk->GetObject();
if (!strlen(chopt)) fGraphs->Add(obj,lnk->GetOption());
else fGraphs->Add(obj,chopt);
lnk = lnk->Next();
}
}


////////////////////////////////////////////////////////////////////////////////
/// Browse multigraph.

Expand Down
Loading