Message: Can I generate two .aida files? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Can I generate two .aida files? 

Forum: Analysis
Date: 14 Mar, 2007
From: <>

Dear G4 programmers:
I try to introduce the GPS(Genaral Particle Source) into Brachytherapy
sample. I want to do the analysis for both the GPS and Brachy main 
code output. Two .aida files are expected in the output. 

aida part in is:

void BrachyAnalysisManager::book() 
   // Instantiate the factories
  // The factories manage the analysis objects

  aFact = AIDA_createAnalysisFactory();
  AIDA::ITreeFactory *treeFact = aFact -> createTreeFactory(); 
  // Definition of the output file
  // G4String fileName = "brachytherapy.hbk";
  // theTree = treeFact -> create(fileName,"hbook",false, true);

  G4String fileName = OutputName;
  theTree = treeFact -> create(fileName,"xml",false, true,"compress=yes");

 // Instantiate the histogram and ntuple factories
  histFact = aFact -> createHistogramFactory( *theTree );
  tupFact  = aFact -> createTupleFactory    ( *theTree );

aida part in is: 
void exGPSAnalysisManager::BeginOfRun() 

  // Hooking an AIDA compliant analysis system.
  analysisFactory = AIDA_createAnalysisFactory();
    ITreeFactory* treeFactory = analysisFactory->createTreeFactory();
    tree = treeFactory->create(fileName,fileType,false,true,"compress=yes");
    hFactory = analysisFactory->createHistogramFactory(*tree);
    tFactory = analysisFactory->createTupleFactory(*tree);
    delete treeFactory; // Will not delete the ITree.

Because both BrachyAnalysisManager.hh and exGPSAnalysisManager.hh are
included in the main code, two different .aida files with different name 
should be generated. While I run and gdb it, the exGPS.aida is generated
successfully. The Brachy.aida didn't come out. After gdb the code I 
found the pointer aFact in function ::book pointed to 0x0 and then
the code crashed. My question is  if the AIDA can generate two .aida 
files and what is wrong with my code.

thank you!

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

1 None: Re: Can I generate two .aida files?   (Guy Barrand - 20 Mar, 2007)
 Add Message Add Message
to: "Can I generate two .aida files?"

 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 ]