Message: Cannot get some result using paw Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Cannot get some result using paw 

Forum: Analysis
Date: 25 Nov, 2003
From: <yue.zhou@cern.ch>

Next is my source code of test.cpp about analysis(ignore the include file) In this program I create a hbook.When I run the program it execute as expected.But when I analysis the AnaEx01.hbook file I create in the program using paw,I can get nothing.Could anyone give me some suggestion? With best regards

AIDA::IAnalysisFactory* fAnalysisFactory; AIDA::ITree* fTree; AIDA::IHistogram1D* fEAbs;

int main()
{
  fAnalysisFactory = AIDA_createAnalysisFactory();
  if(!fAnalysisFactory) {
    std::cout << "AIDA analysis factory not found." << std::endl;
    return 0;
  }

  AIDA::ITreeFactory* treeFactory = fAnalysisFactory->createTreeFactory();
  if(!treeFactory) {
    delete fAnalysisFactory;
    fAnalysisFactory =  // Create a "tree" to handle histograms.
  fTree = treeFactory->create("AnaEx01.hbook","hbook",0,1);
  delete treeFactory;

  if(!fTree) {
    delete fAnalysisFactory;
    fAnalysisFactory = 0;
    return 0;
  }

  fTree->mkdir("histograms");
  fTree->cd("histograms");

  // Create an histo factory that will create histo in the tree :
  AIDA::IHistogramFactory* histoFactory =
    fAnalysisFactory->createHistogramFactory(*fTree);
  if(histoFactory) {
    fEAbs = histoFactory->createHistogram1D("EAbs",100,0,100);
    delete histoFactory;
  }

  for (int i=0;i<10;i++) {double EAbs = i;fEAbs->fill(EAbs);}

  if(fTree) fTree->commit();
  if(fEAbs) {
    std::cout << "Histo : EAbs : mean " << fEAbs->mean() << " rms : " << fEAbs->rms() << std::endl;
  }
    return 0;
  }

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

 Add Message Add Message
to: "Cannot get some result using paw"

 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 ]