Message: RE: Help on AIDA histograms Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback RE: Help on AIDA histograms 

Forum: Analysis
Re: Question Help on AIDA histograms (Gabriel Sawakuchi)
Re: None RE: Help on AIDA histograms
Re: Question RE: Help on AIDA histograms (Gabriel Sawakuchi)
Re: More RE: Help on AIDA histograms (Gabriel Sawakuchi)
Date: 23 Nov, 2005
From: Gabriel Sawakuchi <Gabriel Sawakuchi>

> In Microsoft Visual C++ there is the library 
> System.Collections that implements data structure similar to ArrayList.
> Is there any similar library in gcc ?

I have solved my problem. Thanks for the help.

std::vector<> is pretty much like ArrayList. 
For the ones that run into the same problem of stacking histograms 
one on the top of another this is my translation from the script 
that Tony sent to C++.

   AIDA::IHistogram1D*     histoAntiProton;
   AIDA::IHistogram1D*     histoProton;
   AIDA::IHistogram1D*     histoPionMinus;
   AIDA::IHistogram1D*     histoPionPlus;
    .
    .
    .
   /*fill the histoParticles with the method 
    histoParticles->fill(x, weight)}*/
    .
    .
    .

   AIDA::IHistogram1D*     histoStack;
   std::vector<AIDA::IHistogram1D*> histograms;
   std::vector<AIDA::IHistogram1D*> stack;

   histograms.push_back(histoAntiProton);
   histograms.push_back(histoProton);
   histograms.push_back(histoPionMinus);
   histograms.push_back(histoPionPlus);

   for (int i=0; i<histograms.size(); i++)
     {  
       histoStack = hf->createHistogram1D(idx[i],ids[i], nbBins, 0, length/mm);
       histoStack->add(*histograms.at(i));
       if (i>0) histoStack->add(*stack.at(i-1));
       stack.push_back(histoStack);
     }

   for (int i=stack.size(); i>0; i--)
     {
       plotter->region(0)->plot(*stack.at(i-1));
     }
   plotter->show();

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

 Add Message Add Message
to: "RE: Help on AIDA histograms"

 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 ]