#! /usr/bin/env python #======================= #standard for all script: import Sniper #at least a task should be created Algtask = Sniper.Task("Algtask") Algtask.setLogLevel(0) #======================= #task create algorithms which will run in order in processing event. #number of algrithms should be at least 1 import EventSelection alg = Algtask.createAlg("EventSelection/evtSel") #======================= #all the services declared below #Rec data input service import NtupleInputSvc iSvc = Algtask.createSvc("NtupleInputSvc/InputSvc") # ".../InputSvc" should be set as the name iSvc.property("InputStream").set({"/Event/RawEvent" : "Hist.root"}) import CoordTransSvc coorSvc=Algtask.createSvc("CoordTransSvc/CorSvc"); #memory management service import DataStoreMgr Algtask.createSvc("DataStoreMgr") #hitogram/ntuple output service import RootWriter rootSvc=Algtask.createSvc("RootWriter/hSvc") rootSvc.property("Output").set({"Fkey":"MoonShadow.root"}) #======================= #run the code Algtask.setEvtMax(100) Algtask.show() Algtask.run()