Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Shell to utilix, move all RSE related codes to config.py #173

Merged
merged 1 commit into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions bin/outsource
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import argparse
import os
import pymongo
import numpy as np
from utilix import uconfig, xent_collection
from utilix.io import load_runlist
from utilix import xent_collection
from utilix.rundb import cmt_local_valid_range
import straxen
import cutax

from outsource.outsource import Outsource
from outsource.config import uconfig, DETECTOR_DTYPES
from outsource.config import DETECTOR_DTYPES


coll = xent_collection()
Expand Down Expand Up @@ -45,9 +45,7 @@ def data_find(
if number_to is not None:
max_run_number = min(number_to, max_run_number)

hashes = {key: val["hash"] for key, val in st.provided_dtypes().items()}

# setup queries for different detectors
# Setup queries for different detectors
basic_queries = []
basic_queries_w_raw = []
basic_queries_wo_to_process = []
Expand All @@ -57,7 +55,7 @@ def data_find(
print(f"Skipping {det} data")
continue

# check if gain model is valid
# Check if gain model is valid
if det == "tpc":
gain_model = "pmt_000_gain_xenonnt"
straxen_opt = "gain_model"
Expand Down Expand Up @@ -101,7 +99,7 @@ def data_find(
"host": "rucio-catalogue",
"type": dtype,
"status": "transferred",
"did": {"$regex": hashes[dtype]},
"did": {"$regex": st.key_for("0", dtype).lineage_hash},
}
}
}
Expand Down Expand Up @@ -288,7 +286,7 @@ def main():
if args.run and args.runlist:
raise RuntimeError("Cannot pass both --run and --runlist. Please choose one.")

# subset of runs to consider during data find
# Subset of runs to consider during data find
_runlist = None

if args.run:
Expand Down
6 changes: 3 additions & 3 deletions log_digest/log_digest.pl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
my @known_error_patterns = (
qr/(\bERROR\b.+)/,
);
# help message
# Help message
sub display_help {
print "Usage: $0 [options] <filename>\n";
print "Options:\n";
Expand All @@ -30,11 +30,11 @@ sub display_help {
my $args_string = join(" ", @ARGV);
print "\nDigesting: $args_string\n\n";

# initalization of hashes
# Initalization of hashes
my %errors = ();
my %headers = ();
my %known_error_stats = ();
# nuisance variables
# Nuisance variables
my $first_line = 1;
my $current_file = "0";

Expand Down
Loading