ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/macros/validation/runMCParticlesVal.C
Revision: 1.1
Committed: Tue Mar 17 15:48:07 2009 UTC (16 years, 1 month ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_008pre2
Log Message:
Test macro

File Contents

# User Rev Content
1 loizides 1.1 // $Id: runSimpleExample.C,v 1.9 2009/03/16 07:45:32 loizides Exp $
2    
3     #if !defined(__CINT__) || defined(__MAKECINT__)
4     #include <TROOT.h>
5     #include "MitAna/DataUtil/interface/Debug.h"
6     #include "MitAna/TreeMod/interface/Analysis.h"
7     #include "MitAna/Validation/interface/MCParticlesValMod.h"
8     #endif
9    
10     //--------------------------------------------------------------------------------------------------
11     void runMCParticlesVal(const char *files, UInt_t nev=0)
12     {
13     using namespace mithep;
14     gDebugMask = Debug::kAnalysis;
15     gDebugLevel = 1;
16    
17     MCParticlesValMod *mod = new MCParticlesValMod;
18    
19     // set up analysis
20     Analysis *ana = new Analysis;
21     ana->SetSuperModule(mod);
22     ana->AddFile(files);
23     ana->SetUseHLT(0);
24     if (nev>0)
25     ana->SetProcessNEvents(nev);
26     if (gROOT->IsBatch())
27     ana->SetOutputName("mcparticlesval.root");
28    
29     // run the analysis after successful initialisation
30     ana->Run(!gROOT->IsBatch());
31     }