Re: std::map and root

From: Marc Escalier <escalier_at_lal.in2p3.fr>
Date: Mon, 14 Nov 2011 22:55:20 +0100


ok

thank you Philippe for your advice

(and apologizes for my delay)



On Mon, 14 Nov 2011, Philippe Canal wrote:

> Hi Marc,
>
> When a dictionary is missing you can simply request its generation
> explicitly at run-time with (for example in your case):
>
> gInterpreter->GenerateDictionary("std::map<std::string,TH1*>","TH1.h;map");
>
> Cheers,
> Philippe
>
> PS. The loading of roofit in this case was unintnetional and has been
> remove from the trunk, v5-30 patch branch and v5-32 patch branch
>
> Cheers,
> Philippe.
>
> On 11/12/11 5:21 PM, Marc Escalier wrote:
>> Hello,
>>
>> just wondering if you would have an idea on this :
>>
>> std::map<string,TH1*> hmap;
>>
>> std::map<std::string,TH1*>::const_iterator hiter(hmap.begin());
>>
>> -->Error: Can't call iterator::iterator(hmap.begin()) in current scope
>>
>> thank you
>>
>>
>> here is the log :
>> root -b
>> *******************************************
>> * *
>> * W E L C O M E to R O O T *
>> * *
>> * Version 5.30/00 27 June 2011 *
>> * *
>> * You are welcome to visit our Web site *
>> * http://root.cern.ch *
>> * *
>> *******************************************
>>
>> ROOT 5.30/00 (tags/v5-30-00_at_40062, Aug 12 2011, 16:25:34 on linuxx8664gcc)
>>
>> CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
>> Type ? for help. Commands must be C++ statements.
>> Enclose multiple statements between { }.
>> root [0] std::map<string,TH1*> hmap
>>
>> RooFit v3.16 -- Developed by Wouter Verkerke and David Kirkby
>> Copyright (C) 2000-2011 NIKHEF, University of California &
>> Stanford University
>> All rights reserved, please read
>> http://roofit.sourceforge.net/license.txt
>>
>> root [1] std::map<std::string,TH1*>::const_iterator hiter(hmap.begin())
>> Error: Can't call iterator::iterator(hmap.begin()) in current scope
>> (tmpfile):1:
>> Possible candidates are...
>> Error: class,struct,union or type iterator not defined (tmpfile):1:
>> *** Interpreter error recovered ***
>> root [2] .q
>>
>
>
Received on Mon Nov 14 2011 - 22:55:27 CET

This archive was generated by hypermail 2.2.0 : Tue Nov 15 2011 - 05:50:02 CET