Re: [ROOT] Stl vector in a Tree

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Dec 05 2003 - 03:01:57 MET


Hi Giacomo,

Currently, std collections cannot be specified in the top level branch.
You must include your std:: collections in a class and make
a top level branch with this class.
We are hoping to lift this limitation in a coming version.

Rene Brun

On 
Thu, 4 Dec 2003, Giacomo Bruno wrote:

> Hi,
> I am trying to put an stl vector of floats in my tree, but I fail.
> 
> I am using Root version 3.10.01 as an external tool in my C++ program.
> 
> The syntaxes I have tried are
> 
>   tree->Branch("SizeSiStripRUs", "stl::vector<Float_t>", &SizeSRU);
> Or 
>   tree->Branch("SizeSiStripRUs", "vector<Float_t>", &SizeSRU);
> Where:
>   Ttree * tree;
>   vector<Float_t> * SizeSRU;	
> 
> Both forms result into 
> 
> Error in <TTree::Bronch>: Cannot find class:stl::vector<Float_t>
> or
> Error in <TTree::Bronch>: Cannot find class:vector<Float_t>
> 
> I thought that stl vectors were fully supported in the Root version I
> have used. Could anyone suggest what I am doing wrong. I searched the
> web site, but I couldn't find anything explaining this point (I must
> have surely not searched well enough)
> 
> Thanks in advance
> 
> Giacomo
> 
> Giacomo Bruno
> CERN, EP fellow
> mail:    40-2-B20 
>          CERN CH-1211 Geneva 23 
>          Switzerland
> e-mail:  Giacomo.Bruno@cern.ch
> phone:   +41 22 76 71624
> 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:17 MET