my $data = Perl2Epics::GetAll();
my $maximum = 0;
my $total = 0;
+ my $updatemissing = 0;
for(my $i = 0; $i<16; $i++) {
my $val = $data->{"C".$i}->{"val"};
$total += $val || 0;
$maximum = max($maximum,$val||0);
HPlot::PlotAdd('PadiwaCurrents',$val,$i);
+ if (time - $data->{"C".$i}->{"tme"} > 240) {
+ $updatemissing = 1;
+ }
}
HPlot::PlotDraw('PadiwaCurrents');
my $value = sprintf("%.2fA / %.2fA", $maximum, $total);
my $longtext = "Maximum / Total current: ". $value;
my $status = Dmon::OK;
+
+ if ($updatemissing) {
+ $status = Dmon::WARN;
+ $longtext .="<br>Updates missing";
+ }
+
Dmon::WriteQALog($config{flog},"currents",30,$status,$title,$value,$longtext,'2-PadiwaCurrents');
while (1) {
my $o = trb_register_read_mem($config{PadiwaBroadcastAddress},0xc000,0,33);
-
+ my $sum = 0;
if (defined $old) {
foreach my $b (keys %$o) {
for my $v (0..32) {
my $fpga = $ChannelMapping::chanmap->{fpga}->[$x]->[$y];
my $channel = $ChannelMapping::chanmap->{chan}->[$x]->[$y];
HPlot::PlotFill('HeatmapRich',$diff->{$fpga}->[$channel],$x,$y);
+ $sum += $diff->{$fpga}->[$channel];
}
}
HPlot::PlotDraw('HeatmapRich');
}
my $status = Dmon::OK;
my $title = "Heatmap";
- my $value = "";
+ my $value = Dmon::SciNotation($sum);
my $longtext = "See plot";
Dmon::WriteQALog($config{flog},"heatmaprich",5,$status,$title,$value,$longtext,'1-HeatmapRich');
$old = $o;
use Time::HiRes qw(time usleep);
use Log::Log4perl qw(get_logger);
use List::Util qw(min max);
+use POSIX qw(strftime);
use HADES::TrbNet;
# use IPC::ShareLite qw( :lock );
my $str;
+$logger_data->info(time);
foreach my $i (0..15) {
$logger_data->info(sprintf "endpoint: 0x%04x, chain: %02d, channel: %2d threshold: 0x%04x, uid: %s", $endpoint, $chain, $i, $best_thresh[$i], $uid );
}
use strict;
use warnings;
use Data::Dumper;
-
use Dmon;
-
use Getopt::Long;
-
use HADES::TrbNet;
+use POSIX qw(strftime);
my $offset = 0;
my $help;
open(my $fh, "<$ARGV[0]" || die "could not open file '$ARGV[0]'");
-
my @f = <$fh>;
+#Put Information to logfile and timestamp to billboard information
+chomp $f[0];
+system("echo ".time.' '.strftime("%Y-%m-%d %H:%M:%S",localtime()).' '." $f[0]>>threshold_log.txt");
+my ($t) = $f[0] =~ /(\d{10})/;
+system("echo $t>billboard_info");
+
+exit;
my $count=0;
foreach my $cl (@f) {
(my $ep, my $chain, my $channel, my $thresh, my $uid) =
currently only mode "padiwa" is implemented.
+The script puts a timestamp of execution and the timestamp of the thresholds file to threshold_log.txt.
+The script puts the timestamp of the threshold file to billboard_info.
+
EOF
}
#Scripts to start & order of icons in the Overview
activeScripts => [['time','ping','-','-','daqop'],
['numfee','temperature','reftime','billboard','mbs'],
- ['beamintensity','beammonitors','-','-','richenvironment'],
+ ['beamintensity','beammonitors','-','richhvres','richenvironment'],
['trgrate','datarate','deadtime','-','-'],
['heatmaprich','padiwatemp','padiwaonline','currents','pscurrents'],
['cbmnetlink','cbmnetdata','cbmnetsync','-','-']],
cd $tmpdir
- exec uxterm -fg black -bg khaki -geometry 120x20+0+45 -e "/home/hadaq/bin/daq_evtbuild -m 17 -o ${dest} -x ${pref} -I 1 --ebnum 1 -q 32 -S test -d file \
+ exec uxterm -fg black -bg khaki -geometry 120x20+0+45 -e "/home/hadaq/bin/daq_evtbuild -m 17 -o ${dest} -x ${pref} -I 1 --ebnum 1 -q 32 -S test -d file --filesize 512 \
${extraopts}; read; bash" &
+++ /dev/null
-0xdeadcode
\ No newline at end of file
-201411160018.thr
\ No newline at end of file
+201411161747.thr
\ No newline at end of file
2014/10/20 00:00:00 endpoint: 0x0113, chain: 00, channel: 01 threshold: 0x0000, uid: 0
2014/10/20 00:00:00 endpoint: 0x0113, chain: 00, channel: 02 threshold: 0xffff, uid: 0
2014/10/20 00:00:00 endpoint: 0x0113, chain: 00, channel: 03 threshold: 0x0000, uid: 0
-2014/10/20 00:00:00 endpoint: 0x0113, chain: 00, channel: 04 threshold: 0x0942, uid: 0
+2014/10/20 00:00:00 endpoint: 0x0113, chain: 00, channel: 04 threshold: 0x073E, uid: 0
2014/10/20 00:00:00 endpoint: 0x0113, chain: 00, channel: 05 threshold: 0xD511, uid: 0
2014/10/20 00:00:00 endpoint: 0x0113, chain: 00, channel: 06 threshold: 0xffff, uid: 0
2014/10/20 00:00:00 endpoint: 0x0113, chain: 00, channel: 07 threshold: 0x0000, uid: 0