]> jspc29.x-matter.uni-frankfurt.de Git - hadesdaq.git/commitdiff
update hmon scripts
authorJan Michel <jan@mueschelsoft.de>
Fri, 8 Jun 2018 18:04:43 +0000 (20:04 +0200)
committerJan Michel <jan@mueschelsoft.de>
Fri, 8 Jun 2018 18:04:43 +0000 (20:04 +0200)
15 files changed:
hmon/QA.pm
hmon/getjson.cgi
hmon/hmon_adcvolt.pl
hmon/hmon_busynew.pl
hmon/hmon_endpoints.pl
hmon/hmon_readoutstuck.pl
hmon/hmon_rich_temp_backplane.pl
hmon/hmon_richrate.pl [new file with mode: 0755]
hmon/index.cgi
hmon/permanent/hmon_hub.pl [changed mode: 0644->0755]
hmon/permanent/hmon_mdcpressure.pl
hmon/permanent/hmon_richhv.pl
hmon/rich_drawing.htm
hmon/rich_drawing_bkpl.htm
hmon/start.sh

index 9480cf7b2c361c4a7a45003c0b57d377ba7a179c..33026103bafd95f47fee0b24366c47db859774d9 100644 (file)
@@ -76,6 +76,7 @@ our @MdcOepLimits     = (372, 372-1, 372-3);
 our @MdcVoltageLimits = (50, 60, 100);
 our @MdcLockLimits    = (0, 3, 5);
 our @MdcTempLimits    = (75, 80, 85);
+our @RichInnerTempLimits = (29,30,31);
 our @TrgErrLimits     = (100, 1000, 10000);
 our @CPULimits        = (95, 100, 100);
 our @TimeoutLimits    = (0, 0, 1);
@@ -106,7 +107,7 @@ use constant {CTSAddress => 0x0003};
 #  Missing Boards
 ###############################################################################
 
-our @mdc_boards_removed =(); #(0x2257, 0x2029); # 2233 added 2014-08-28 , 2203 at 2014/09/03, 2029 2014/09/23
+our @mdc_boards_removed =(0x221a); #(0x2257, 0x2029); # 2233 added 2014-08-28 , 2203 at 2014/09/03, 2029 2014/09/23
 our @mdc_chambers_removed =();
 our @rich_boards_removed =();
 our @tof_boards_removed =();
index 2ef3ae32a3223384b26c160cbfd8b086573b0cd3..ce49503cd281e620918bd5ea0adab897d5613281 100755 (executable)
@@ -5,12 +5,22 @@ use Data::Dumper;
 use File::Copy;
 my @args = split('-',$ENV{'QUERY_STRING'});
 
-# unless($args[0] =~ m/\w+/) {exit;}
 
-print "Cache-Control: no-cache, must-revalidate, max-age=1\r\n";
-print "Expires: Thu, 01 Dec 1994 16:00:00 GMT\r\n";
-print "Content-type: application/json\r\n\r\n";
 
-system ("cat /srv/www/htdocs/mon/files/".$args[0].".json");
-                       
-               
+
+if($args[0] eq 'custom') {
+  
+  my @query = split('-',$ENV{'QUERY_STRING'},2);
+
+  system("QUERY_STRING=$query[1] /home/hadaq/trbsoft/daqtools/web/htdocs/tools/daq2json.pl");
+        
+
+  }
+else {  
+  print "Cache-Control: no-cache, must-revalidate, max-age=1\r\n";
+  print "Expires: Thu, 01 Dec 1994 16:00:00 GMT\r\n";
+  print "Content-type: application/json\r\n\r\n";
+  unless($args[0] && $args[0] =~ m/\w+/) {exit;}
+  system ("cat /srv/www/htdocs/mon/files/".$args[0].".json")  if -e "/srv/www/htdocs/mon/files/".$args[0].".json";
+  }
+
index c2821aaf41cd96dbfcbe2007706f4a32c5f28897..3d01125422e96badaab3d4aa4a5f35f6d67883bf 100755 (executable)
@@ -306,8 +306,8 @@ while(1) {
   my $updatetime = sprintf("%03s, %02d %s %04d  -  %02d:%02d:%02d",$days[$wday], $mday, $months[$mon], 1900 + $year, $hour, $minute, $sec);
   
   
-  $dirich1V->{min} = 1100;
-  $dirich1V->{max} = 1400;
+  $dirich1V->{min} = 1160;
+  $dirich1V->{max} = 1350;
   $dirich1V->{symbol} = 'mV';
   $dirich1V->{title} = 'RICH 1.1V';
   $dirich1V->{updatetime} = $updatetime;
@@ -317,8 +317,8 @@ while(1) {
   print $fh   encode_json($dirich1V);
   close $fh;
               
-  $dirich2V5->{min} = 2500;
-  $dirich2V5->{max} = 2800;
+  $dirich2V5->{min} = 2560;
+  $dirich2V5->{max} = 2700;
   $dirich2V5->{symbol} = 'mV';
   $dirich2V5->{title} = 'RICH 2.5V';
   
index 745e67c85187489002b50b878e0ebf55624e56ae..f31038750a326cf850cd2bfdb4bf3086d08d3471 100755 (executable)
@@ -177,7 +177,7 @@ while (1) {
       my $msgstr = sprintf("%3.1f%%",$maxpercent);
       my $qastate = QA::OK;
       $qastate = QA::ERROR if ($maxpercent > 99);
-      QA::WriteQALog($fqa,"daq","busy",5,$qastate,"Busy",$msgstr,"");      
+      QA::WriteQALog($fqa,"daq","busy",5,$qastate,"Busy",$msgstr,"") unless  ($maxpercent > 99);      
       }
     }
 
index 44bf7f3d6712d690138347ef7c0df1fb673ed5d8..c9fcd8ad84fab29ffdd06e1ffd4b170b12b9fae0 100755 (executable)
@@ -81,59 +81,84 @@ while(1) {
 
     my @rich_boards =(0x8017,0x8018,
         0x83c0,0x83c1,0x83c2,0x83c3,0x83c4,0x83c5,0x83c6,0x83c7,0x83c8,0x83c9,0x83ca,0x83cb,
-    0x7000,0x7001,0x7010,0x7011,0x7020,0x7021,0x7030,0x7031,0x7040,0x7041,0x7050,0x7051,0x7060,0x7061,0x7070,0x7071,0x7080,0x7081,0x7090,0x7091,0x70a0,0x70a1,0x70b0,0x70b1,
-    0x7100,0x7101,0x7110,0x7111,0x7120,0x7121,0x7130,0x7131,0x7140,0x7141,0x7150,0x7151,0x7160,0x7161,0x7170,0x7171,0x7180,0x7181,0x7190,0x7191,0x71a0,0x71a1,0x71b0,0x71b1,
-    0x7200,0x7201,0x7210,0x7211,0x7220,0x7221,0x7230,0x7231,0x7240,0x7241,0x7250,0x7251,0x7260,0x7261,0x7270,0x7271,0x7280,0x7281,0x7290,0x7291,0x72a0,0x72a1,0x72b0,0x72b1,
-    0x7300,0x7301,0x7310,0x7311,0x7320,0x7321,0x7330,0x7331,0x7340,0x7341,0x7350,0x7351,0x7360,0x7361,0x7370,0x7371,0x7380,0x7381,0x7390,0x7391,0x73a0,0x73a1,0x73b0,0x73b1,
+    0x7010,0x7011,0x7020,0x7021,0x7030,0x7031,0x7040,0x7041,0x7050,0x7051,0x7060,0x7061,
+    0x7100,0x7101,0x7110,0x7111,0x7120,0x7121,0x7130,0x7131,0x7140,0x7141,0x7150,0x7151,0x7160,0x7161,0x7170,0x7171,0x7180,0x7181,0x7190,0x7191,
+    0x7200,0x7201,0x7210,0x7211,0x7220,0x7221,0x7230,0x7231,0x7240,0x7241,0x7250,0x7251,0x7260,0x7261,0x7270,0x7271,0x7280,0x7281,0x7290,0x7291,
+    0x7300,0x7301,0x7310,0x7311,0x7320,0x7321,0x7330,0x7331,0x7340,0x7341,0x7350,0x7351,0x7360,0x7361,0x7370,0x7371,0x7380,0x7381,0x7390,0x7391,
     0x7400,0x7401,0x7410,0x7411,0x7420,0x7421,0x7430,0x7431,0x7440,0x7441,0x7450,0x7451,0x7460,0x7461,0x7470,0x7471,0x7480,0x7481,0x7490,0x7491,
     0x7500,0x7501,0x7510,0x7511,0x7520,0x7521,0x7530,0x7531,0x7540,0x7541,0x7550,0x7551,0x7560,0x7561,0x7570,0x7571,0x7580,0x7581,0x7590,0x7591,
     0x7600,0x7601,0x7610,0x7611,0x7620,0x7621,0x7630,0x7631,0x7640,0x7641,0x7650,0x7651,0x7660,0x7661,0x7670,0x7671,0x7680,0x7681,0x7690,0x7691,
-    0x7700,0x7701,0x7710,0x7711,0x7720,0x7721,0x7730,0x7731,0x7740,0x7741,0x7750,0x7751,0x7760,0x7761,0x7770,0x7771,
-    0x7800,0x7801,0x7810,0x7811,0x7820,0x7821,0x7830,0x7831,0x7840,0x7841,0x7850,0x7851,0x7860,0x7861,0x7870,0x7871,
+    0x7700,0x7701,0x7710,0x7711,0x7720,0x7721,0x7730,0x7731,0x7740,0x7741,0x7750,0x7751,
+    0x7800,0x7801,0x7810,0x7811,0x7820,0x7821,0x7830,0x7831,0x7840,0x7841,0x7850,0x7851,
     0x7900,0x7901,0x7910,0x7911,0x7920,0x7921,0x7930,0x7931,0x7940,0x7941,0x7950,0x7951,
-    0x7a00,0x7a01,0x7a10,0x7a11,0x7a20,0x7a21,0x7a30,0x7a31,
-    0x7b00,0x7b01,0x7b10,0x7b11,0x7b20,0x7b21,0x7b30,0x7b31,
-    0x7002,0x7003,0x7012,0x7013,0x7022,0x7023,0x7032,0x7033,0x7042,0x7043,0x7052,0x7053,0x7062,0x7063,0x7072,0x7073,0x7082,0x7083,0x7092,0x7093,0x70a2,0x70a3,0x70b2,0x70b3,
+    0x7a10,0x7a11,0x7a20,0x7a21,0x7a30,0x7a31,
+    0x7b10,0x7b11,0x7b20,0x7b21,0x7b30,0x7b31,
+    
+    0x7012,0x7013,0x7022,0x7023,0x7032,0x7033,0x7042,0x7043,0x7052,0x7053,0x7062,0x7063,0x7072,0x7073,0x7082,0x7083,0x7092,0x7093,
     0x7102,0x7103,0x7112,0x7113,0x7122,0x7123,0x7132,0x7133,0x7142,0x7143,0x7152,0x7153,0x7162,0x7163,0x7172,0x7173,0x7182,0x7183,0x7192,0x7193,0x71a2,0x71a3,0x71b2,0x71b3,
     0x7202,0x7203,0x7212,0x7213,0x7222,0x7223,0x7232,0x7233,0x7242,0x7243,0x7252,0x7253,0x7262,0x7263,0x7272,0x7273,0x7282,0x7283,0x7292,0x7293,0x72a2,0x72a3,0x72b2,0x72b3,
     0x7302,0x7303,0x7312,0x7313,0x7322,0x7323,0x7332,0x7333,0x7342,0x7343,0x7352,0x7353,0x7362,0x7363,0x7372,0x7373,0x7382,0x7383,0x7392,0x7393,0x73a2,0x73a3,0x73b2,0x73b3,
     0x7402,0x7403,0x7412,0x7413,0x7422,0x7423,0x7432,0x7433,0x7442,0x7443,0x7452,0x7453,0x7462,0x7463,0x7472,0x7473,0x7482,0x7483,0x7492,0x7493,
     0x7502,0x7503,0x7512,0x7513,0x7522,0x7523,0x7532,0x7533,0x7542,0x7543,0x7552,0x7553,0x7562,0x7563,0x7572,0x7573,0x7582,0x7583,0x7592,0x7593,
     0x7602,0x7603,0x7612,0x7613,0x7622,0x7623,0x7632,0x7633,0x7642,0x7643,0x7652,0x7653,0x7662,0x7663,0x7672,0x7673,0x7682,0x7683,0x7692,0x7693,
-    0x7702,0x7703,0x7712,0x7713,0x7722,0x7723,0x7732,0x7733,0x7742,0x7743,0x7752,0x7753,0x7762,0x7763,0x7772,0x7773,
-    0x7802,0x7803,0x7812,0x7813,0x7822,0x7823,0x7832,0x7833,0x7842,0x7843,0x7852,0x7853,0x7862,0x7863,0x7872,0x7873,
+    0x7702,0x7703,0x7712,0x7713,0x7722,0x7723,0x7732,0x7733,0x7742,0x7743,0x7752,0x7753,
+    0x7802,0x7803,0x7812,0x7813,0x7822,0x7823,0x7832,0x7833,0x7842,0x7843,0x7852,0x7853,
     0x7902,0x7903,0x7912,0x7913,0x7922,0x7923,0x7932,0x7933,0x7942,0x7943,0x7952,0x7953,
-    0x7a02,0x7a03,0x7a12,0x7a13,0x7a22,0x7a23,0x7a32,0x7a33,
-    0x7b02,0x7b03,0x7b12,0x7b13,0x7b22,0x7b23,0x7b32,0x7b33,
-    0x7004,0x7005,0x7014,0x7015,0x7024,0x7025,0x7034,0x7035,0x7044,0x7045,0x7054,0x7055,0x7064,0x7065,0x7074,0x7075,0x7084,0x7085,0x7094,0x7095,0x70a4,0x70a5,0x70b4,0x70b5,
+    0x7a12,0x7a13,0x7a22,0x7a23,0x7a32,0x7a33,
+    0x7b12,0x7b13,0x7b22,0x7b23,0x7b32,0x7b33,
+    
+    0x7014,0x7015,0x7024,0x7025,0x7034,0x7035,0x7044,0x7045,0x7054,0x7055,0x7064,0x7065,0x7074,0x7075,0x7084,0x7085,0x7094,0x7095,
     0x7104,0x7105,0x7114,0x7115,0x7124,0x7125,0x7134,0x7135,0x7144,0x7145,0x7154,0x7155,0x7164,0x7165,0x7174,0x7175,0x7184,0x7185,0x7194,0x7195,0x71a4,0x71a5,0x71b4,0x71b5,
     0x7204,0x7205,0x7214,0x7215,0x7224,0x7225,0x7234,0x7235,0x7244,0x7245,0x7254,0x7255,0x7264,0x7265,0x7274,0x7275,0x7284,0x7285,0x7294,0x7295,0x72a4,0x72a5,0x72b4,0x72b5,
     0x7304,0x7305,0x7314,0x7315,0x7324,0x7325,0x7334,0x7335,0x7344,0x7345,0x7354,0x7355,0x7364,0x7365,0x7374,0x7375,0x7384,0x7385,0x7394,0x7395,0x73a4,0x73a5,0x73b4,0x73b5,
     0x7404,0x7405,0x7414,0x7415,0x7424,0x7425,0x7434,0x7435,0x7444,0x7445,0x7454,0x7455,0x7464,0x7465,0x7474,0x7475,0x7484,0x7485,0x7494,0x7495,
     0x7504,0x7505,0x7514,0x7515,0x7524,0x7525,0x7534,0x7535,0x7544,0x7545,0x7554,0x7555,0x7564,0x7565,0x7574,0x7575,0x7584,0x7585,0x7594,0x7595,
     0x7604,0x7605,0x7614,0x7615,0x7624,0x7625,0x7634,0x7635,0x7644,0x7645,0x7654,0x7655,0x7664,0x7665,0x7674,0x7675,0x7684,0x7685,0x7694,0x7695,
-    0x7704,0x7705,0x7714,0x7715,0x7724,0x7725,0x7734,0x7735,0x7744,0x7745,0x7754,0x7755,0x7764,0x7765,0x7774,0x7775,
-    0x7804,0x7805,0x7814,0x7815,0x7824,0x7825,0x7834,0x7835,0x7844,0x7845,0x7854,0x7855,0x7864,0x7865,0x7874,0x7875,
+    0x7704,0x7705,0x7714,0x7715,0x7724,0x7725,0x7734,0x7735,0x7744,0x7745,0x7754,0x7755,
+    0x7804,0x7805,0x7814,0x7815,0x7824,0x7825,0x7834,0x7835,0x7844,0x7845,0x7854,0x7855,
     0x7904,0x7905,0x7914,0x7915,0x7924,0x7925,0x7934,0x7935,0x7944,0x7945,0x7954,0x7955,
-    0x7a04,0x7a05,0x7a14,0x7a15,0x7a24,0x7a25,0x7a34,0x7a35,
-    0x7b04,0x7b05,0x7b14,0x7b15,0x7b24,0x7b25,0x7b34,0x7b35,
-    0x7006,0x7007,0x7016,0x7017,0x7026,0x7027,0x7036,0x7037,0x7046,0x7047,0x7056,0x7057,0x7066,0x7067,0x7076,0x7077,0x7086,0x7087,0x7096,0x7097,0x70a6,0x70a7,0x70b6,0x70b7,
-    0x7106,0x7107,0x7116,0x7117,0x7126,0x7127,0x7136,0x7137,0x7146,0x7147,0x7156,0x7157,0x7166,0x7167,0x7176,0x7177,0x7186,0x7187,0x7196,0x7197,0x71a6,0x71a7,0x71b6,0x71b7,
-    0x7206,0x7207,0x7216,0x7217,0x7226,0x7227,0x7236,0x7237,0x7246,0x7247,0x7256,0x7257,0x7266,0x7267,0x7276,0x7277,0x7286,0x7287,0x7296,0x7297,0x72a6,0x72a7,0x72b6,0x72b7,
-    0x7306,0x7307,0x7316,0x7317,0x7326,0x7327,0x7336,0x7337,0x7346,0x7347,0x7356,0x7357,0x7366,0x7367,0x7376,0x7377,0x7386,0x7387,0x7396,0x7397,0x73a6,0x73a7,0x73b6,0x73b7,
+    0x7a14,0x7a15,0x7a24,0x7a25,0x7a34,0x7a35,
+    0x7b14,0x7b15,0x7b24,0x7b25,0x7b34,0x7b35,
+    
+    0x7016,0x7017,0x7026,0x7027,0x7036,0x7037,0x7046,0x7047,0x7056,0x7057,0x7066,0x7067,
+    0x7106,0x7107,0x7116,0x7117,0x7126,0x7127,0x7136,0x7137,0x7146,0x7147,0x7156,0x7157,0x7166,0x7167,0x7176,0x7177,0x7186,0x7187,0x7196,0x7197,
+    0x7206,0x7207,0x7216,0x7217,0x7226,0x7227,0x7236,0x7237,0x7246,0x7247,0x7256,0x7257,0x7266,0x7267,0x7276,0x7277,0x7286,0x7287,0x7296,0x7297,
+    0x7306,0x7307,0x7316,0x7317,0x7326,0x7327,0x7336,0x7337,0x7346,0x7347,0x7356,0x7357,0x7366,0x7367,0x7376,0x7377,0x7386,0x7387,0x7396,0x7397,
     0x7406,0x7407,0x7416,0x7417,0x7426,0x7427,0x7436,0x7437,0x7446,0x7447,0x7456,0x7457,0x7466,0x7467,0x7476,0x7477,0x7486,0x7487,0x7496,0x7497,
     0x7506,0x7507,0x7516,0x7517,0x7526,0x7527,0x7536,0x7537,0x7546,0x7547,0x7556,0x7557,0x7566,0x7567,0x7576,0x7577,0x7586,0x7587,0x7596,0x7597,
     0x7606,0x7607,0x7616,0x7617,0x7626,0x7627,0x7636,0x7637,0x7646,0x7647,0x7656,0x7657,0x7666,0x7667,0x7676,0x7677,0x7686,0x7687,0x7696,0x7697,
-    0x7706,0x7707,0x7716,0x7717,0x7726,0x7727,0x7736,0x7737,0x7746,0x7747,0x7756,0x7757,0x7766,0x7767,0x7776,0x7777,
-    0x7806,0x7807,0x7816,0x7817,0x7826,0x7827,0x7836,0x7837,0x7846,0x7847,0x7856,0x7857,0x7866,0x7867,0x7876,0x7877,
+    0x7706,0x7707,0x7716,0x7717,0x7726,0x7727,0x7736,0x7737,0x7746,0x7747,0x7756,0x7757,
+    0x7806,0x7807,0x7816,0x7817,0x7826,0x7827,0x7836,0x7837,0x7846,0x7847,0x7856,0x7857,
     0x7906,0x7907,0x7916,0x7917,0x7926,0x7927,0x7936,0x7937,0x7946,0x7947,0x7956,0x7957,
-    0x7a06,0x7a07,0x7a16,0x7a17,0x7a26,0x7a27,0x7a36,0x7a37,
-    0x7b06,0x7b07,0x7b16,0x7b17,0x7b26,0x7b27,0x7b36,0x7b37,
-    0x8204,0x8205,0x8206,0x8211,0x8212,0x8213,0x8214,0x8215,0x8216,0x8217,0x8218,0x8221,0x8222,0x8223,0x8224,0x8225,0x8226,0x8227,0x8228,0x8229,
-    0x8231,0x8239,0x8240,0x8241,0x8242,0x8243,0x8244,0x8245,0x8246,0x8247,0x8248,0x8249,0x824a,0x8250,0x8251,0x8252,0x8254,0x8256,0x8258,0x8259,0x825a,
-    0x8260,0x8261,0x8262,0x8263,0x8264,0x8265,0x8266,0x8267,0x8268,0x8269,0x826a,0x8271,0x8279,0x8281,0x8282,0x8283,0x8284,0x8285,0x8286,0x8287,0x8288,0x8289,
-    0x8291,0x8292,0x8293,0x8294,0x8295,0x8296,0x8297,0x8298,0x82a4,0x82a5,0x82a6
-      );
+    0x7a16,0x7a17,0x7a26,0x7a27,0x7a36,0x7a37,
+    0x7b16,0x7b17,0x7b26,0x7b27,0x7b36,0x7b37,
+    
+    0x8204,0x8206,0x8212,0x8213,0x8214,0x8215,0x8216,0x8217,0x8221,0x8222,0x8223,0x8224,0x8225,0x8226,0x8227,0x8228,0x8229,
+    0x8231,0x8239,0x8241,0x8242,0x8243,0x8244,0x8245,0x8246,0x8247,0x8248,0x8249,0x824a,0x8252,0x8254,0x8256,0x8258,0x8259,
+    0x8261,0x8262,0x8263,0x8264,0x8265,0x8266,0x8267,0x8268,0x8269,0x826a,0x8271,0x8279,0x8281,0x8282,0x8283,0x8284,0x8285,0x8286,0x8287,0x8288,0x8289,
+    0x8292,0x8293,0x8294,0x8295,0x8296,0x8297,0x82a4,0x82a6,
+    
+    #quadratic bkpl
+    #0x8211,0x8250,0x8291,0x82a5,0x8298,0x825a,0x8218,0x8205,
+    #0x7860,0x7861,0x7870,0x7871,0x7760,0x7761,0x7770,0x7771,
+    #0x70a6,0x70a7,0x70b6,0x70b7,0x70a0,0x70a1,0x70b0,0x70b1,
+    #0x7a00,0x7a01,0x7b00,0x7b01,0x70a4,0x70a5,0x70b4,0x70b5,
+    #0x7864,0x7865,0x7874,0x7875,0x7764,0x7765,0x7774,0x7775,
+    #0x7b04,0x7b05,0x7a04,0x7a05,0x7b06,0x7b07,0x7a06,0x7a07,
+    #0x7a02,0x7a03,0x7b02,0x7b03,0x70a2,0x70a3,0x70b2,0x70b3,
+    #0x7762,0x7763,0x7772,0x7773,0x7862,0x7863,0x7872,0x7873,
+    #0x7766,0x7767,0x7776,0x7777,0x7866,0x7867,0x7876,0x7877, 
+    
+    #0x7000,0x7001,0x7002,0x7003,0x7004,0x7005,0x7006,0x7007, §in the beamline?
+    
+    #bkpl not equipped yet
+    #0x8251,0x8260,0x8240,
+    #0x71a6,0x71a7,0x71b6,0x71b7,0x71a0,0x71a1,0x71b0,0x71b1,
+    #0x72a6,0x72a7,0x72b6,0x72b7,0x72a0,0x72a1,0x72b0,0x72b1,
+    #0x73a6,0x73a7,0x73b6,0x73b7,0x73a0,0x73a1,0x73b0,0x73b1,
+    #0x7076,0x7077,0x7086,0x7087,0x7096,0x7097,
+    #0x7070,0x7071,0x7080,0x7081,0x7090,0x7091,
+    );
     
     my @tof_boards =(0x4c00,0x4c10,0x4c20,0x4c30,0x4c31,0x4c40,0x4c50,0x8600,0x8601,0x4800,0x4801,0x4802,0x4803,0x4810,0x4811,0x4812,0x4813,0x4820,0x4821,0x4822,
                     0x4823,0x4830,0x4831,0x4832,0x4833,0x4840,0x4841,0x4842,0x4843,0x4850,0x4851,
index 9a2678e95acb0858861d7cb9484256f5b7986328..3236779668c8c8a3188f5ffafce1c0b7af53cada 100755 (executable)
@@ -18,7 +18,10 @@ Hmon::TraceDBLoad();
 
 sub isFeeHub {
   my $h = shift;
-  my $hubs = "3200 3210 3220 3230 3240 3250 8301 8311 8321 8401 8411 8601 8701 8801";
+  my $hubs = "8401 8411 8601 8701 8801 0x8204,0x8206,0x8212,0x8213,0x8214,0x8215,0x8216,0x8217,0x8221,0x8222,0x8223,0x8224,0x8225,0x8226,0x8227,0x8228,0x8229,
+    0x8231,0x8239,0x8240,0x8241,0x8242,0x8243,0x8244,0x8245,0x8246,0x8247,0x8248,0x8249,0x824a,0x8251,0x8252,0x8254,0x8256,0x8258,0x8259,
+    0x8260,0x8261,0x8262,0x8263,0x8264,0x8265,0x8266,0x8267,0x8268,0x8269,0x826a,0x8271,0x8279,0x8281,0x8282,0x8283,0x8284,0x8285,0x8286,0x8287,0x8288,0x8289,
+    0x8292,0x8293,0x8294,0x8295,0x8296,0x8297,0x82a4,0x82a6, 8a00 8a01 8a02 8a03 8a04 8a05 ";
   my $hs = sprintf("%04x",$h);
 #   print $h."\n";
   if (index($hubs,$hs) != -1) {
index 8eebc01474ea26a6741ab998b8aa837793824659..18fbe2eb620ce0a2f976f8b5b5d0612fbe4553ca 100755 (executable)
@@ -81,7 +81,7 @@ while (1) {
   
   #-------Interlock workaround-------#
   #var $Interlock = 0;
-  if ($max > 31.0 ) {
+  if ($max > 38.0 ) {
     #printf  "Off\n";
     #my $s = sprintf("HADES:RICH:HV:CR1:0:1000:PowerOn");
     my $s = sprintf("HAD:RICH:PS:17:SETONOFF");
@@ -93,9 +93,9 @@ while (1) {
   #-------Interlock workaround-------#
   
 
-  my $qastate = QA::GetQAState('below', $max, @QA::MdcTempLimits);
+  my $qastate = QA::GetQAState('below', $max, @QA::RichInnerTempLimits);
   
-  #my $qastate_interlock = QA::GetQAState('below', $max, @QA::MdcTempLimits);
+  my $qastate_interlock = QA::GetQAState('below', $max, @QA::RichInnerTempLimits);
   my $str = sprintf("%i - %i", $min, $max);
   QA::WriteQALog($fqa,"rich","bkpl", 40, $qastate, "Temperature", $str, 
                  "Min/Max temperature in RICH " . $str);
diff --git a/hmon/hmon_richrate.pl b/hmon/hmon_richrate.pl
new file mode 100755 (executable)
index 0000000..1bd86ca
--- /dev/null
@@ -0,0 +1,150 @@
+#!/usr/bin/perl -w
+
+use warnings;
+use strict;
+use Data::Dumper;
+use Data::TreeDumper;
+use Hmon;
+use QA;
+use HADES::TrbNet;
+use HPlot;
+use Time::HiRes qw(usleep time);
+use List::Util qw[min max];
+
+
+my $plot1 = {
+name    => "RichRateQ1",
+file    => "files/RichRateQ1",
+title   => "RICH Q1",
+entries => 288,
+curves  => 32,
+type    => HPlot::TYPE_HEATMAP,
+output  => HPlot::OUT_PNG,
+zlabel  => "Hitrate",
+sizex   => 1000,
+sizey   => 200,
+nokey   => 1,
+buffer  => 1,
+xmin    => -0.5,
+xmax    => 288.5,
+ymin    => 31.5,
+ymax    => -0.5,
+cbmax   => "100<*",
+cbmin   => 0,
+noinit  => 1,
+showvalues => 0,  };
+HPlot::PlotInit($plot1);
+
+my $plot2 = {
+name    => "RichRateQ2",
+file    => "files/RichRateQ2",
+title   => "RICH Q2",
+entries => 288,
+curves  => 32,
+type    => HPlot::TYPE_HEATMAP,
+output  => HPlot::OUT_PNG,
+zlabel  => "Hitrate",
+sizex   => 1000,
+sizey   => 200,
+nokey   => 1,
+buffer  => 1,
+xmin    => -0.5,
+xmax    => 288.5,
+ymin    => 31.5,
+ymax    => -0.5,
+cbmax   => "100<*",
+cbmin   => 0,
+noinit  => 1,
+showvalues => 0,  };
+HPlot::PlotInit($plot2);
+
+
+my $plot3 = {
+name    => "RichRateQ3",
+file    => "files/RichRateQ3",
+title   => "RICH Q3",
+entries => 288,
+curves  => 32,
+type    => HPlot::TYPE_HEATMAP,
+output  => HPlot::OUT_PNG,
+zlabel  => "Hitrate",
+sizex   => 1000,
+sizey   => 200,
+nokey   => 1,
+buffer  => 1,
+xmin    => -0.5,
+xmax    => 288.5,
+ymin    => 31.5,
+ymax    => -0.5,
+cbmax   => "100<*",
+cbmin   => 0,
+noinit  => 1,
+showvalues => 0,  };
+HPlot::PlotInit($plot3);
+
+my $plot0 = {
+name    => "RichRateQ0",
+file    => "files/RichRateQ0",
+title   => "RICH Q0",
+entries => 288,
+curves  => 32,
+type    => HPlot::TYPE_HEATMAP,
+output  => HPlot::OUT_PNG,
+zlabel  => "Hitrate",
+sizex   => 1000,
+sizey   => 200,
+nokey   => 1,
+buffer  => 1,
+xmin    => -0.5,
+xmax    => 288.5,
+ymin    => 31.5,
+ymax    => -0.5,
+cbmax   => "100<*",
+cbmin   => 0,
+noinit  => 1,
+showvalues => 0,  };
+HPlot::PlotInit($plot0);
+
+
+my $str  = Hmon::MakeTitle(20, 17, "RICH Hit Rate");
+$str .= qq@<img src="%ADDPNG files/RichRateQ0.png%" type="image/png"><br>\n@;
+$str .= qq@<img src="%ADDPNG files/RichRateQ1.png%" type="image/png"><br>\n@;
+$str .= qq@<img src="%ADDPNG files/RichRateQ2.png%" type="image/png"><br>\n@;
+$str .= qq@<img src="%ADDPNG files/RichRateQ3.png%" type="image/png"><br>\n@;
+$str .= Hmon::MakeFooter();
+Hmon::WriteFile("RichRate",$str);
+
+
+my $old;
+my $oldtime = time();
+my $time = time();
+my $diff;
+my $iter = 0;
+
+trb_init_ports() or die trb_strerror();
+
+
+while(1) {
+  my $o = trb_register_read_mem(0xfe51,0xc000,0,33) or die trb_strerror() or sleep 5 and next;
+
+  if (defined $old) {
+    my $tdiff = time() - $oldtime;
+    foreach my $b (keys %$o) {
+      my $sec  = ($b>>1) & 0x3;
+      my $xpos =  (($b>>8)&0xF)*24 + (($b>>4)&0xF)*2 + ($b&1);
+
+      for my $v (0..31) {
+        my $vdiff = ($o->{$b}->[$v+1]&0xffffff) - ($old->{$b}->[$v+1]&0xffffff);
+        if ($vdiff < 0) { $vdiff += 2**24;}
+        $diff->{$b}->[$v+1] = $vdiff/($tdiff|1);
+        HPlot::PlotFill('RichRateQ'.$sec,$diff->{$b}->[$v+1],$xpos,$v);
+        }
+      }
+    for my $i (0..3) {    
+      HPlot::PlotDraw('RichRateQ'.$i);    
+      }
+    }
+  $old = $o;
+  $oldtime = time();
+  sleep 2;
+  }
index 95e5d0f6ac6db80e35859a70442131f37264a7f0..3479a25b9ecf632ff382f05e672e43b5909d79fa 100755 (executable)
@@ -72,8 +72,8 @@ function openwin(url) {
 <li><a href="monitor.cgi?1-window-eventrateshort">Eventrate histogram (10s)</a></li>
 <li><a href="monitor.cgi?1-window-eventrate">Eventrate histogram (60s)</a></li>
 <li><a href="monitor.cgi?5-window-eventratelong">Eventrate histogram (10m)</a></li>
-<!--<li><a href="monitor.cgi?10-window-StartCountSpill">Start counts per spill</a></li>
-<li><a href="monitor.cgi?10-window-Pt3AcceptRatio">Ratio of accepted PT3 per spill</a></li>-->
+<li><a href="monitor.cgi?10-window-StartCountSpill">Start counts per spill</a></li>
+<li><a href="monitor.cgi?10-window-Pt3AcceptRatio">Ratio of accepted PT3 per spill</a></li>
 <li><a href="monitor.cgi?10-window-EvtsPerSpill">Recorded events per spill</a></li>
 <li><a href="monitor.cgi?1-window-SpillStructure">Spill Structure from Start</a></li>
 <!--<li><a href="monitor.cgi?5-window-Vetohist">Veto hit count histograms</a></li>-->
@@ -100,11 +100,12 @@ function openwin(url) {
 
 
 <div class="linkbox" style="float:left"><h4>RICH</h4><ul>
-<li><a href="rich_drawing.htm#richTemperature">RICH Temperature</a></li>
-<li><a href="rich_drawing_bkpl.htm#richTemperatureBackplane">RICH Temperature Backplane</a></li>
-<li><a href="rich_drawing.htm#rich1V">RICH 1.1V</a></li>
-<li><a href="rich_drawing.htm#rich2V5">RICH 2.5V</a></li>
-<li><a href="monitor.cgi?10-richvolt">RICH Voltage & Current</a></li>
+<li><a href="rich_drawing.htm#richTemperature">Temperature</a></li>
+<li><a href="rich_drawing_bkpl.htm#richTemperatureBackplane">Temperature Backplane</a></li>
+<li><a href="rich_drawing.htm#rich1V">DiRich 1.1V</a></li>
+<li><a href="rich_drawing.htm#rich2V5">DiRich 2.5V</a></li>
+<li><a href="monitor.cgi?10-richvolt">Voltage & Current</a></li>
+<li><a href="monitor.cgi?2-RichRate">Rates on all channels</a></li>
 </ul></div>
 
 
old mode 100644 (file)
new mode 100755 (executable)
index aedf721..8cd1478
@@ -188,7 +188,10 @@ sub finishAndExit()
 
 sub isFeeHub {
   my $h = shift;
-  my $hubs = "3200 3210 3220 3230 3240 3250 8301 8311 8321 8401 8411 8601 8701 8801";
+  my $hubs = "8401 8411 8601 8701 8801 0x8204,0x8206,0x8212,0x8213,0x8214,0x8215,0x8216,0x8217,0x8221,0x8222,0x8223,0x8224,0x8225,0x8226,0x8227,0x8228,0x8229,
+    0x8231,0x8239,0x8240,0x8241,0x8242,0x8243,0x8244,0x8245,0x8246,0x8247,0x8248,0x8249,0x824a,0x8251,0x8252,0x8254,0x8256,0x8258,0x8259,
+    0x8260,0x8261,0x8262,0x8263,0x8264,0x8265,0x8266,0x8267,0x8268,0x8269,0x826a,0x8271,0x8279,0x8281,0x8282,0x8283,0x8284,0x8285,0x8286,0x8287,0x8288,0x8289,
+    0x8292,0x8293,0x8294,0x8295,0x8296,0x8297,0x82a4,0x82a6, 8a00 8a01 8a02 8a03 8a04 8a05 ";
   my $hs = sprintf("%04x",$h);
 #   print $h."\n";
   if (index($hubs,$hs) != -1) {
@@ -205,7 +208,7 @@ sub display()
     my $str = "";
     my ($hub_href) = @_;
 
-    $str = Hmon::MakeTitle(11,12,"Hub Monitor",1);
+    $str = Hmon::MakeTitle(20,12,"Hub Monitor",1);
     $str .= '<table class="hubmon"><tr><td colspan=5><pre>';
     chomp($msg);
     $str .= "Status: ";
@@ -342,7 +345,7 @@ sub display()
       my $msgstr = sprintf("%3.1f%%",$maxpercent);
       my $qastate = QA::OK;
       $qastate = QA::ERROR if ($maxpercent > 99);
-      QA::WriteQALog($fqa,"daq","busy",5,$qastate,"Busy",$msgstr,"No busy hub ports - ".$longmsg);
+      QA::WriteQALog($fqa,"daq","busy",5,$qastate,"Busy",$msgstr,"No busy hub ports - ".$longmsg);
       $longmsg = "";
       $msgtimer = -5;
     }
index ad9cb25017e08d1623d9b2852d750d5749f3eaed..788cf5a5c0bc8fa946e4de87be6791afa03d4a24 100755 (executable)
@@ -80,7 +80,6 @@ $plotPrePlane1->{sizey}   = 220;
 $plotPrePlane1->{nokey} = 0;
 $plotPrePlane1->{curves} = 6;
 $plotPrePlane1->{buffer} = 1;
-$plotPrePlane1->{xscale};
 $plotPrePlane1->{storable} = 1;
 HPlot::PlotInit($plotPrePlane1);
 
@@ -130,6 +129,28 @@ $plotPrePlane3->{storable} = 1;
 HPlot::PlotInit($plotPrePlane3);
 
 
+my $plotPrePlane4 = ();
+$plotPrePlane4->{name}    = "MdcPressurePlane4";
+$plotPrePlane4->{file}    = "files/MdcPressurePlane4";
+$plotPrePlane4->{entries} = 720;
+$plotPrePlane4->{type}    = HPlot::TYPE_HISTORY;
+$plotPrePlane4->{output}  = HPlot::OUT_PNG;
+$plotPrePlane4->{titles}->[0] = "sector 1";
+$plotPrePlane4->{titles}->[1] = "sector 2";
+$plotPrePlane4->{titles}->[2] = "sector 3";
+$plotPrePlane4->{titles}->[3] = "sector 4";
+$plotPrePlane4->{titles}->[4] = "sector 5";
+$plotPrePlane4->{titles}->[5] = "sector 6";
+$plotPrePlane4->{xlabel}  = "Minutes";
+$plotPrePlane4->{ylabel}  = "Plane IV - [Pa]";
+$plotPrePlane4->{sizex}   = 630;
+$plotPrePlane4->{sizey}   = 220;
+$plotPrePlane4->{nokey} = 0;
+$plotPrePlane4->{curves} = 6;
+$plotPrePlane4->{buffer} = 1;
+$plotPrePlane4->{storable} = 1;
+HPlot::PlotInit($plotPrePlane4);
+
 my  $str = Hmon::MakeTitle(8,5,"Atmospheric Pressure",0);
 $str .= qq@<img src="%ADDPNG files/AtmosPress.png%" type="image/png">@;
 $str .= Hmon::MakeFooter();
@@ -140,10 +161,11 @@ $str .= qq@<img src="%ADDPNG files/MdcScales.png%" type="image/png">@;
 $str .= Hmon::MakeFooter();
 Hmon::WriteFile("MdcScales",$str);
 
-$str = Hmon::MakeTitle(8,15,"Mdc differential Pressure",0);
+$str = Hmon::MakeTitle(8,22,"Mdc differential Pressure",0);
 $str .= qq@<img src="%ADDPNG files/MdcPressurePlane1.png%" type="image/png">@;
 $str .= qq@<img src="%ADDPNG files/MdcPressurePlane2.png%" type="image/png">@;
 $str .= qq@<img src="%ADDPNG files/MdcPressurePlane3.png%" type="image/png">@;
+$str .= qq@<img src="%ADDPNG files/MdcPressurePlane4.png%" type="image/png">@;
 $str .= Hmon::MakeFooter();
 Hmon::WriteFile("MdcPressure",$str);
 
@@ -163,12 +185,15 @@ $str .= qq@<img src="%ADDPNG files/MdcPressurePlane3.png%" type="image/png">@;
 $str .= Hmon::MakeFooter();
 Hmon::WriteFile("MdcPressurePlane3",$str);
 
-
+$str = Hmon::MakeTitle(8,5,"Mdc differential Pressure Plane4",0);
+$str .= qq@<img src="%ADDPNG files/MdcPressurePlane4.png%" type="image/png">@;
+$str .= Hmon::MakeFooter();
+Hmon::WriteFile("MdcPressurePlane4",$str);
 my $timer = 0;
 
 
 
-for(my $i = 1; $i<=3; $i++) {
+for(my $i = 1; $i<=4; $i++) {
   for(my $j = 1; $j<=6; $j++) {
     my $s = sprintf("HAD:MDC:P%i:S%i:p_delta",$i,$j);
     Perl2Epics::Connect("p$i$j",$s);
@@ -190,11 +215,11 @@ print "Connected.\n";
 
 while(1) {
   my $data = Perl2Epics::GetAll();
-  $str = Hmon::MakeTitle(8, 17, "MDC Gas Pressure", 1, "");
+  $str = Hmon::MakeTitle(8, 22, "MDC Gas Pressure", 1, "");
   $str .= "<h4>Chamber differential pressure  [Pa]</h4>\n";
   $str .= "<table class=\"rates \">\n"; #<div id=\"logbox\" class=\"textbox\" >
   $str .= "<tr><th colspan=1>plane/sector<th colspan=1>1<th colspan=1>2<th colspan=1>3<th colspan=1>4<th colspan=1>5<th colspan=1>6\n";
-  for(my $i = 1; $i<=3; $i++) {
+  for(my $i = 1; $i<=4; $i++) {
     $str .= "<tr><th>$i";
     for(my $v = 1; $v<=6; $v++) {
       $str .= sprintf("<td> %.2f\n",$data->{"p$i$v"}->{val} || -1);
@@ -207,6 +232,8 @@ while(1) {
   $str .= qq@<img src="%ADDPNG files/MdcPressurePlane2.png%" type="image/png">\n@;  
  # $str .= "<br> Plane 3 <br> \n";
   $str .= qq@<img src="%ADDPNG files/MdcPressurePlane3.png%" type="image/png">\n@;  
+ # $str .= "<br> Plane 4 <br> \n";
+  $str .= qq@<img src="%ADDPNG files/MdcPressurePlane4.png%" type="image/png">\n@;  
   $str .= Hmon::MakeFooter();
   Hmon::WriteFile("MDCPressure", $str);
  
@@ -249,7 +276,7 @@ while(1) {
 
     
   if(!($timer%6)) {
-    for(my $i = 1; $i<=3; $i++) {
+    for(my $i = 1; $i<=4; $i++) {
       for(my $j = 1; $j<=6; $j++) {
         HPlot::PlotAdd("MdcPressurePlane$i",$data->{"p$i$j"}->{val},$j-1);
         HPlot::PlotDraw("MdcPressurePlane$i"); 
@@ -262,7 +289,7 @@ while(1) {
 #      $presserr++;
 #      }
     
-  for my $i (1..3) { # CW 1.4.2016 : only for Plane 1 to 3, as pressure values in plane 4 S5&6 are wrong - readout failure  planes
+  for my $i (1..4) { #pressure values in plane 4 S5&6 are wrong - readout failure  
    for my $j (1..6) { 
           my $pressure_now = $data->{"p$i$j"}->{val}; 
     if(  $pressure_now < 1.0 || $pressure_now > 55) {
index 941e198a15655df33050359592ca7c3b1376ef31..e841521f7e9fb449e5d0437cc9d81bd678edc3a8 100755 (executable)
@@ -18,50 +18,107 @@ my @colors = ("#333333","#00ff00","#ff0000","#0000ff","#dddd00","#dd00dd");
 
 my $plot = {
     name    => "RichCurr",
-    file    => "files/RichCurr",
-    entries => 240,
-    type    => HPlot::TYPE_HISTORY,
+    file    => 'files/RichCurr',
+    entries => 96,
+    type    => HPlot::TYPE_BARGRAPH,
     output  => HPlot::OUT_PNG,
-    titles  => ["A1","A2","A3","A4","A5","A6"],
-    xlabel  => "Seconds",
-    ylabel  => "nA",
+    titles  => ['Current'],
+    xlabel  => "Channel",
+    ylabel  => "mA",
     sizex   => 950,
     sizey   => 260,
-    curves  => 6,
-    xscale  => 4,
-    storable=> 1,
-    colors  => ["#333333","#00ff00","#ff0000","#0000ff","#dddd00","#dd00dd"]};
+    xmin    => 0,
+    xmax    => 96,
+    ymin    => '0',
+    curves  => 1,
+    countup => 1,
+    xscale  => 1,
+    nokey   => 0,
+    buffer  => 1,
+    bargap => 0.4,
+    curvewidth => 1};
 HPlot::PlotInit($plot);
 
+# my $plot = {
+#     name    => "RichCurr",
+#     file    => "files/RichCurr",
+#     entries => 240,
+#     type    => HPlot::TYPE_HISTORY,
+#     output  => HPlot::OUT_PNG,
+#     titles  => ["A1","A2","A3","A4","A5","A6"],
+#     xlabel  => "Seconds",
+#     ylabel  => "nA",
+#     sizex   => 950,
+#     sizey   => 260,
+#     curves  => 6,
+#     xscale  => 4,
+#     storable=> 1,
+#     colors  => ["#333333","#00ff00","#ff0000","#0000ff","#dddd00","#dd00dd"]};
+# HPlot::PlotInit($plot);
+
 my $plot2 = {
-    name    => "RichCurrLong",
-    file    => "files/RichCurrLong",
-    entries => 300,
-    type    => HPlot::TYPE_HISTORY,
+    name    => "RichVolt",
+    file    => 'files/RichVolt',
+    entries => 96,
+    type    => HPlot::TYPE_BARGRAPH,
     output  => HPlot::OUT_PNG,
-    titles  => ["A1","A2","A3","A4","A5","A6"],
-    xlabel  => "Minutes",
-    ylabel  => "nA",
+    titles  => ['Voltage'],
+    xlabel  => "Channel",
+    ylabel  => "V",
     sizex   => 950,
     sizey   => 260,
-    curves  => 6,
-    xscale  => 30,
-    storable=> 1,
-    colors  => ["#333333","#00ff00","#ff0000","#0000ff","#dddd00","#dd00dd"]};
+    xmin    => 0,
+    xmax    => 96,
+    ymin    => '0',
+    curves  => 1,
+    countup => 1,
+    xscale  => 1,
+    nokey   => 0,
+    buffer  => 1,
+    bargap => 0.4,
+    curvewidth => 1};
 HPlot::PlotInit($plot2);
 
 
+my $plot3 = {
+    name    => "RichResist",
+    file    => 'files/RichResist',
+    entries => 96,
+    type    => HPlot::TYPE_BARGRAPH,
+    output  => HPlot::OUT_PNG,
+    titles  => ["Resistance"],
+    xlabel  => "Channel",
+    ylabel  => 'Ohm',
+    sizex   => 950,
+    sizey   => 260,
+    xmin    => -1,
+    xmax    => 96,
+    ymin    => '0',
+    curves  => 1,
+    countup => 1,
+    xscale  => 1,
+    nokey   => 0,
+    buffer  => 1,
+    bargap  => 0.4,
+    curvewidth => 1};
+HPlot::PlotInit($plot3);
+
 
 my $timer = 0;
 my $str = "";
 
-
-for(my $i = 1; $i<=6; $i++) {
-  my $s = sprintf("HAD:RICH:HV:A%i_curr",$i);
-  Perl2Epics::Connect("I$i",$s);
-  $s = sprintf("HAD:RICH:HV:PS:C%i:vmon",$i-1);
-  Perl2Epics::Connect("U$i",$s);
+for(my $i = 0; $i <=5; $i++) {
+  for(my $j = 0; $j<=15; $j++) {
+    my $cnt = ($i*16)+$j;
+    my $s = sprintf("HAD:RICH:HV:CR1:0:%i:%i:CurrentMeasure1",$i,$j);
+    Perl2Epics::Connect("I$cnt",$s);
+    my $s1 = sprintf("HAD:RICH:HV:CR1:0:%i:%i:VoltageMeasure",$i,$j);
+    Perl2Epics::Connect("U$cnt",$s1);
+    my $s2 = sprintf("HAD:RICH:HV:CR1:0:%i:%i:Resistance",$i,$j);
+    Perl2Epics::Connect("R$cnt",$s2);
   }
+}
+Perl2Epics::Connect("HVPowerOn","HAD:RICH:HV:CR1:0:1000:PowerOn");
 
 
 print "Connected.\n";
@@ -85,22 +142,35 @@ while(1) {
   my $min = 1E5;
   my $max = 0;
   my $data = Perl2Epics::GetAll();
-  $str = Hmon::MakeTitle(12, 13, "RICH HV currents", 1, "");
-  $str .= "<table class=\"rates \">\n";
-  $str .= "<tr><th><th>1<th>2<th>3<th>4<th>5<th>6\n";
-  $str .= "<tr><th>Curr.";
-  for(my $v = 1; $v<=6; $v++) {
-    $str .= sprintf("<td> %i nA\n",$data->{"I$v"}->{val} || -1);
-    }
-  $str .= "<tr><th>Volt.";
-  for(my $v = 1; $v<=6; $v++) {
-    $str .= sprintf("<td> %i V\n",$data->{"U$v"}->{val} || -1);
-    $min = min($min,$data->{"U$v"}->{val}||-1);
-    $max = max($max,$data->{"U$v"}->{val}||-1);
-    }
-  $str .= "</table>\n";
+  $str = Hmon::MakeTitle(12, 13, "RICH HV", 1, "");
+  
+  $str .= "<style>\n";
+  $str .= ".dot:\n {\n height: 40px;\n width:40px border-radius:20px; }\n";
+  $str .= "</style>\n";
+  $str .= "<span class="circle"></span>"
+  if ($data->{"HVPowerOn"}->{val} == 0) {
+  $str .= "<p>Main Switch HV: Off</p>";
+  } else {
+  $str .= "<p>Main Switch HV: On</p>";
+  }
+  $str .= "</div>";
+  #$str .= "<table class=\"rates \">\n";
+  #$str .= "<tr><th><th>1<th>2<th>3<th>4<th>5<th>6\n";
+  #$str .= "<tr><th>Curr.";
+  #for(my $v = 1; $v<=6; $v++) {
+  #  $str .= sprintf("<td> %i nA\n",$data->{"I$v"}->{val} || -1);
+  #  }
+  #$str .= "<tr><th>Volt.";
+  #for(my $v = 1; $v<=6; $v++) {
+  #  $str .= sprintf("<td> %i V\n",$data->{"U$v"}->{val} || -1);
+  #  $min = min($min,$data->{"U$v"}->{val}||-1);
+  #  $max = max($max,$data->{"U$v"}->{val}||-1);
+  #  }
+  #$str .= "</table>\n";
   $str .= qq@<img src="%ADDPNG files/RichCurr.png%" type="image/png">\n@;
-  $str .= qq@<img src="%ADDPNG files/RichCurrLong.png%" type="image/png">\n@;
+  $str .= qq@<img src="%ADDPNG files/RichVolt.png%" type="image/png">\n@;
+  $str .= qq@<img src="%ADDPNG files/RichResist.png%" type="image/png">\n@;
+
   $str .= Hmon::MakeFooter();
 
   Hmon::WriteFile("RichHV", $str);
@@ -144,18 +214,25 @@ $qastate = QA::NOTE if ($QA::RichHvOff == 1);
       $current_sum = 0;
       QA::WriteQALog($flog,"other","rich",30,$qastate,"RICH HV",$value,$longtext);
   }
-
-  for(my $i = 1; $i<=6;$i++) {
-    HPlot::PlotAdd("RichCurr",$data->{"I$i"}->{val}||-1,$i-1);
-
+  for (my $i = 0; $i <= 5;$i++){
+    for (my $j = 0; $j<=15; $j++) {
+      my $cnt = ($i*16)+$j;
+      HPlot::PlotAdd("RichCurr",$data->{"I$cnt"}->{val}||-1,);
+      HPlot::PlotAdd("RichVolt",$data->{"U$cnt"}->{val}||-1,);
+      HPlot::PlotAdd("RichResist",$data->{"R$cnt"}->{val}||-1,);
     }
+  }
+  HPlot::PlotAdd("RichResist",1,); #to avoid error messages
+  #print Dumper $data;
   if($timer%8 == 0) {
     HPlot::PlotDraw("RichCurr");
-    for(my $i = 1; $i<=6;$i++) {
-      HPlot::PlotAdd("RichCurrLong",$data->{"I$i"}->{val}||-1,$i-1);
-      }
-    HPlot::PlotDraw("RichCurrLong");
-    }
+    HPlot::PlotDraw("RichVolt");
+    HPlot::PlotDraw("RichResist");
+    #for(my $i = 1; $i<=6;$i++) {
+    #  HPlot::PlotAdd("RichCurrLong",$data->{"I$i"}->{val}||-1,$i-1);
+    #  }
+    #HPlot::PlotDraw("RichCurrLong");
+  }
 
 
   usleep(250000);
index a2f204e59f1af1e7e24767888aee1b2ef0d38cd9..33ff754025288b394830537d39e1f007d3dfebfd 100644 (file)
@@ -1133,7 +1133,7 @@ td {
 
      <td class="combiner-v" id="0x8263" rowspan="6" colspan="2"><span class="tooltiptext" id="0x8263_s">0x8263</span></td><!-- Combiner -->
      <td class="dirich" rowspan="3" colspan="1" id="0x7336"><span class="tooltiptext" id="0x7336_s">0x7336</span></td>
-     <td class="dirich" rowspan="3" colspan="1" id="0x7337"><span class="tooltiptext" id="0x7227_s">0x7337</span></td>
+     <td class="dirich" rowspan="3" colspan="1" id="0x7337"><span class="tooltiptext" id="0x7337_s">0x7337</span></td>
      <td class="dirich" rowspan="3" colspan="1" id="0x7236"><span class="tooltiptext" id="0x7236_s">0x7236</span></td>
      <td class="dirich" rowspan="3" colspan="1" id="0x7237"><span class="tooltiptext" id="0x7237_s">0x7237</span></td>
      <td class="dirich" rowspan="3" colspan="1" id="0x7136"><span class="tooltiptext" id="0x7136_s">0x7136</span></td>
@@ -1390,7 +1390,7 @@ td {
     
     <tr>  
      <td class="dirich" rowspan="1" colspan="3" id="0x7676"><span class="tooltiptext" id="0x7676_s">0x7676</span></td>
-     <td class="dirich" rowspan="1" colspan="3" id="0x7676"><span class="tooltiptext" id="0x7576_s">0x7576</span></td>
+     <td class="dirich" rowspan="1" colspan="3" id="0x7576"><span class="tooltiptext" id="0x7576_s">0x7576</span></td>
      
      <td class="dirich" rowspan="1" colspan="3" id="0x7476"><span class="tooltiptext" id="0x7476_s">0x7476</span></td>
      <td class="dirich" rowspan="1" colspan="3" id="0x7376"><span class="tooltiptext" id="0x7376_s">0x7376</span></td>
@@ -1413,7 +1413,7 @@ td {
     
     <tr>
      <td class="dirich" rowspan="1" colspan="3" id="0x7677"><span class="tooltiptext" id="0x7677_s">0x7677</span></td>
-     <td class="dirich" rowspan="1" colspan="3" id="0x7677"><span class="tooltiptext" id="0x7577_s">0x7577</span></td>
+     <td class="dirich" rowspan="1" colspan="3" id="0x7577"><span class="tooltiptext" id="0x7577_s">0x7577</span></td>
      
      <td class="dirich" rowspan="1" colspan="3" id="0x7477"><span class="tooltiptext" id="0x7477_s">0x7477</span></td>
      <td class="dirich" rowspan="1" colspan="3" id="0x7377"><span class="tooltiptext" id="0x7377_s">0x7377</span></td>
@@ -1778,7 +1778,7 @@ getdata('getjson.cgi?'+file,updatedata);
 function color(id,value) {
   var val = map(value,min,max);
   var x = 240.0 - val;
-  if(!document.getElementById(id)) {return;}
+  if(!document.getElementById(id) || !document.getElementById(id+"_s")) {console.log(id); return;}
   if (val == -1) {
       document.getElementById(id).style.backgroundColor = "#FF00FF";
   } else {
@@ -1831,6 +1831,9 @@ function updatedata(d) {
     } else {
       document.getElementById("updateTime").innerHTML = "Error";  
     }
+    
+    resetColor();
+    
     for (var k in data) {
       if (k.substring(0,3) == "0x7") {
         color(k,data[k]);
@@ -1843,6 +1846,32 @@ function updatedata(d) {
   catch (e) {
         }
   }
+  
+function resetColor(){
+
+    var dirichColor = document.getElementsByClassName("dirich");
+    var combinerHColor = document.getElementsByClassName("combiner-h");
+    var combinerVColor = document.getElementsByClassName("combiner-v");
+    var combiner4HColor = document.getElementsByClassName("combiner-4h");
+    var combiner4VColor = document.getElementsByClassName("combiner-4v");
+    
+    for (var j=0;j<dirichColor.length;j++) {
+      dirichColor[j].style.backgroundColor = "White";
+    }
+    for (var j=0;j<combinerHColor.length;j++) {
+      combinerHColor[j].style.backgroundColor = "White";
+    }
+    for (var j=0;j<combinerVColor.length;j++) {
+      combinerVColor[j].style.backgroundColor = "White";
+    }
+    for (var j=0;j<combiner4HColor.length;j++) {
+      combiner4HColor[j].style.backgroundColor = "White";
+    }
+    for (var j=0;j<combiner4VColor.length;j++) {
+      combiner4VColor[j].style.backgroundColor = "White";
+    }
+
+}  
 </script>
 </body>
 </html>
index d2bce666319183f277186ed3f6a99c7b7a155cf2..42a8367b1a3612d3f5ffeff1765cb056a5d3c868 100644 (file)
@@ -1335,7 +1335,7 @@ td {
      <td class="dirich" rowspan="3" colspan="1" id="0x0000"><span class="tooltiptext" id="0x0000_s">0x0000</span></td>
     
      <td class="dirich" rowspan="1" colspan="3" id="0x0000"><span class="tooltiptext" id="0x0000_s">0x0000</span></td>
-     <td class="dirich" rowspan="1" colspan="3" id="0xe107"><span class="tooltiptext" id="0xe107_s">0xe107</span></td>
+     <td class="dirich" rowspan="1" colspan="3" id="0xe117"><span class="tooltiptext" id="0xe117_s">0xe117</span></td>
      
      <td class="dirich" rowspan="3" colspan="1" id="0x0000"><span class="tooltiptext" id="0x0000_s">0x0000</span></td>
      <td class="dirich" rowspan="3" colspan="1" id="0x0000"><span class="tooltiptext" id="0x0000_s">0x0000</span></td>
@@ -1830,6 +1830,9 @@ function updatedata(d) {
     } else {
       document.getElementById("updateTime").innerHTML = "Error";  
     }
+    
+    resetColor();
+    
     for (var k in data) {
       if (k.substring(0,3) == "0xe") {
         color(k,data[k]);
@@ -1839,6 +1842,32 @@ function updatedata(d) {
   catch (e) {
         }
   }
+  
+function resetColor(){
+
+    var dirichColor = document.getElementsByClassName("dirich");
+    var combinerHColor = document.getElementsByClassName("combiner-h");
+    var combinerVColor = document.getElementsByClassName("combiner-v");
+    var combiner4HColor = document.getElementsByClassName("combiner-4h");
+    var combiner4VColor = document.getElementsByClassName("combiner-4v");
+    
+    for (var j=0;j<dirichColor.length;j++) {
+      dirichColor[j].style.backgroundColor = "White";
+    }
+    for (var j=0;j<combinerHColor.length;j++) {
+      combinerHColor[j].style.backgroundColor = "White";
+    }
+    for (var j=0;j<combinerVColor.length;j++) {
+      combinerVColor[j].style.backgroundColor = "White";
+    }
+    for (var j=0;j<combiner4HColor.length;j++) {
+      combiner4HColor[j].style.backgroundColor = "White";
+    }
+    for (var j=0;j<combiner4VColor.length;j++) {
+      combiner4VColor[j].style.backgroundColor = "White";
+    }
+
+}  
 </script>
 </body>
 </html>
index 004021f7bf3bcd8d517bd5a0c6dde023f52864ac..177e326c85b2915e12d7998dfe29bb99d8d3f457 100755 (executable)
@@ -60,6 +60,7 @@ ln -fs `pwd`/indexstyles.css files/
 ln -fs `pwd`/rich_drawing.htm /srv/www/htdocs/mon/
 ln -fs `pwd`/rich_drawing_bkpl.htm /srv/www/htdocs/mon/
 
+
 #rm ~/trbsoft/hadesdaq/hmon/files/*.htt
 
 echo "  <Hmon>     Starting scripts..."