ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/macros/examples/runSimpleExample.C
Revision: 1.5
Committed: Mon Jun 9 00:06:36 2008 UTC (16 years, 10 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: MITHEP_2_0_x
Changes since 1.4: +2 -2 lines
Log Message:
adherance to coding conventions, reverted ParticleExample, new full chain example

File Contents

# User Rev Content
1 bendavid 1.5 // $Id: runSimpleExample.C,v 1.4 2008/06/05 16:03:35 bendavid Exp $
2 loizides 1.1
3     #if !defined(__CINT__) || defined(__MAKECINT__)
4 loizides 1.3 #include <TROOT.h>
5 loizides 1.1 #include "MitAna/DataUtil/interface/Debug.h"
6     #include "MitAna/TreeMod/interface/ParticleExampleMod.h"
7     #include "MitAna/TreeMod/interface/Analysis.h"
8     #endif
9    
10 paus 1.2 //--------------------------------------------------------------------------------------------------
11 bendavid 1.5 void runSimpleExample(const char *files = "mit-gen_000.root")
12 loizides 1.1 {
13     using namespace mithep;
14 paus 1.2 gDebugMask = Debug::kAnalysis;
15     gDebugLevel = 1;
16 loizides 1.1
17 loizides 1.3 // set up the modules
18 loizides 1.1 ParticleExampleMod *mod = new ParticleExampleMod;
19    
20 paus 1.2 // set up analysis
21 loizides 1.1 Analysis *ana = new Analysis;
22     ana->SetSuperModule(mod);
23     ana->AddFile(files);
24 paus 1.2 ana->SetOutputName("mit-gen-hist.root");
25 loizides 1.1
26 paus 1.2 // run the analysis after successful initialisation
27 loizides 1.3 ana->Run(!gROOT->IsBatch());
28 loizides 1.1 }