Message: Re: creating histograms of variable bin widths using JAIDA Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: creating histograms of variable bin widths using JAIDA 

Forum: Analysis
Re: Question creating histograms of variable bin widths using JAIDA (Victor_Makarov)
Date: 04 Jul, 2007
From: Mark Donszelmann <Mark Donszelmann>

Hi Victor,

java uses arrays (as we can determine their lengths). In
c++ you need to use std::vector<double> (because we cannot
determine the length of a c++ array).

vector<double> binEdges;
binEdges.push_back(0);
binEdges.push_back(0.1);
...
binEdges.push_back(1.0);

but maybe there is a better way to init this vector.

Greetings
Mark Donszelmann

On Jul 4, 2007, at 6:40 AM, Victor wrote:

> *** Discussion title: Analysis
> Email replies to PublicHyperNews@slac.stanford.edu must include:
>   In-Reply-To: <"/analysis/295"@geant4-hn.slac.stanford.edu>
>   Subject: ...change this to be about your reply.
>
> Hi! I'd like to create histograms of variable bin widths using JAIDA.
> I've looked into JAida documentation and found the proper command for
> that: "createHistogram1D(String path, String title, double[]  
> binEdges) "
> where binEdges is an array. Using Java it is supposed to set binEdges
> like that: double[] binEdges =
> {0,0.1,0.21,0.35,0.48,0.52,0.65,0.75,0.83,0.94,1.0}. But C++ wouldn't
> understand that. But if I use double binEdges[] (recognizable by C++),
> AIDA wouldn't understand it. So, what is that command supposed to be?
> Thanks.

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: creating histograms of variable bin widths using JAIDA   (Victor - 05 Jul, 2007)
 Add Message Add Message
to: "Re: creating histograms of variable bin widths using JAIDA"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]