From 25217db94e337f369902bb5bfb30b3354fa39ab6 Mon Sep 17 00:00:00 2001 From: raffaelladevita Date: Wed, 13 Dec 2017 18:40:20 -0500 Subject: [PATCH] changed trigger type in EB banks to long to match new RUN::config --- .../src/main/java/org/jlab/clas/detector/DetectorData.java | 2 +- .../main/java/org/jlab/clas/detector/DetectorHeader.java | 6 +++--- etc/bankdefs/hipo/EVENT.json | 4 ++-- .../eb/src/main/java/org/jlab/service/eb/EBio.java | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/common-tools/clas-reco/src/main/java/org/jlab/clas/detector/DetectorData.java b/common-tools/clas-reco/src/main/java/org/jlab/clas/detector/DetectorData.java index 8e8d401d5b..e005ef085c 100644 --- a/common-tools/clas-reco/src/main/java/org/jlab/clas/detector/DetectorData.java +++ b/common-tools/clas-reco/src/main/java/org/jlab/clas/detector/DetectorData.java @@ -301,7 +301,7 @@ public static DataBank getEventBank(DetectorEvent detectorEvent, DataEvent event DataBank bank = event.createBank(bank_name, 1); bank.setInt("NRUN", 0, detectorEvent.getEventHeader().getRun()); bank.setInt("NEVENT", 0, detectorEvent.getEventHeader().getEvent()); - bank.setInt("TRG", 0, detectorEvent.getEventHeader().getTrigger()); + bank.setLong("TRG", 0, detectorEvent.getEventHeader().getTrigger()); bank.setFloat("STTime", 0, (float) detectorEvent.getEventHeader().getStartTime()); bank.setFloat("RFTime", 0, (float) detectorEvent.getEventHeader().getRfTime()); return bank; diff --git a/common-tools/clas-reco/src/main/java/org/jlab/clas/detector/DetectorHeader.java b/common-tools/clas-reco/src/main/java/org/jlab/clas/detector/DetectorHeader.java index 2b76d129a0..2670a6549e 100644 --- a/common-tools/clas-reco/src/main/java/org/jlab/clas/detector/DetectorHeader.java +++ b/common-tools/clas-reco/src/main/java/org/jlab/clas/detector/DetectorHeader.java @@ -8,7 +8,7 @@ public class DetectorHeader { private int run = 0; private int event = 0; - private int trigger = 0; + private long trigger = 0; private double rfTime = 0.0; private double startTime = -1000.0; @@ -31,7 +31,7 @@ public double getStartTime(){ return this.startTime; } - public int getTrigger() { + public long getTrigger() { return trigger; } @@ -51,7 +51,7 @@ public void setStartTime(double starttime){ this.startTime = starttime; } - public void setTrigger(int trigger) { + public void setTrigger(long trigger) { this.trigger = trigger; } } diff --git a/etc/bankdefs/hipo/EVENT.json b/etc/bankdefs/hipo/EVENT.json index b27d407969..0682c53275 100644 --- a/etc/bankdefs/hipo/EVENT.json +++ b/etc/bankdefs/hipo/EVENT.json @@ -10,7 +10,7 @@ {"name":"TYPE", "id":4, "type":"int8", "info":"Event Type (Data or MC)"}, {"name":"EvCAT", "id":5, "type":"int16", "info":"Event Category, if >0: e-, e-p, e-pi+....."}, {"name":"NPGP", "id":6, "type":"int16", "info":"Number of Final (Timed-based) Reconstructed Particles*100 + Number of Geometrically Reconstructed Particles"}, - {"name":"TRG", "id":7, "type":"int32", "info":"Trigger Type (CLAS12_e-, FT_CLAS12_h, CLAS12_H,...) + Prescale Factor for that Trigger"}, + {"name":"TRG", "id":7, "type":"int64", "info":"Trigger Type (CLAS12_e-, FT_CLAS12_h, CLAS12_H,...) + Prescale Factor for that Trigger"}, {"name":"BCG", "id":8, "type":"float", "info":"Beam charge, gated (Coulomb)"}, {"name":"LT", "id":9, "type":"double", "info":"Lifetime"}, {"name":"STTime", "id":10, "type":"float", "info":"Event Start Time (ns)"}, @@ -191,7 +191,7 @@ {"name":"TYPE", "id":4, "type":"int8", "info":"Event Type (Data or MC)"}, {"name":"EvCAT", "id":5, "type":"int16", "info":"Event Category, if >0: e-, e-p, e-pi+....."}, {"name":"NPGP", "id":6, "type":"int16", "info":"Number of Final (Timed-based) Reconstructed Particles*100 + Number of Geometrically Reconstructed Particles"}, - {"name":"TRG", "id":7, "type":"int32", "info":"Trigger Type (CLAS12_e-, FT_CLAS12_h, CLAS12_H,...) + Prescale Factor for that Trigger"}, + {"name":"TRG", "id":7, "type":"int64", "info":"Trigger Type (CLAS12_e-, FT_CLAS12_h, CLAS12_H,...) + Prescale Factor for that Trigger"}, {"name":"BCG", "id":8, "type":"float", "info":"Faraday Cup Gated (Coulomb)"}, {"name":"LT", "id":9, "type":"double", "info":"Clock"}, {"name":"STTime", "id":10, "type":"float", "info":"Event Start Time (ns)"}, diff --git a/reconstruction/eb/src/main/java/org/jlab/service/eb/EBio.java b/reconstruction/eb/src/main/java/org/jlab/service/eb/EBio.java index 9125d6be19..eed9ee0f51 100644 --- a/reconstruction/eb/src/main/java/org/jlab/service/eb/EBio.java +++ b/reconstruction/eb/src/main/java/org/jlab/service/eb/EBio.java @@ -26,7 +26,7 @@ public static DetectorHeader readHeader(DataEvent event) { DataBank bank = event.getBank("RUN::config"); dHeader.setRun(bank.getInt("run", 0)); dHeader.setEvent(bank.getInt("event", 0)); - dHeader.setTrigger(bank.getInt("trigger", 0)); + dHeader.setTrigger(bank.getLong("trigger", 0)); } return dHeader; }