Re: What is the number after the tree name?

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Mon, 1 Aug 2011 13:46:07 -0500


Hi Genie,

It is a 'revision' number. The TFile keeps a copy of the meta-data of the TTree just in case of abrupt termination during the writting of this meta-data to avoid losing the data.

In first approximation you can ignore this number and the fact that there is 2 of them, it is not a problem.

Cheers,
Philippe.

On 7/30/11 7:15 AM, Genie Jhang wrote:
> Hello.
>
> I think I have some problems.
> I'm currently getting simulation data with input data using geant4.9.4.p02 and root 5.30.
> If the entries are not so many, this problem doesn't appear.
> Here's the problem.
>
>
> ------------------------------------------------------------------------------------------
> root [0]
> Attaching file rawData.root as _file0...
> root [1] _file0 -> ls()
> TFile** rawData.root
> TFile* rawData.root
> KEY: TTree SimulationData;108 Simulation Data is stored
> KEY: TTree SimulationData;107 Simulation Data is stored
> KEY: TTree IQMDData;3 Primary Vertices are stored
> KEY: TTree IQMDData;2 Primary Vertices are stored
> root [2]
> ------------------------------------------------------------------------------------------
>
> There're two keys for the same tree!!
> What is "the number" after the treename with "l"?
> And I'm pretty sure that I let the simulation make only two trees; IQMDData, SimulationData, but why two?
>
> Is that my problem? or ROOT? or GEANT4? or code?
>
> Thanks for your guide and help, in advance.
>
> Here's the code for making ROOT file. Simplified to some extent but including all the essential parts.
>
> -----------------------------------------------------------------------------------------------------------------------
> AnaRoot::AnaRoot()
> {
> rootFile = new TFile("rawData.root", "RECREATE");
> rootDir = gDirectory;
>
> // IQMD Data Tree Making
> rootDir -> cd();
>
> iqmdDataTree = new TTree("IQMDData", "Primary Vertices are stored");
> iqmdDataTree -> Branch("eventID",&eventID, "eventID/I");
>
> // Simulation Data Tree Making
> rootDir -> cd();
>
> simulationDataTree = new TTree("SimulationData", "Simulation Data is stored");
> simulationDataTree -> Branch("eventID",&eventID, "eventID/I");
> }
>
> AnaRoot::~AnaRoot()
> {
> std::cout<< "ROOT file is created!"<< std::endl;
>
> rootFile -> Write();
> }
>
> void AnaRoot::BeginOfEvent(Int_t eventNum)
> {
> eventID = eventNum;
> }
>
> void AnaRoot::FillPrimaryVertex()
> {
> iqmdDataTree -> Fill();
> }
>
> void AnaRoot::FillTPC()
> {
> simulationDataTree -> Fill();
> }
> ----------------------------------------------------------------------------------------------------------------------------------
Received on Mon Aug 01 2011 - 20:46:16 CEST

This archive was generated by hypermail 2.2.0 : Mon Aug 01 2011 - 23:50:01 CEST