Skip to content

Instantly share code, notes, and snippets.

View ryuwd's full-sized avatar

Ryunosuke O'Neil ryuwd

View GitHub Profile
@ryuwd
ryuwd / cosmic_output_recotracks.fcl
Created August 31, 2020 20:28
example fcl to dump cosmic time fit reco products to file
# Ryunosuke O'Neil
# roneil@fnal.gov
# https://github.com/ryuwd
#
# Reconstruct Cosmic Track (Straight, no magnetic field)
# uses richie's cosmic time fit
# dumps all reco products from this art job to file, discards everything else
# READ ME: use tag "CosmicTrackFinderTimeFit" as the cosmic track seed collection tag
@ryuwd
ryuwd / Doxyfile
Created June 14, 2020 13:14
Doxyfile for Mu2e/Offline. Drop into the project root and run `doxygen`
# Doxyfile 1.8.18
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
#
# All text after a double hash (##) is considered a comment and is placed in
# front of the TAG it is preceding.
#
# All text after a single hash (#) is considered a comment and will be ignored.
# The format is:
@ryuwd
ryuwd / grid-accountjobs
Created May 15, 2020 13:16
Helper script to account for expected FermiGrid job outputs.
#!/bin/bash
# Ryunosuke O'Neil
# roneil@fnal.gov
# https://github.com/ryuwd
ORIGINAL_FCLLIST=$1
if [ -z $ORIGINAL_FCLLIST ]; then
echo "User didn't specify a fcl list. This is the list used for job submission"
@ryuwd
ryuwd / get-indentation.py
Last active March 15, 2020 20:48
short script to determine most common indent size
#!/usr/bin/env python3
import sys
import os
def get_indentation(line, indent_block):
if indent_block == 0:
return None
whitespace = line[:len(line) - len(line.lstrip())]
@ryuwd
ryuwd / Mu2eUtilities_times.txt
Last active February 18, 2020 23:35
Compile command execution times for Mu2eUtilities
Command execution time: Mu2eUtilities/src/BuildLinearFitMatrixSums.os: 2.660722 seconds
Command execution time: Mu2eUtilities/src/CaloHitMCNavigator.os: 2.588137 seconds
Command execution time: Mu2eUtilities/src/CoordinateString.os: 1.487854 seconds
Command execution time: Mu2eUtilities/src/EjectedProtonSpectrum.os: 0.479809 seconds
Command execution time: Mu2eUtilities/src/HistTrackSum.os: 2.042103 seconds
Command execution time: Mu2eUtilities/src/HelixTool.os: 5.193650 seconds
Command execution time: Mu2eUtilities/src/KalRepInstanceNameDecoder.os: 2.277055 seconds
Command execution time: Mu2eUtilities/src/LsqSums2.os: 0.607158 seconds
Command execution time: Mu2eUtilities/src/ConversionSpectrum.os: 8.075091 seconds
Command execution time: Mu2eUtilities/src/LsqSums4.os: 0.628755 seconds
@ryuwd
ryuwd / generate_compile_commands.py
Last active July 9, 2023 16:49
SCons Compilation DB (compile_commands.json) generator
# Ryunosuke O'Neil, 2019
# roneil@fnal.gov
# ryunosuke.oneil@postgrad.manchester.ac.uk
# create a compile_commands.json from scons.
# run with Offline as cwd and with mu2e set up correctly.
import os, json
def main():
@ryuwd
ryuwd / tmux.md
Created November 5, 2019 18:54 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a