ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/macros/examples/runSimpleExample.C
Revision: 1.11
Committed: Mon Apr 6 13:41:26 2009 UTC (16 years, 1 month ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_009c, Mit_009b, Mit_009a, Mit_009
Changes since 1.10: +2 -2 lines
Log Message:
fix

File Contents

# User Rev Content
1 loizides 1.11 // $Id: runSimpleExample.C,v 1.10 2009/03/23 14:56:32 loizides 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/Analysis.h"
7 loizides 1.8 #include "MitAna/PhysicsMod/interface/SimpleExampleMod.h"
8 loizides 1.1 #endif
9    
10 paus 1.2 //--------------------------------------------------------------------------------------------------
11 loizides 1.10 void runSimpleExample(const char *files = "mit-gen_000.root", Bool_t useHlt=0)
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.6 SimpleExampleMod *smod = new SimpleExampleMod;
18 loizides 1.1
19 paus 1.2 // set up analysis
20 loizides 1.1 Analysis *ana = new Analysis;
21 loizides 1.6 ana->SetSuperModule(smod);
22 loizides 1.1 ana->AddFile(files);
23 loizides 1.11 ana->SetUseHLT(useHlt);
24 loizides 1.6 if (gROOT->IsBatch())
25     ana->SetOutputName("mit-example-hist.root");
26    
27 paus 1.2 // run the analysis after successful initialisation
28 loizides 1.3 ana->Run(!gROOT->IsBatch());
29 loizides 1.1 }