Z->BB Strip

Tcl files for 4.9.1_skim: StripZbbExe.tcl

#=============================================================================
# Z->bbar strip
#=============================================================================
#################################################################################
#   TCL file for stripping data for Z->bbbar analysis. 
#   The module StripZbb will be doing the selection of the events, 
#   Eventually DHOutput utilities can be  used to deselect certain 
#   storable objects to be written out.
#
#                                     J. Guimaraes da Costa -- Jul 23, 2002
###############################################################################
# 2002 Dec 03      Modified for 4.9.1  J. Guimaraes da Costa
#
#action off "Timer Action"
# Mosix = 1 turns off timer action
set Mosix             0

set test 0          ;# Testing the code?
set runSection       $env(SECTIONNUM)
set fset             $env(FSET)
set repFreq          1000

#if {$test == 1} then {set nevents 1000}
set outfile $env(OUTFILE)
set lumifile $env(LUMIFILE)

#=============================================================================
puts "CAF run section: $runSection"
puts "Fileset to be stripped: $fset"
#=============================================================================
# Setup the path
#=============================================================================
#path create StripZbbPath ManagerSequence Prereq
#path enable StripZbbPath
path enable AllPath
set outputPath "AllPath"
path list
show path
 
#=============================================================================
# Deal with input
#=============================================================================
module input DHInput
module talk  DHInput
  # Get e-stream starting on first run with Z->bbbar trigger
  #include dataset "ephysr" run>=0x22656
  include fileset $fset  
  #Reorder events 
  requireCatalog set true
  #Read event in by blocks
  #useBlockIO set true
  luminosityLog set $lumifile
  # Keep track of empty run sections
  rawRS set true
  cache set DCACHE
  #Timeout for waiting for the tape
  timeout set 600
  report set 1000
  statusFile set 100
  show include
exit

#=============================================================================
# Select trigger id
#=============================================================================
module enable Prereq
module talk Prereq
  L3TriggerNames set Z_BB
exit

#=============================================================================
# Deal with output
#=============================================================================
#module output DHOutput
#talk DHOutput
#   output create stream "ezbb1r"
#   output setstream stream nodfc 
#   output setstream stream pathname=/data/harv12/b/cdf/Data/Zbb/Skim
##   output setstream stream pathname=./
##   output create stream $outputFile
#   output paths stream $outputPath
#   output statistics
#   output list   
#   show
#exit
module output FileOutput
talk FileOutput
output create mystream $outfile
   output paths mystream $outputPath
   mystream
     fileSize set 1000000
   exit
   output statistics
   output list   
   show
exit

# First, print out path one more time into logfile
path list
#    and, list all modules to be used
module list
# Third, go for it!
if {$test == 0} then {begin} else {puts "Just testing. DO NOT PROCESS EVENTS."}
#   {begin -nev $nevents}

show 
show timer
exit

Maintained by Lester Miller lmiller@fnal.gov