JeffersonLab / coatjava

1 stars 18 forks source link

Run number mismatch in EVIO #214

Closed baltzell closed 8 months ago

baltzell commented 8 months ago

From one of RG-D's workflows, looks like /cache/clas12/rg-d/data/clas_019102/clas_019102.evio.00278 gives this:

Exception in thread "main" java.lang.RuntimeException: Run number mismatch:  19101/19101
    at org.jlab.detector.helicity.HelicitySequence.addState(HelicitySequence.java:93)
    at org.jlab.detector.helicity.HelicitySequence.addStream(HelicitySequence.java:520)
    at org.jlab.detector.decode.CLASDecoder4.main(CLASDecoder4.java:805)

(One of the "19101/19101" is just a printout mistake in the code.)

baltzell commented 8 months ago

Looks like these tables were requesting run 19101 from CCDB in a file from run 19102:

[ConstantsManager] --->  loading table for run = 19101
[DB] --->  open connection with : mysql://clas12reader@clasdb-farm.jlab.org/clas12
[DB] --->  database variation   : default
[DB] --->  database run number  : 19101
[DB] --->  database time stamp  : Thu Mar 07 03:01:25 EST 2024
[DB] --->  database connection  : success
***** >>> adding :          FTCAL / table = /daq/tt/ftcal
***** >>> adding :         FTHODO / table = /daq/tt/fthodo
***** >>> adding :          FTTRK / table = /daq/tt/fttrk
***** >>> adding :           LTCC / table = /daq/tt/ltcc
***** >>> adding :           ECAL / table = /daq/tt/ec
***** >>> adding :           FTOF / table = /daq/tt/ftof
***** >>> adding :           HTCC / table = /daq/tt/htcc
***** >>> adding :             DC / table = /daq/tt/dc
***** >>> adding :           CTOF / table = /daq/tt/ctof
***** >>> adding :            CND / table = /daq/tt/cnd
***** >>> adding :            BST / table = /daq/tt/svt
***** >>> adding :             RF / table = /daq/tt/rf
***** >>> adding :            BMT / table = /daq/tt/bmt
***** >>> adding :            FMT / table = /daq/tt/fmt
***** >>> adding :           RICH / table = /daq/tt/rich2
***** >>> adding :            HEL / table = /daq/tt/hel
***** >>> adding :           BAND / table = /daq/tt/band
***** >>> adding :           RTPC / table = /daq/tt/rtpc
***** >>> adding :         RASTER / table = /daq/tt/raster
[DB] --->  database disconnect  : success
baltzell commented 8 months ago

Yep, the RUN::config HIPO bank really thinks there's multiple run numbers.

First (useful) event in the file:

           run :      19102
         event :   20379394
      unixtime :          0
       trigger :       1152
     timestamp : 474915755268
          type :          0
          mode :          0
         torus :    -0.5000
      solenoid :     0.5000

And a few thousand events later we get a single, odd, run 19101 event:

* NODE * group =  10000, item =  11, type = 11, size =       38
           run :      19101
         event :   20651841
      unixtime : 1702373341
       trigger :        384
     timestamp : 544974522848
          type :          0
          mode :          0
         torus :    -0.5000
      solenoid :     0.5000
baltzell commented 8 months ago

Ah, it's a batch of 10 events, must be the event misordering that happened with wrong ET configuration during RG-D. Didn't know it could cross run numbers ...

baltzell commented 8 months ago

closed by #215