I attached the source code that I used. I should warn you, it’s a pretty large amount of code and it’s not too well documented right now.
Edit: For some reason I can’t bloody attach the source to the posting. You can find it under /afs/cern.ch/user/k/krasznaa/public/sframe.tar.gz.
You should compile it by going into the SFrame directory, sourcing setup.[c]sh and executing make. (You have to set up your environment with one of the ROOT releases first of course.) This will give you 3 libraries and an executable (under SFrame/lib and SFrame/bin respectively). To run the code, go to the SFrame/user/config directory and execute “sframe_main FirstCycle_config.xml”.
Now some description: In this analysis framework the user has to write his/her analysis algorithm by creating a class inheriting from SCycleBase. Such an example “cycle” is the FirstCycle class. The idea is that SCycleBase provides a bunch of convenience functions on top of what you get from a vanilla TSelector. (At the same time it restricts a bit what you can do, but the aim here is to provide the framework for a physics analysis.)
SCycleBase is a pretty complicated class that inherits from TSelector. (There was a separate thread about its inheritance tree…) You can find the re-implemented functions of TSelector in the SCycleBaseExec class. The important functions for the creation of the TTree output of the FirstCycle class are:
The first one creates the output trees defined in the configuration XML, the second one adds a new branch to one of the output trees (it’s called from FirstCycle::BeginInputData(…)) and the last one fills the output tree(s) after processing each event.
I realise that the code is a bit too complicated to ask for help with it. If you’re willing to try to look at it, you should create the Doxygen documentation for the code. (Using the SFrame/Doxyfile configuration file.) Even though some of the documentation in not up to date in the code, it could still help.
So, this was how to run the code locally. If you want to try to run it on a PROOF cluster, you have to edit the FirstCycle_config.xml configuration file and change the following:
[ul]In the node change RunMode=“LOCAL” to RunMode=“PROOF”.
You’ll also have to change the path names in the nodes to the exact paths to the PAR packages created automatically at compilation. (They should be in your SFrame/lib directory, but the code can’t find them automatically at the moment.)
Lastly, you should change the value of ProofServer to the appropriate server name.[/ul]
Every time you run the application, it will produce two output files. (FirstCycle.Data1.root and FirstCycle.Data2.root) You should only look at the contents of FirstCycle.Data2.root. It will hold two simple histograms, a TTree called FirstCycleTree and a sub-directory with a single TGraph. (You can find how all these are created, in the FirstCycle.cxx source file.) If you look at the FirstCycle::ExecuteEvent(…) function, you’ll see that the contents of the El_p_T branch in the output TTree should be the same as the content of the El_p_T_hist histogram. But they’re not the same. The histogram looks just as it should, but when you plot the contents of the El_p_T branch, you’ll get the result that I posted as TSelector_local.png.
So, if anyone actually tries the code and has problems (which I expect you would, since the code is highly experimental), please contact me for help with it.