Message: problem about read ITuple from a aida file Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None problem about read ITuple from a aida file 

Keywords: AIDA, file manipulate, ITuple
Forum: Analysis
Date: 15 Aug, 2007
From: long <long>

Dear experts, I wrote some codes to read out ITuple data from a aida file by 
referencing thread #163. It could find the designated tuple object from the 
file, but it could not read out the data in the tuple. I don't know why.
   The following is part of the codes. Some notes beside the instruction command.

AIDA::ITuple *oldTuple;
   .
   .
   .     
AIDA::IManagedObject*  managedObject2= oldTree->find("./Tuple2"); 
  if(!managedObject2)  // being skipped
    {
      G4cout<<"this pointer is NULL:"<<G4endl; 
      exit(4);
    }
  else   // will be executed
    {
      G4cout<<"managedObject2 pointer is pointed to:"<<managedObject2->name()<<G4endl;
      oldTuple = (AIDA::ITuple*)managedObject2->cast("AIDA::ITuple"); 
    }

  G4cout << "there are "<<oldTuple->rows() <<" in the radionuclides table"<<G4endl;
  // the return value of rows() is zero, but acutally,there are 3596 rows in that Tuple
  oldTuple->start();
  while ( oldTuple->next() ) // being skipped. Seems that oldTuple is a empty tuple
    {
      double time = oldTuple->getDouble(1); // created time of radionuclides
      double weight = oldTuple->getDouble(2); //weight
      vecHisto[1]->fill(time,weight);
      // fill the IHistogram1D with a value and the corresponding weight
    }

    

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

1 None: some more information on AIDA   (long - 16 Aug, 2007)
 Add Message Add Message
to: "problem about read ITuple from a aida file"

 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 ]