ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/macros/examples/runSimpleExample.C
Revision: 1.3
Committed: Thu Jun 5 09:46:57 2008 UTC (16 years, 11 months ago) by loizides
Content type: text/plain
Branch: MAIN
Changes since 1.2: +5 -13 lines
Log Message:
Simplified macro

File Contents

# User Rev Content
1 loizides 1.3 // $Id: runSimpleExample.C,v 1.2 2008/06/03 07:21:28 paus 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 loizides 1.3 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 }