Skip to content

Commit

Permalink
Move Shell to utilix, move all RSE related codes to config.py (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
dachengx authored Sep 15, 2024
1 parent 8371899 commit 0f529b0
Show file tree
Hide file tree
Showing 11 changed files with 539 additions and 730 deletions.
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

0 comments on commit 0f529b0

Please sign in to comment.