Re: How to set the entry number of a TChain Obj?

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Mon, 13 Jul 2009 12:34:34 -0500


Hi,

The number of event in a chain is determine by its content.

The argument to Add is intended to be an helper to be able to 'know' the length of the chain without having to open the file, however this is number is superseded by the real information once the file is open.

You can control the number of event read using the parameter of the method/algorithm/technique you use to read the chain (I.e. for example look at the reference manual for TTree::Draw).

Cheers,
Philippe.

Bian JianMing wrote:
> Hi all:
> How to set the entry number of a TChain Obj?
> I want to read 100 events in the file aaa.root
> When i use chain.Add("aaa.root", 100);
> It seems all entries are read in the chain.
>
>
>
> With my best wishes,
>
> Bian Jianming
> Experimental Physics Center,
> Institute of High Energy Physics(IHEP),
> Chinese Academy of Sciences
> P.O.Box 918-1
> Beijing, 100049
> P.R.China
>
>
Received on Mon Jul 13 2009 - 19:34:40 CEST

This archive was generated by hypermail 2.2.0 : Tue Jul 14 2009 - 11:50:03 CEST