RE: [ROOT] Plotting an stl vector

From: Philippe Canal (pcanal@fnal.gov)
Date: Tue Jan 20 2004 - 19:00:02 MET


Hi Troy,

We are planning to add the ability to plot stl containers in the next few
weeks.

Cheers,
Philippe.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Troy Straszheim
Sent: Tuesday, January 20, 2004 9:53 AM
To: roottalk@cern.ch
Subject: [ROOT] Plotting an stl vector


Hi roottalk-

I'm new to this, have what I hope is an easy question to answer:

I have a class that contains an stl vector of ints, and I use a TFile and a
TTree to write it out to a file.  When I load up the file in an interactive
session, I can see all the data, as expected, in my branches when I access
them directly, e.g. branch->GetEntry(index).  However when I click the leave
in the tree viewer, I get the message

Warning in <TSelectorDraw::ProcessFillObject>: Not implemented for
vector<int,allocator<int> >

So I'm guessing that I need to somehow convert this vector into something
that is plottable by root.  Can anyone suggest a techinque to do this?

I may have to repeat this process for a very large number of root files with
stl vectors of various types...  the more generic the better.  Perhaps the
idea is a file converter, from root-with-stl-nonplottables to
root-with-plottables.

Any tips are gratefully accepted,

Thanks,

Troy Straszheim



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:05 MET