STAR Data Base

 Auto QA code : loopMainAll.tcl (Written in Tool Command Language)

To get all the details in the runDescripter of the DB server since the begin date specified  to current time,

Works for all the past years.

mysql -h dbbak.starp.bnl.gov --port 3412 RunLog -s -E -e "select * from runStatus where runNumber= "

 mysql -h db04.star.bnl.gov --port 3412 RunLog -s -E -e "select * from runStatus where runNumber= "

mysql -h dbbak.starp.bnl.gov --port 3412 RunLog -s -E -e "select * from runDescriptor where beginTime>'2013-05-02 00:00:00'"

Works for current running year

mysql -h onl15.starp.bnl.gov --port 3501 RunLog -s -E -e "select * from runDescriptor where beginTime>'2013-05-02 00:00:00'"
 

runDescripter in DBserver gives following,

*************************** 3042. row ***************************
      dataID: 82242
   entryTime: 2013-06-11 19:12:39
      nodeID: 1
   elementID: 0
   beginTime: 2013-06-11 19:07:42
     endTime: 2037-01-01 00:00:00
      flavor: ofl
    schemaID: 1
    deactive: 0
   runNumber: 14162062
startRunTime: 1370977662
  endRunTime: 1370977948
glbSetupName: pedAsPhys_rhicclock
daqSetupName: physics
trgSetupName: pedAsPhys
 scSetupName: tcd
*************************** 3043. row ***************************
 

******************************************************************************************************************

mysql -h onl15.starp.bnl.gov --port 3501 RunLog -s -E -e " select  *  from  runStatus where runNumber=14135070"

runStatus in DBserver gives following,

*************************** 1. row ***************************
           dataID: 80053
        entryTime: 2013-05-16 04:30:18
           nodeID: 2
        elementID: 0
        beginTime: 2013-05-16 02:06:42
          endTime: 2037-01-01 00:00:00
           flavor: ofl
         schemaID: 1
         deactive: 0
        runNumber: 14135070
        rtsStatus: 0
shiftLeaderStatus: 0
 

**********************************************************************************************

mysql -h onl15.starp.bnl.gov --port 3501 RunLog -s -E -e "select * from detectorSet where runNumber=14122005"

 detectorSet in DBserver gives following,

*************************** 1. row ***************************
    dataID: 229135
 entryTime: 2013-05-02 06:32:10
    nodeID: 5
 elementID: 0
 beginTime: 2013-05-02 06:32:02
   endTime: 2037-01-01 00:00:00
    flavor: ofl
  schemaID: 1
  deactive: 0
 runNumber: 14122005
detectorID: 2
*************************** 2. row ***************************
    dataID: 229136
 entryTime: 2013-05-02 06:32:10
    nodeID: 5
 elementID: 0
 beginTime: 2013-05-02 06:32:02
   endTime: 2037-01-01 00:00:00
    flavor: ofl
  schemaID: 1
  deactive: 0
 runNumber: 14122005
detectorID: 3
*************************** 3. row ***************************
    dataID: 229137
 entryTime: 2013-05-02 06:32:10
...

 

mysql -h onl15.starp.bnl.gov --port 3501 RunLog -s -E -e "select * from detectorTypes where detectorID=22"

detectorTypes in DBserver gives following,

 

*************************** 1. row ***************************

    dataID: 24

 entryTime: 2011-01-24 15:40:09

    nodeID: 6

 elementID: 0

 beginTime: 1969-12-31 19:00:00

    flavor: ofl

   numRows: 1

  schemaID: 1

  deactive: 0

detectorID: 22

      name: mtd

   comment: Muon Tracking Detector

 *************************************************************************************************************

Trigger rates

 

mysql -h onl15.starp.bnl.gov --port 3501 Conditions_rts -s -E -e "select *  from triggers where name='ZDCMB' and idx_rn=14145070"

****************1.row**************

Normal
0
0
1
205
1172
Massachusetts Institute of Technology
9
2
1439
11.1287

0

0
0

            dataID: 696394

   

 

            entryTime: 2013-05-25 22:43:55

               nodeID: 31

            elementID: 28

            beginTime: 2013-05-25 22:43:51

              endTime: 2037-01-01 00:00:00

               flavor: ofl

             schemaID: 1

             deactive: 0

               idx_rn: 14145070

          idx_trigger: 30

                 name: ZDCMB

           offlineBit: 430004

        desiredTrgCmd: 4

        desiredDaqCmd: 10

           desiredPre: 0

          desiredPost: 0

 expected_L0_fraction: 0.79900002

      desired_L0_rate: 6.25000000

 expected_L1_fraction: 0.00000000

      desired_L1_rate: 0.00000000

 expected_L2_fraction: 0.00000000

      desired_L2_rate: 0.00000000

 expected_L3_fraction: 0.00000000

      desired_L3_rate: 0.00000000

           dataStream: 0

            tokenZero: 0

          calibration: 0

   detectorLiveOnBits: 48639

  detectorLiveOffBits: 0

      detectorRequest: 48639

                tcdId: 0

             millisec: 0

       trgNameVersion: 126

           trgVersion: 1909

        threshVersion: 32190

            psVersion: 39848

                 l0ps: 1

               eff_ps: 45745.88671875

                l1_id: 1

l1_special_processing: 0

                 l1ps: 1.00000000

                l2_id: 1

l2_special_processing: 0

                 l2ps: 1.00000000

                l3_id: 1

l3_special_processing: 0

                l3_ps: 45745.88671875

 

Normal
0
0
1
205
1171
Massachusetts Institute of Technology
9
2
1438
11.1287

0

0
0

 

 

 

**************************************************************************************
mysql -h onl15.starp.bnl.gov --port 3502 Conditions_rich -e "select * from richScalar"

+---------+---------------------+--------+-----------+---------------------+---------------------+--------+----------+----------+---------------+---------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+---------------+

| dataID  | entryTime           | nodeID | elementID | beginTime           | endTime             | flavor | schemaID | deactive | rs1           | rs2           | rs3          | rs4          | rs5          | rs6          | rs7          | rs8          | rs9          | rs10         | rs11         | rs12         | rs13         | rs14         | rs15         | rs16          |

+---------+---------------------+--------+-----------+---------------------+---------------------+--------+----------+----------+---------------+---------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+--------------+---------------+

| 3616509 | 2013-01-17 15:45:47 |      6 |         0 | 2013-01-17 15:45:47 | 2037-01-01 00:00:00 | ofl    |        1 |        0 |        0.0000 |        0.0000 |       0.0000 |       0.0000 |       0.0000 |       0.0000 |       0.0000 |       0.0000 |       0.0000 |       0.0000 |       0.0000 |       1.0000 |       1.0000 |       0.0000 |       0.0000 |        0.3000 | 

| 3616510 | 2013-01-17 15:46:47 |      6 |         0 | 2013-01-17 15:46:47 | 2037-01-01 00:00:00 | ofl    |        1 |        0 |        0.0000 |        0.0000 |       0.0000 |       0.0000 |       0.0000 |       0.0000 |       0.0000 |       0.0000 |       0.0000 |       0.0000 |       0.0000 |       1.0000 |       1.0000 |       0.0000 |       0.0000 |        0.0000 | 

| 3616511 | 2013-01-17 15:47:17 |      6 |         0 | 2013-01-17 15:47:17 | 2037-01-01 00:00:00 | ofl    |        1 | 

****************************************************************************************************************

mysql -h onl15.starp.bnl.gov --port 3501 Conditions_rts -s -E -e "select * from run where idx_rn=14145070"
*************************** 1. row ***************************
             dataID: 85659
          entryTime: 2013-05-25 22:43:55
             nodeID: 28
          elementID: 0
          beginTime: 2013-05-25 22:43:51
            endTime: 2037-01-01 00:00:00
             flavor: ofl
           schemaID: 2
           deactive: 0
             idx_rn: 14145070
           cfg_time: 1369521831
     GLB_SETUP_name: pp500_production_2013
         run_number: 14145070
             bField: -0.50099999
      base_trg_rate: 357837.00000000
        destination: 2
          DICT_name: trg_current.dict
     TRG_SETUP_name: pp500_production_2013
       TRG_RUN_name: rhicclock
     TCD_SETUP_name: tcd
     DAQ_SETUP_name: physics
       DAQ_RUN_name: daq
        L3_RUN_name: 
     Expansion_name: 
         TIER1_name: trg_13050700.bin
          configOpt: 0
     maxTknInSystem: 0
     minTknInSystem: 0
           tokenMod: 0
          nTokensIn: 0
       nTokenReturn: 0
         tokenTimer: 0
        clockSource: 2
      numClockTicks: 0
        l2DataWrite: 1
     dataWriteTimer: 0
       everyNEvents: 0
         enableHalt: 0
     enableContProt: 0
         ContLength: 0
           run_type: 3
    evp_suppression: 0
  event_suppression: 0
        gl3_formats: 0
  gl3_formats_local: 0
          write_daq: 0
        write_local: 0
            l3_rate: 0
             twhash: 1037
           dictHash: 4249037558
dataStreamNamesHash: 2377149638
       tcdSetupHash: 3426860371
 

*****************************************************************************************************

mysql -h onl15.starp.bnl.gov --port 3501 Scalers_rts -e "select * from  scaDaqScaler where idx_rn=14145070"
+---------+---------------------+--------+-----------+---------------------+---------------------+--------+----------+----------+----------+------------+-------------+------------+-------------+------+----------+
| dataID  | entryTime           | nodeID | elementID | beginTime           | endTime             | flavor | schemaID | deactive | idx_rn   | idx_period | beginPeriod | endPeriod  | type        | id   | numSeen  |
+---------+---------------------+--------+-----------+---------------------+---------------------+--------+----------+----------+----------+------------+-------------+------------+-------------+------+----------+
| 3405651 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633151 |    0 |   153456 | 
| 3405652 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633150 |    0 |       11 | 
| 3405653 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633151 |    1 |    30498 | 
| 3405654 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633150 |    1 |       13 | 
| 3405655 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633151 |    2 |     1852 | 
| 3405656 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633150 |    2 |       15 | 
| 3405657 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633151 |    4 |    93686 | 
| 3405658 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633150 |    4 |       12 | 
| 3405659 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633151 |    5 |    19874 | 
| 3405660 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633150 |    5 |       13 | 
| 3405661 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633151 |    6 |  1089380 | 
| 3405662 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633150 |    6 |        9 | 
| 3405663 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633151 |    7 |   367068 | 
| 3405664 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633150 |    7 |        9 | 
| 3405665 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633151 |    8 |     3037 | 
| 3405666 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633150 |    8 |        8 | 
| 3405667 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633151 |    9 |     1966 | 
| 3405668 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633150 |    9 |        9 | 
| 3405669 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633151 |   10 |     2931 | 
| 3405670 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633150 |   10 |        9 | 
| 3405671 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633151 |   11 |     1122 | 
| 3405672 | 2013-05-25 22:58:02 |      0 |         0 | 2013-05-25 22:58:00 | 2037-01-01 00:00:00 | ofl    |        1 |        0 | 14145070 |      65535 |  1369521824 | 1369522680 | -1091633150 |   11 |        8 |