]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
aktueller rich status, mt
authorHADES DAQ <hadaq@hadesp43.gsi.de>
Mon, 10 Apr 2017 22:32:03 +0000 (00:32 +0200)
committerHADES DAQ <hadaq@hadesp43.gsi.de>
Mon, 10 Apr 2017 22:32:03 +0000 (00:32 +0200)
14 files changed:
tools/power_cycle
users/gsi_rich/TdcEventBuilder.xml
users/gsi_rich/check_ping.pl
users/gsi_rich/db/addresses_dirich.db
users/gsi_rich/db/addresses_dirich_concentrator.db
users/gsi_rich/db/addresses_trb3.db
users/gsi_rich/db/register_configgbe.db
users/gsi_rich/db/register_configgbe_ip.db
users/gsi_rich/db/register_configtdc.db
users/gsi_rich/first.C
users/gsi_rich/second.C
users/gsi_rich/startup.sh
users/gsi_rich/trbreset_loop.pl
web/CtsConfig.pm

index 973337fe5c3cae9db20119e2be345e7f08f8af58..19b44b0ba7fff3f0492d94359706c25de7a85c35 100755 (executable)
@@ -10,7 +10,8 @@ use Data::Dumper;
 my $sock;
 
 my $ra_setup = [ { host => "wiznet02:5000",
-                  idn => "HAMEG,HMP4040,021527872,HW50020001/SW2.41",
+                  ##idn => "HAMEG,HMP4040,021527872,HW50020001/SW2.41",
+                   idn => "HAMEG,HMP4040,103161,HW50020001/SW2.51",
                   channels => [ 'clock', 'TDB', 'TBD', 'dirich'],
                   commands => {status => 'OUTPUT:STATE?', off => 'OUTPUT:SEL OFF', on => 'OUTPUT:SEL ON'}
                 },
@@ -51,7 +52,7 @@ sub main {
   my $idn = write_and_read('*IDN?');
 
   if($idn ne $actual_setup->{idn}) {
-    print "wrong device: is not $actual_setup->idn\n";
+    print "wrong device: read idn $idn is not the one stored in the setup: $actual_setup->{idn}\n";
     exit;
   }
 
index e1bd0fb4f40cc6681f7c27ca9deaf0ea46af38ed..8c4c4f5b4b180979726e58919761093a2b700fe2 100644 (file)
@@ -95,10 +95,10 @@ When starting analysis from the go4 gui, one should specify stream server with p
 
     <Module name="Combiner" class="hadaq::CombinerModule">    
         <!-- these parameters will force to create inputs/outputs of module -->
-       <NumInputs value="4"/>
-       <NumOutputs value="2"/>
+       <NumInputs value="1"/>
+       <NumOutputs value="1"/>
 
-       <InputPort name="Input0" url="hadaq://host:50061" urlopt1=""/>
+       <InputPort name="Input0" url="hadaq://host:50165" urlopt1=""/>
        <InputPort name="Input1" url="hadaq://host:50113" urlopt1=""/>
        <InputPort name="Input2" url="hadaq://host:50084" urlopt1=""/>
        <InputPort name="Input3" url="hadaq://host:50158" urlopt1=""/>
index ff146b6f75ba2057e25abb672d094ca01d9f7859..fcd5c1e8884ea5711c6f6be65f5d51a9bf462df8 100755 (executable)
@@ -19,10 +19,10 @@ my $result = GetOptions (
 
 
 my $map = {
- 0 => { trb =>  84, addr => "0xc001", sys => "CTS"},
- 1 => { trb =>  61, addr => "0x8000", sys => "TOF"},
- 2 => { trb => 113, addr => "0x8001", sys => "TOF"}, 
- 3 => { trb => 158, addr => "0x8002", sys => "TOF"},
+ 0 => { trb => 165, addr => "0xc001", sys => "CTS"},
+# 1 => { trb =>  61, addr => "0x8000", sys => "TOF"},
+# 2 => { trb => 113, addr => "0x8001", sys => "TOF"}, 
+# 3 => { trb => 158, addr => "0x8002", sys => "TOF"},
 
 };
 my $MAX_PROCESSES=50;
@@ -61,7 +61,7 @@ while ( (($first_iteration == 1) || keys %$rh_unsuccessful) &&
     #my $num = sprintf "%3.3d", $ct;
     my $trbnum= $map->{$ct}->{trb};
     my $num = sprintf "%3.3d", $trbnum;
-    my $host= "trb" . $num;
+    my $host= "trbp" . $num;
     #my $host= "trb" . $num ."b";
     my $system = $map->{$ct}->{sys};
     #print "192.168.0.$ct   $host.gsi.de $host\n";
index 6613a19c7dfb04e45d60262ca13622b30beed1ae..c9da9227c08e45a450faf42c12a45efc044c1ccc 100644 (file)
@@ -3,12 +3,13 @@
 
 # Address #  S/N  #  FPGA
 
-0x1201             0001     1
-0x1202             0002     1
-0x1203             0003     1
-0x1204             0004     1
-0x1205             0005     1
-0x1206             0006     1
-0x1207             0007     1
-0x1208             0008     1
+0x1201             0011     1
+0x1202             0021     1
+0x1203             0031     1
+0x1204             0041     1
+0x1205             0051     1
+0x1206             0061     1
+0x1207             0071     1
+0x1208             0081     1
+0x1209             0091     1
 
index f95bf2b1fa1475a8c6a6189909ba1ea63fbbb909..250845bdb70a4e4cccdc9d091745a0fbcea9f591 100644 (file)
@@ -1,4 +1,4 @@
 
 # concentrator/combiner
-0x8300    0001   0
-0x8300    0002   0
+0x8300    0010   0
+0x8300    0020   0
index a480b5f1fb46d10b1a338018993129521c34ba1e..a7a2e55f750ab49cacc843699fe83f844b3dd04d 100644 (file)
@@ -5,11 +5,11 @@
 # 0x1234    14     0
 #CTS
 
-0x0840             84     0
-0x8841             84     1  # hub
-0x0842             84     2
-0x0843             84     3
-0xc001      84            5
+0x0840             165    0
+0x0841             165    1  
+0x8165             165    2 #hub
+0x0843             165    3
+0xc001      165    5
 
 #slave
 0x0610             61     0
 0x0613             61     3
 0x8610      61            5
 
-#slave
-0x1130            113     0
-0x1131            113     1
-0x1132            113     2
-0x1133            113     3
-0x8113     113            5
-
-#slave
-0x1580            158     0
-0x1581            158     1
-0x1582            158     2
-0x1583            158     3
-0x8158     158            5
-
index ff874836065f88c5cf0eff937af477c53bf6f0f7..7105766fdb2ae3799037d8cd1d3fc72aab9e7422 100644 (file)
@@ -10,6 +10,6 @@
 # Hub    #  Type  #     C0     #     C1     #     C2     #     C3     #     C4     #     C5     #     C6     #     C7     #    C8     #    C9     #      C10    #
 #################################################################################################################################################################
   0xc001      0       0xc001     0x00020001   0x00030062     0xEA60       0x578          1            0            1        0xffffff      0x7            0x1
-  0x8610      0       0x8000     0x00020001   0x00030062     0xEA60       0x578          1            0            1        0xffffff      0x7            0x1
-  0x8113      0       0x8001     0x00020001   0x00030062     0xEA60       0x578          1            0            1        0xffffff      0x7            0x1
-  0x8158      0       0x8002     0x00020001   0x00030062     0xEA60       0x578          1            0            1        0xffffff      0x7            0x1
+#  0x8610      0       0x8000     0x00020001   0x00030062     0xEA60       0x578          1            0            1        0xffffff      0x7            0x1
+#  0x8113      0       0x8001     0x00020001   0x00030062     0xEA60       0x578          1            0            1        0xffffff      0x7            0x1
+#  0x8158      0       0x8002     0x00020001   0x00030062     0xEA60       0x578          1            0            1        0xffffff      0x7            0x1
index 93d22edbccc0d5ac1f3cf7ba08c45b080b5f2093..5081438ca868d55d82b4411b55a2e872412a3d14 100644 (file)
@@ -32,8 +32,8 @@
 #0xc001                0   0x214397EA    0x001b      0xc0a80002      0xc3a4     0xDEADc000     0x001B   0xc0a80154      0xc350     0x0578
 #0x8000                0   0x214397EA    0x001b      0xc0a80002      0xc38d     0xDEADc000     0x001c   0xc0a80155      0xc350     0x0578
 
-#14:dd:a9:d3:f4:b8 # hadesp39
- 0xc001                0   0xa9d3f4b8    0x14dd      0xc0a800b1      0xc3a4     0xDEADc000     0x001B   0xc0a80154      0xc350     0x0578
- 0x8610                0   0xa9d3f4b8    0x14dd      0xc0a800b1      0xc38d     0xDEADc001     0x001d   0xc0a80155      0xc350     0x0578
- 0x8113                0   0xa9d3f4b8    0x14dd      0xc0a800b1      0xc3c1     0xDEADc002     0x001d   0xc0a80156      0xc350     0x0578
- 0x8158                0   0xa9d3f4b8    0x14dd      0xc0a800b1      0xc3ee     0xDEADc003     0x001d   0xc0a80157      0xc350     0x0578
+#14:dd:a9:d3:f4:b8 # hadesp43
+ 0xc001                0   0xe48c8a36    0xf832      0xc0a864b5      0xc3f5     0xDEADc000     0x001B   0xc0a864b6      0xc350     0x0578
+# 0x8610               0   0xa9d3f4b8    0x14dd      0xc0a800b1      0xc38d     0xDEADc001     0x001d   0xc0a80155      0xc350     0x0578
+# 0x8113               0   0xa9d3f4b8    0x14dd      0xc0a800b1      0xc3c1     0xDEADc002     0x001d   0xc0a80156      0xc350     0x0578
+# 0x8158               0   0xa9d3f4b8    0x14dd      0xc0a800b1      0xc3ee     0xDEADc003     0x001d   0xc0a80157      0xc350     0x0578
index a5655d7d5f4517d348b1f34b0b064fb357aeefd0..48a6b7163dfa4e7c5ddb6ede8a175a9d94081ca1 100644 (file)
@@ -12,7 +12,7 @@
 
 #0xfe48                0   0x00000000   0x00000000   0x00000000   0x00000000   0x00000000   0x00000000
 #0xfe4a                0   0x00000000   0x00000000   0x00000000   0x00000000   0x00000000   0x00000000 # gpin addon
-0xfe4c         0   0x00000000   0x00000000   0x00000000   0x00000000   0x00000000   0x00000000 # padiwa addon
+#0xfe4c                0   0x00000000   0x00000000   0x00000000   0x00000000   0x00000000   0x00000000 # padiwa addon
 #0xfe4e                0   0x00000000   0x00000000   0x00000000   0x00000000   0x00000000   0x00000000 # ADA addon
 #0xfe50                0   0x00000000   0x00000000   0x00000000   0x00000000   0x00000000   0x00000000 # cbmtof
 #0xfe62                0   0x00000000   0x00000000   0x00000000   0x00000000   0x00000000   0x00000000 # trb3sc
@@ -20,8 +20,8 @@
 
 #0xfe48                0   0x50003000   0x80640064   0x00000000   0x00000000   0x0000007c   0x00000000
 #0xfe4a                0   0x50003000   0x80640064   0x00000000   0x00000000   0x0000007c   0x00000000 # gpin addon
-0xfe4c         0   0x50003000   0x80640064   0x00000000   0x00000000   0x0000007c   0x00000000 # padiwa addon
+#0xfe4c                0   0x50003000   0x80640064   0x00000000   0x00000000   0x0000007c   0x00000000 # padiwa addon
 #0xfe4e                0   0x50003000   0x80640064   0x00000000   0x00000000   0x0000007c   0x00000000 # ADA addon
 #0xfe50                0   0x50003000   0x80640064   0x00000000   0x00000000   0x0000007c   0x00000000 # cbmtof
 #0xfe62                0   0x50003000   0x80640064   0x00000000   0x00000000   0x0000007c   0x00000000 # trb3sc
-0xfe51         0   0x50003000   0x00640064   0x00000000   0x00000000   0x00000078   0x00000000 # dirich
+0xfe51         0   0x50003000   0x00640064   0x0000000f   0x00000000   0x00000078   0xffffffff # dirich
index d805e1d8ed919cee5169cbc03c5740f532ceb5b9..a5878f450317a3b45e2a2c77de0aa03888aacfc5 100644 (file)
@@ -10,13 +10,13 @@ void first()
    base::ProcMgr::instance()->SetHistFilling(4);
 
    // configure bubbles
-   hadaq::TdcProcessor::SetBubbleMode(3, 18);
+   //hadaq::TdcProcessor::SetBubbleMode(0, 18);
 
    // this limits used for liner calibrations when nothing else is available
    hadaq::TdcMessage::SetFineLimits(31, 491);
 
    // default channel numbers and edges mask
-   hadaq::TrbProcessor::SetDefaults(5, 1);
+   hadaq::TrbProcessor::SetDefaults(5, 3);
 
    // [min..max] range for TDC ids
    hadaq::TrbProcessor::SetTDCRange(0x1200, 0x12FF);
@@ -31,8 +31,8 @@ void first()
    const char* calname = getenv("CALNAME");
    if ((calname==0) || (*calname==0)) calname = "test_";
    const char* calmode = getenv("CALMODE");
-   int cnt = (calmode && *calmode) ? atoi(calmode) : 10000;
-   cnt=100000;
+   int cnt = (calmode && *calmode) ? atoi(calmode) : 100000;
+   #cnt=50000;
    const char* caltrig = getenv("CALTRIG");
    unsigned trig = (caltrig && *caltrig) ? atoi(caltrig) : 0x1;
    const char* uset = getenv("USETEMP");
@@ -53,13 +53,13 @@ void first()
    //   (1 << 0xD) - special 0XD trigger with internal pulser, used also for TOT calibration
    //    0x3FFF - all kinds of trigger types will be used for calibration (excluding 0xE and 0xF)
    //   0x80000000 in mask enables usage of temperature correction
-   hld->ConfigureCalibration(calname, cnt, (1 << trig) | use_temp);
+   hld->ConfigureCalibration(calname, cnt, (1 << trig) | use_temp | 0x3FFF);
 
    // only accept trigger type 0x1 when storing file
    // new hadaq::HldFilter(0x1);
 
    // create ROOT file store
-   base::ProcMgr::instance()->CreateStore("td.root");
+   //base::ProcMgr::instance()->CreateStore("td.root");
 
    // 0 - disable store
    // 1 - std::vector<hadaq::TdcMessageExt> - includes original TDC message
@@ -99,9 +99,11 @@ extern "C" void after_create(hadaq::HldProcessor* hld)
 
       // tdc->SetStoreEnabled();
       for (unsigned nch=2;nch<tdc->NumChannels();nch++)
-        tdc->SetRefChannel(nch, nch-2, 0xffff, 20000,  -10., 10.);
+        tdc->SetRefChannel(nch, nch-1, 0xffff, 20000,  -100., 100.);
 
-      tdc->SetRefChannel(1, tdc->NumChannels() -1 , 0xffff, 20000,  -10., 10.);
+      //tdc->SetRefChannel(6, 3, 0xffff, 20000,  -100., 100.);
+
+      //tdc->SetRefChannel(1, tdc->NumChannels() -1 , 0xffff, 20000,  -100., 100.);
 
       
    }
index 71fdcc54bdad2fe9f8a65d8c236f3c0ce2c13a2c..3c85724e20bbbfab35d8894690fe6de34493e0d2 100644 (file)
 #include "hadaq/TdcSubEvent.h"
 
 class SecondProc : public base::EventProc {
-   protected:
-
-      std::string fTdcId;      //!< tdc id where channels will be selected
-
-      double      fHits[33][2];    //!< 33 channel, abstract hits, two dges
-
-      base::H1handle  hNumHits; //!< histogram with hits number
-      base::H1handle  hDif1; //!< histogram with hits number
-      base::H1handle  hDif2; //!< histogram with hits number
-      base::H2handle  hUser; //!< user-defined 2D histogram
-
-   public:
-      SecondProc(const char* procname, const char* _tdcid) :
-         base::EventProc(procname),
-         fTdcId(_tdcid),
-         hUser(0)
-      {
-         printf("Create %s for %s\n", GetName(), fTdcId.c_str());
-
-         hNumHits = MakeH1("NumHits","Num hits", 100, 0, 100, "number");
-
-        /*
-         hDif1 = MakeH1("ToT1","ToT of channel 17 (18)", 1000, 0.5, 3.0, "ns");
-         hDif2 = MakeH1("LED_diff1","LED diff channel 17 - 21", 1000, -2., -1., "ns");
-         hUser = MakeH2("ToT_vs_LED","ToT versus LED difference", 500, -4, 0, 500, -2, -1, "ToT/ns;LED diff/ns");
-        */
-        
-         hDif1 = MakeH1("LE1","1 vs. 2", 30000, -90, 90, "ns");
-         hDif2 = MakeH1("TE2","1 vs. 2", 30000, -90, 90, "ns");
-        
-
-        /*
-        hDif1 = MakeH1("ToT1","ToT of channel 9", 1000, 32, 40, "ns");
-         hDif2 = MakeH1("LED_diff1","LED diff channel 9 - 11", 1000, -3, -1, "ns");
-         hUser = MakeH2("ToT_vs_LED","ToT versus LED difference", 500, 32, 40, 500, -4, -0, "ToT/ns;LED diff/ns");
-        */
-        
-         // enable storing already in constructor
-         // SetStoreEnabled();
-      }
-
-      virtual void CreateBranch(TTree* t)
-      {
-         // only called when tree is created in first.C
-         // one can ignore
-         // t->Branch(GetName(), fHits, "hits[8]/D");
-      }
-
-  unsigned eventnumber = 0;
-      virtual bool Process(base::Event* ev)
-      {
-       for (unsigned n=0;n<33;n++) {
-         fHits[n][0] = 0.;
-         fHits[n][1] = 0.;
-       }
-           
-       eventnumber++;
-         hadaq::TdcSubEventFloat* sub =
-               dynamic_cast<hadaq::TdcSubEventFloat*> (ev->GetSubEvent(fTdcId));
-
-         //printf("%s process sub %p %s\n", GetName(), sub, fTdcId.c_str());
-
-         // when return false, event processing is cancelled
-         if (sub==0) return true;
-
-         double num(0);
-
-         for (unsigned cnt=0;cnt<sub->Size();cnt++) {
-            const hadaq::MessageFloat& msg = sub->msg(cnt);
-
-            unsigned chid = msg.getCh();
-            unsigned edge = msg.getEdge(); // 0 - rising, 1 - falling
-            // if (chid==0) { ch0tm = ext.GetGlobalTime(); continue; }
-
-            // time relative ch0
-            double tm = msg.stamp;
+protected:
+
+  std::string fTdcId;      //!< tdc id where channels will be selected
+
+  double      fHits[33][2];    //!< 33 channel, abstract hits, two dges
+  //unsigned eventnumber = 0;
+  
+  base::H1handle  hNumHits; //!< histogram with hits number
+  
+  base::H1handle  hToTch3;
+  base::H1handle  hToTch4;
+  base::H1handle  hTdifflch3ch4;
+  base::H1handle  hTdifftch3ch4;
+  base::H1handle  hTdifflch3ch4_cut1;
+  base::H1handle  hTdifftch3ch4_cut1;
+  base::H1handle  hTdifflch3ch4_cut2;
+  base::H1handle  hTdifftch3ch4_cut2;
+  
+public:
+  SecondProc(const char* procname, const char* _tdcid) :
+    base::EventProc(procname),
+    fTdcId(_tdcid)
+
+  {
+    printf("Create %s for %s\n", GetName(), fTdcId.c_str());
+
+    hNumHits = MakeH1("NumHits","Num hits", 100, 0, 100, "number");
+
+    hToTch3 = MakeH1("hToTch3","ToTch3",400,-20,20, "ns");
+    hToTch4 = MakeH1("hToTch4","ToTch4",400,-20,20, "ns");
+    hTdifflch3ch4 = MakeH1("hTdifflch3ch4","Tdifflch3ch4",500,-10,20,"ns");
+    hTdifftch3ch4 = MakeH1("hTdifftch3ch4","Tdifftch3ch4",500,-10,20,"ns"); 
+    hTdifflch3ch4_cut1 = MakeH1("hTdifflch3ch4_cut1","Tdifflch3ch4",500,-10,20,"ns");
+    hTdifftch3ch4_cut1 = MakeH1("hTdifftch3ch4_cut1","Tdifftch3ch4",500,-10,20,"ns");
+    hTdifflch3ch4_cut2 = MakeH1("hTdifflch3ch4_cut2","Tdifflch3ch4",500,-10,20,"ns");
+    hTdifftch3ch4_cut2 = MakeH1("hTdifftch3ch4_cut2","Tdifftch3ch4",500,-10,20,"ns");
+    
+    // enable storing already in constructor
+    // SetStoreEnabled();
+  }
+
+  virtual void CreateBranch(TTree* t)
+  {
+    // only called when tree is created in first.C
+    // one can ignore
+    // t->Branch(GetName(), fHits, "hits[8]/D");
+  }
+
+
+  virtual bool Process(base::Event* ev)
+  {
+    for (unsigned n=0;n<33;n++) {
+      fHits[n][0] = 0.;
+      fHits[n][1] = 0.;
+    }
+        
+    //eventnumber++;
+    hadaq::TdcSubEventFloat* sub =
+      dynamic_cast<hadaq::TdcSubEventFloat*> (ev->GetSubEvent(fTdcId));
+
+    //printf("%s process sub %p %s\n", GetName(), sub, fTdcId.c_str());
+
+    // when return false, event processing is cancelled
+    if (sub==0) return true;
+
+    double num(0);
+
+    for (unsigned cnt=0;cnt<sub->Size();cnt++) {
+      const hadaq::MessageFloat& msg = sub->msg(cnt);
+
+      unsigned chid = msg.getCh();
+      unsigned edge = msg.getEdge(); // 0 - rising, 1 - falling
+      // if (chid==0) { ch0tm = ext.GetGlobalTime(); continue; }
+
+      // time relative ch0
+      double tm = msg.stamp;
             
-            if (chid<33) fHits[chid][edge] = tm;
+      if (chid<33) fHits[chid][edge] = tm;
 
-            //printf("  ch:%3d tm:%f, edge:%d\n", chid, tm, edge);
-            num+=1;
-         }
+      //printf("  ch:%3d tm:%f, edge:%d\n", chid, tm, edge);
+      num+=1;
+    }
          
-         //printf("tot(%d): %f %f\n", eventnumber, (fHits[9][0] - fHits[9][1]), (fHits[11][0] - fHits[11][1]));
-        //printf("led(%d): %f %f\n", eventnumber, (fHits[9][0] - fHits[11][0]), (fHits[9][1] - fHits[11][1]));
+    //printf("tot(%d): %f %f\n", eventnumber, (fHits[9][0] - fHits[9][1]), (fHits[11][0] - fHits[11][1]));
+    //printf("led(%d): %f %f\n", eventnumber, (fHits[9][0] - fHits[11][0]), (fHits[9][1] - fHits[11][1]));
+
+    FillH1(hNumHits, num);
+
+    double ToTch3, ToTch4;
+    double LETch3,TETch3,LETch4,TETch4;
+
+    LETch3=fHits[3][0];
+    TETch3=fHits[3][1];
+    LETch4=fHits[4][0];
+    TETch4=fHits[4][1];
+    
+    ToTch3=TETch3-LETch3 - 18;  // subtract TDC offsets
+    ToTch4=TETch4-LETch4 - 19.5;  // individual offsets for each channel !
+
+    // Leading AND Trailing edge in both channels 3+4
+    if ( fabs(LETch3) <0.00001 || fabs(LETch4) < 0.00001 )
+      return true;
+    if ( fabs(TETch3) <0.00001 || fabs(TETch4) < 0.00001 )
+      return true;
+    if ( (ToTch3>8) || (ToTch4>8) || (ToTch3<0) || (ToTch4<0))
+      return true;
+
+    // Fill ToT histograms
+    FillH1(hToTch3,ToTch3);
+    FillH1(hToTch4,ToTch4); 
+    
+    // Fill dT ch4-ch3 histograms
+    double tdiff_leading=LETch4-LETch3;
+    double tdiff_trailing=TETch4-TETch3;
+    
+    if (ToTch3>0.0 && ToTch4>0.0) {
+      FillH1(hTdifflch3ch4,tdiff_leading);
+      FillH1(hTdifftch3ch4,tdiff_trailing);
+    }
+    if (ToTch3>2.0 && ToTch3<8.0 && ToTch4>2.0 && ToTch4<8.0) {
+      FillH1(hTdifflch3ch4_cut1,tdiff_leading);
+      FillH1(hTdifftch3ch4_cut1,tdiff_trailing);
+    }
+    if (ToTch3>3.5 && ToTch3<8.0 && ToTch4>3.5 && ToTch4<8.0) {
+      FillH1(hTdifflch3ch4_cut2,tdiff_leading);
+      FillH1(hTdifftch3ch4_cut2,tdiff_trailing);
+    }                     
+
+    return true;
+  }
 
-         FillH1(hNumHits, num);
 
-        /*
-         FillH1(hDif1, (fHits[9][1] - fHits[9][0]) );
-         FillH1(hDif2, (fHits[9][0] - fHits[11][0]) );
-         FillH2(hUser, (fHits[9][1] - fHits[9][0]) , (fHits[9][0] - fHits[11][0]) );
-        */
-
-        
-        FillH1(hDif1, (fHits[1][0] - fHits[2][0]) );
-         FillH1(hDif2, (fHits[1][1] - fHits[2][1]) );
-
-         return true;
-      }
 };
 
 
@@ -114,5 +146,5 @@ void second()
 {
   //new SecondProc("A", "TDC_1133");
   //new SecondProc("A", "TDC_1580");
-  new SecondProc("A", "TDC_1207");
+  new SecondProc("A", "TDC_1208");
 }
index ef5c93a33803ae1a22931beb575640425f69026a..a20e560f325dfd6d0bfa07037ab3ee5d7162ff42 100755 (executable)
@@ -1,23 +1,23 @@
 #!/bin/bash
 
-DAQ_TOOLS_PATH=~/trbsoft/daqtools
-USER_DIR=~/trbsoft/daqtools/users/gsi_ee_trb84
-TRB_WEB_DIR=$DAQ_TOOLS_PATH/web
+export DAQ_TOOLS_PATH=~/trbsoft/daqtools
+export USER_DIR=~/trbsoft/daqtools/users/gsi_rich
+export TRB_WEB_DIR=$DAQ_TOOLS_PATH/web
 
 export PATH=$PATH:$DAQ_TOOLS_PATH
 export PATH=$PATH:$DAQ_TOOLS_PATH/tools
 export PATH=$PATH:$USER_DIR
 
-export TRB3_SERVER=trb084:26000
-export TRBNETDPID=$(pgrep -f "trbnetd -i 84")
+export TRB3_SERVER=trbp165:26000
+export TRBNETDPID=$(pgrep -f "trbnetd -i 165")
 #export DAQOPSERVER=hadeb05:84
-export DAQOPSERVER=hades39:84
+export DAQOPSERVER=hadesp43:165
 
 echo "- trbnetd pid: $TRBNETDPID"
 
 if [[ -z "$TRBNETDPID" ]] 
 then
-    ~/trbsoft/trbnettools/bin/trbnetd -i 84
+    ~/trbsoft/trbnettools/bin/trbnetd -i 165
 fi
 
 ./check_ping.pl --reboot
@@ -87,12 +87,12 @@ trbcmd loadbit 0x8300 0xd580 0x6 0x6
 
 echo "pulser"
 # pulser #0 to 10 kHz
-trbcmd w 0xc001 0xa150 0x0000270f   
-#trbcmd w 0xc001 0xa150 0x0022270f   
+#trbcmd w 0xc001 0xa154 0x0000270f  # cts design newer than 2016.09
+trbcmd w 0xc001 0xa150 0x0000270f   # 
 
-echo "trigger type"
+#echo "trigger type"
 # set trigger type to 0x1
-trbcmd setbit 0xc001 0xa155 0x10
+#trbcmd setbit 0xc001 0xa155 0x10
 
 echo "pulser enable"
 # pulser enable
@@ -109,8 +109,10 @@ cd $USER_DIR
 
 trbcmd w 0xfe51 0xdf80 0xffffffff # enable monitor counters
 
-trbcmd w 0x1133 0xc804 0x7c # max number of words
-trbcmd clearbit 0x1133 0xc801 0x80000000 # disable window
-trbcmd w 0x1133 0xc802 0x00000c03 # enable pulser
+#trbcmd w 0x1133 0xc804 0x7c # max number of words
+#trbcmd clearbit 0x1133 0xc801 0x80000000 # disable window
+#trbcmd w 0x1133 0xc802 0x00000c03 # enable pulser
 
 #trbcmd setbit 0xc001 0xa101 0x8 # enable external trigger in of CTS
+trbcmd setbit 0xc001 0xa101 0x1 # enable pulser
+
index 82b7efed72e35e84c86302e553e6c4712e395bc3..430799e922f14159eff13fabfed66c5c447c1ff9 100755 (executable)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 ### Change THIS!
-my $required_endpoints = 20;
+my $required_endpoints = 5;
 
 
 
index a9b01b0400ae76be6b953d3953effba3c7b4b35c..35b4bb6e48a3bfb6b16b2757ec3da4d466a17700 100644 (file)
@@ -2,7 +2,7 @@ package CtsConfig;
 
 #default cts endpoint. can be overriden by a command line parameter
 sub getDefaultEndpoint {
-   return 0xc000;
+   return 0xc001;
 }
 
 1;