Skip to content

Instantly share code, notes, and snippets.

@VanyaBelyaev
VanyaBelyaev / DoNothing.py
Last active March 1, 2018 16:00
The first "do-nothing" Bender example
## 1) some user code :
def run ( nEvents ) :
for i in range( 0 , min( nEvents , 10 ) ) : print ' I run event %i ' % i
return 0
## 2) configuration step
def configure ( datafiles , catalogs = [] , castor = False , params = {} ) :
print 'I am configuration step!'
return 0
## 1) some user code :
def run ( nEvents ) :
for i in range( 0 , min( nEvents , 10 ) ) : print ' I run event %i ' % '
return 0
## 2) configuration step
def configure ( datafiles , catalogs = [] , castor = False , params = {} ) :
print 'I am configuration step!'
return 0
## 3) steer the job
if '__main__' == __name__ :
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# =============================================================================
## @file
# The most simple "do-nothing" Bender module
#
# This file is a part of
# <a href="http://cern.ch/lhcb-comp/Analysis/Bender/index.html">Bender project</a>
# <b>``Python-based Interactive Environment for Smart and Friendly
# Physics Analysis''</b>
from Bender.Main import setData, appMgr, SUCCESS
## The configuration of the job
def configure ( inputdata , ## the list of input files
catalogs = [] , ## xml-catalogs (filled by GRID)
castor = False , ## use the direct access to castor/EOS ?
params = {} ) :
## import DaVinci & configure it!
from Configurables import DaVinci
## delegate the actual configuration to DaVinci
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# =============================================================================
## @file DaVinciEx.py
#
# pure DaVinci in Bender
#
# This file is a part of
# <a href="http://cern.ch/lhcb-comp/Analysis/Bender/index.html">Bender project</a>
# <b>``Python-based Interactive Environment for Smart and Friendly
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# =============================================================================
## @file HelloWorld.py
#
# The standard 'Hello,world!'-example
#
# This file is a part of
# <a href="http://cern.ch/lhcb-comp/Analysis/Bender/index.html">Bender project</a>
# <b>``Python-based Interactive Environment for Smart and Friendly
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# =============================================================================
## @file HistosAndTuples.py
#
# Inspect particles from certain TES location and fill histograms and tuple
#
# This file is a part of
# <a href="http://cern.ch/lhcb-comp/Analysis/Bender/index.html">Bender project</a>
# <b>``Python-based Interactive Environment for Smart and Friendly
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# =============================================================================
## @file MakeB.py
#
# Make combinatorics and composed particle creation in Bender
#
# This file is a part of
# <a href="http://cern.ch/lhcb-comp/Analysis/Bender/index.html">Bender project</a>
# <b>``Python-based Interactive Environment for Smart and Friendly
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# =============================================================================
## @file Tuples2.py
#
# Enhanced functionality for n-tuples
#
# This file is a part of
# <a href="http://cern.ch/lhcb-comp/Analysis/Bender/index.html">Bender project</a>
# <b>``Python-based Interactive Environment for Smart and Friendly
Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome
LoKi LoKi
LoKi LoKi
LoKi Welcome to LoKi! LoKi
LoKi LoKi
LoKi (LOops & KInematics) LoKi
LoKi LoKi
LoKi Smart & Friendly C++ Physics Analysis Tool Kit LoKi