Jpp  17.3.0-rc.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
qlib.sh File Reference

Go to the source code of this file.

Functions

function put_queue ()
 
function puts_queue ()
 
function queue ()
 

Function Documentation

function put_queue ( )

Definition at line 19 of file qlib.sh.

20 {
21  queue_name=$1
22  shift
23 
24  echo -n "$*;" >> $queue_name
25 }
then echo
const int n
Definition: JPolint.hh:697
function puts_queue ( )

Definition at line 34 of file qlib.sh.

35 {
36  queue_name=$1
37  shift
38 
39  echo "$*" >> $queue_name
40 }
then echo
function queue ( )

Definition at line 50 of file qlib.sh.

51 {
52  queue_name=$1
53  queue_size=$2
54  sleep_time=$3
55 
56  if [[ -e $queue_name ]]; then
57 
58  if [[ -p $queue_name ]]; then
59  fatal "Queue $queue_name in use."
60  fi
61  else
62 
63  mkfifo $queue_name # create a new FIFO
64  fi
65 
66  fd=7 # file descriptor
67 
68  eval "exec $fd<>$queue_name" # attach file descriptor to FIFO
69 
70  while read job <& $fd; do # read job from file descriptor
71 
72  if [[ -n $job ]]; then
73 
74  if [[ $job = "exit" ]]; then
75  break
76  fi
77 
78  notice "submit $job"
79  eval exec $job & # submit job
80 
81  # wait for free slot
82 
83  while (( ${#jobstates} >= $queue_size )); do
84  sleep $sleep_time
85  done
86  fi
87  done
88 
89  rm -f $queue_name # remove FIFO
90 }
std::istream & read(std::istream &in, JTestSummary &summary, const char delimiter= ' ')
Read test summary.
then usage $script[< detector identifier >< run range >]< QA/QCfile > nExample script to produce data quality plots nWhen a detector identifier and run range are data are downloaded from the database nand subsequently stored in the given QA QC file
Definition: JDataQuality.sh:19
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
Definition: JDataQuality.sh:76
const int n
Definition: JPolint.hh:697
then JCalibrateToT a
Definition: JTuneHV.sh:116
Q FIFO
Definition: JDataQuality.sh:61
esac done
Definition: JAddHDE.sh:21