Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:15:16

0001 #!/bin/tcsh
0002 
0003 # This script parses output Fun4All macro logfiles and greps the tracking timing information from the logfiles
0004 # In order for the timing information to show up in your macro, you must have:
0005 # se->PrintTimer();
0006 # at the end of your Fun4All macro, which prints the timers for all modules
0007 # This script produces a txt file called time.txt which  the root macro AnalyzeTime.C is setup to parse
0008 # The script takes two arguments:
0009 # $0 the directory you want the output file to be produced in (e.g. $pwd)
0010 # $1 the directory where the logfiles you want to grep exist
0011 
0012 set globdot
0013 
0014 cd $1
0015 
0016 echo "start of time " > time.txt
0017 foreach infile ($2/*)
0018     # Checks for a file with .out structure
0019     if ("`echo ${infile} | cut -d'.' -f2`" == "out" ) then
0020      echo $infile
0021      grep -o 'MvtxClusterizer_TOP: per event time (ms):[^"]*' $infile >> time.txt
0022      grep -o 'InttClusterizer_TOP: per event time (ms):[^"]*' $infile >> time.txt
0023      grep -o 'TpcClusterizer_TOP: per event time (ms):[^"]*' $infile >> time.txt
0024      grep -o 'MicromegasClusterizer_TOP: per event time (ms):[^"]*' $infile >> time.txt
0025      grep -o 'PHMicromegasTpcTrackMatching_TOP: per event time (ms):[^"]*' $infile >> time.txt
0026      grep -o 'TpcClusterCleaner_TOP: per event time (ms):[^"]*' $infile >> time.txt
0027      grep -o 'PHActsSiliconSeeding_TOP: per event time (ms):[^"]*' $infile >> time.txt
0028      grep -o 'PHActsSiliconSeeding Acts seed time[^"]*' $infile >> time.txt
0029      grep -o 'PHCASeeding_TOP: per event time (ms):[^"]*' $infile >> time.txt
0030      grep -o 'PrePropagatorPHTpcTrackSeedCircleFit_TOP: per event time (ms):[^"]*' $infile >> time.txt
0031      grep -o 'PHSimpleKFProp_TOP: per event time (ms):[^"]*' $infile >> time.txt
0032      grep -o 'PHTpcTrackSeedCircleFit_TOP: per event time (ms):[^"]*' $infile >> time.txt
0033      grep -o 'PHSiliconTpcTrackMatching_TOP: per event time (ms):[^"]*' $infile >> time.txt
0034      grep -o 'PHActsTrkFitter_TOP: per event time (ms):[^"]*' $infile >> time.txt
0035      grep -o 'PHSimpleVertexFinder_TOP: per event time (ms):[^"]*' $infile >> time.txt
0036      grep -o 'PHActsVertexPropagator_TOP: per event time (ms):[^"]*' $infile >> time.txt
0037      grep -o 'PHTpcClusterMover_TOP: per event time (ms):[^"]*' $infile >> time.txt
0038      grep -o 'PHTpcDeltaZCorrection_TOP: per event time (ms):[^"]*' $infile >> time.txt
0039      grep -o 'PHTpcResiduals_TOP: per event time (ms):[^"]*' $infile >> time.txt
0040     endif
0041 end