# Where are some Proof examples?

**URL:** <https://root-forum.cern.ch/t/where-are-some-proof-examples/2490>\
**Category:** ROOT\
**Created:** [October 5, 2005, 9:00pm UTC](https://root-forum.cern.ch/t/where-are-some-proof-examples/2490 "2005-10-05T21:00:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![smith277](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/bb73d2/32.png) [@smith277](https://root-forum.cern.ch/u/smith277)\
**Post date:** [October 5, 2005, 9:00pm UTC](https://root-forum.cern.ch/t/where-are-some-proof-examples/2490/1 "2005-10-05T21:00:41Z")

</div>

Hi,

I am trying to use Proof and find I have to do everything by trial and error because I cannot find any examples. Can some one point me to some examples?

For example, let’s say I simply wanted to count events passing my cuts and save thi sin some integer Int\_t Count. How do I get the Count from all of the slaves and combine them? Does Proof do any of this kind of thing? I do not understand this.

Alex

---

<div class="post-metadata">

**Author:** ![rdm](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/rdm/32/11082_2.png) [@rdm](https://root-forum.cern.ch/u/rdm)\
**Post date:** [October 6, 2005, 8:48am UTC](https://root-forum.cern.ch/t/where-are-some-proof-examples/2490/2 "2005-10-06T08:48:39Z")

</div>

Hi Alex,

I fully understand you frustration on the lack of examples. We are working on all these issues and more. To solve this problem the simplest and most straightforward solution is to make a small histogram in which you store the count in the slaves. On return to your client session the merged histogram will contain the summed partial histogram and you can get from the right bin your scalar value.

Cheers, Fons.

---

<div class="post-metadata">

**Author:** ![pfernandez](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/439d5e/32.png) [@pfernandez](https://root-forum.cern.ch/u/pfernandez)\
**Post date:** [January 24, 2008, 9:01am UTC](https://root-forum.cern.ch/t/where-are-some-proof-examples/2490/3 "2008-01-24T09:01:44Z")

</div>

It’s been more than two years since this topic exists, let’s reopen it 🙂

The thing is that I’m not a physicist (and don’t know any physicist that knows about proof) and I’m not able to create a nice and complete proof example to test all the clustering options and performance. I’ve tried so far with this:  
TProof \*proof = TProof::Open(“hepdc1”);  
TChain chain(“h42”);  
chain.Add("~/analisis/file1.root");  
chain-\>SetProof();  
chain-\>Draw(“theta”);  
But this is not a real example for analyzing. It would be nice to have a few hundred root files and a job that operates with them using proof.  
Does anybody know any resource like this? Maybe one of you have some testing samples with root files, I can open an ftp or something to get them, thanks.

---

<div class="post-metadata">

**Author:** ![jani](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/f475e1/32.png) [@jani](https://root-forum.cern.ch/u/jani)\
**Post date:** [January 24, 2008, 4:05pm UTC](https://root-forum.cern.ch/t/where-are-some-proof-examples/2490/4 "2008-01-24T16:05:32Z")

</div>

Hi,

Great. So you went through the basic example. Now you can use PROOF Bench to generate data… using PROOF workers.  
Look at the PROOF wiki: [root.cern.ch/twiki/bin/view/ROOT/ProofBench](http://root.cern.ch/twiki/bin/view/ROOT/ProofBench)

Let us know in case of any further problems.  
Good Luck,  
Jan
