Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- setTimestamp(long)
- getTimestamp()
- getSeconds(Date, Date)
- create(Bank)
- create(Bank, IndexedTable, IndexedTable, IndexedTable, double)
- create(Bank, IndexedTable, IndexedTable, IndexedTable, Date, Date)
- create(Bank, IndexedTable, IndexedTable, IndexedTable, IndexedTable)
- create(ConstantsManager, Bank, Bank)
- createRunBank(SchemaFactory)
- createHelicityBank(SchemaFactory)
- createBanks(SchemaFactory, Bank, IndexedTable, IndexedTable, IndexedTable, IndexedTable)
- createBanks(SchemaFactory, Bank, IndexedTable, IndexedTable, IndexedTable, double)
- createBanks(SchemaFactory, Bank, IndexedTable, IndexedTable, IndexedTable, Date, Date)
- createBanks(int, SchemaFactory, Event, ConstantsManager)
Class DaqScalers
java.lang.Object
org.jlab.detector.scalers.DaqScalers
Helper methods to read the RAW::scaler bank, and create RUN::scaler and
HEL::scaler from Dsc2Scaler and StruckScaler objects.
We have at least two relevant scaler hardware boards, STRUCK and DSC2, both
readout on helicity flips and with DAQ-busy gating, both decoded into RAW::scaler.
This class reads RAW::scaler and converts to more user-friendly information.
STRUCK. Latching on helicity states, zeroed upon readout, with both helicity
settle (normally 500 us) and non-settle counts, useful for "instantaneous"
livetime, beam charge asymmetry, beam trip studies, ...
DSC2. Integrating since beginning of run, useful for beam charge normalization.
- Author:
- baltzell
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DaqScalers
create
(ConstantsManager conman, org.jlab.jnp.hipo4.data.Bank runConfig, org.jlab.jnp.hipo4.data.Bank rawScaler) static DaqScalers
create
(org.jlab.jnp.hipo4.data.Bank runScalerBank) static DaqScalers
create
(org.jlab.jnp.hipo4.data.Bank rawScalerBank, org.jlab.utils.groups.IndexedTable fcupTable, org.jlab.utils.groups.IndexedTable slmTable, org.jlab.utils.groups.IndexedTable helTable, double seconds) static DaqScalers
create
(org.jlab.jnp.hipo4.data.Bank rawScalerBank, org.jlab.utils.groups.IndexedTable fcupTable, org.jlab.utils.groups.IndexedTable slmTable, org.jlab.utils.groups.IndexedTable helTable, Date rst, Date uet) static DaqScalers
create
(org.jlab.jnp.hipo4.data.Bank rawScalerBank, org.jlab.utils.groups.IndexedTable fcupTable, org.jlab.utils.groups.IndexedTable slmTable, org.jlab.utils.groups.IndexedTable helTable, org.jlab.utils.groups.IndexedTable dscTable) Same as create(Bank,IndexedTable,double), except relies on DSC2's clock.static List
<org.jlab.jnp.hipo4.data.Bank> createBanks
(int runnumber, org.jlab.jnp.hipo4.data.SchemaFactory schema, org.jlab.jnp.hipo4.data.Event event, ConstantsManager conman) static List
<org.jlab.jnp.hipo4.data.Bank> createBanks
(org.jlab.jnp.hipo4.data.SchemaFactory schema, org.jlab.jnp.hipo4.data.Bank rawScalerBank, org.jlab.utils.groups.IndexedTable fcupTable, org.jlab.utils.groups.IndexedTable slmTable, org.jlab.utils.groups.IndexedTable helTable, double seconds) Use user-defined seconds for run duration Faraday cup offset correction.static List
<org.jlab.jnp.hipo4.data.Bank> createBanks
(org.jlab.jnp.hipo4.data.SchemaFactory schema, org.jlab.jnp.hipo4.data.Bank rawScalerBank, org.jlab.utils.groups.IndexedTable fcupTable, org.jlab.utils.groups.IndexedTable slmTable, org.jlab.utils.groups.IndexedTable helTable, Date rst, Date uet) Use run start time and end times for run duration Faraday cup offset correction.static List
<org.jlab.jnp.hipo4.data.Bank> createBanks
(org.jlab.jnp.hipo4.data.SchemaFactory schema, org.jlab.jnp.hipo4.data.Bank rawScalerBank, org.jlab.utils.groups.IndexedTable fcupTable, org.jlab.utils.groups.IndexedTable slmTable, org.jlab.utils.groups.IndexedTable helTable, org.jlab.utils.groups.IndexedTable dscTable) Use scaler clock for run duration for Faraday cup offset correction.org.jlab.jnp.hipo4.data.Bank
createHelicityBank
(org.jlab.jnp.hipo4.data.SchemaFactory schema) org.jlab.jnp.hipo4.data.Bank
createRunBank
(org.jlab.jnp.hipo4.data.SchemaFactory schema) static double
getSeconds
(Date rst, Date uet) Get seconds between two dates assuming the differ by not more than 24 hours.long
setTimestamp
(long timestamp)
-
Field Details
-
Constructor Details
-
Method Details
-
setTimestamp
-
getTimestamp
public long getTimestamp() -
getSeconds
Get seconds between two dates assuming the differ by not more than 24 hours. The 24 hour requirement is because the java RCDB library currently provides times as java.sql.Time, which only supports HH:MM:SS and not full date. Necessitated because run-integrating DSC2's clock frequency in some run periods was too large and rolls over during run. And that was the only clock that is reset at beginning of the run. Since DAQ runs are never 24 hours, this works.- Parameters:
rst
- run start timeuet
- unix event time- Returns:
-
create
- Parameters:
runScalerBank
- HIPO RUN::scaler bank- Returns:
-
create
public static DaqScalers create(org.jlab.jnp.hipo4.data.Bank rawScalerBank, org.jlab.utils.groups.IndexedTable fcupTable, org.jlab.utils.groups.IndexedTable slmTable, org.jlab.utils.groups.IndexedTable helTable, double seconds) - Parameters:
rawScalerBank
- HIPO RAW::scaler bankfcupTable
- /runcontrol/fcup from CCDBslmTable
- /runcontrol/slm from CCDBhelTable
-seconds
- duration between run start and current event- Returns:
-
create
public static DaqScalers create(org.jlab.jnp.hipo4.data.Bank rawScalerBank, org.jlab.utils.groups.IndexedTable fcupTable, org.jlab.utils.groups.IndexedTable slmTable, org.jlab.utils.groups.IndexedTable helTable, Date rst, Date uet) - Parameters:
rawScalerBank
- HIPO RAW::scaler bankfcupTable
- /runcontrol/fcup from CCDBslmTable
- /runcontrol/slm from CCDBhelTable
- /runcontrol/helicity from CCDBrst
- run start timeuet
- unix event time- Returns:
-
create
public static DaqScalers create(org.jlab.jnp.hipo4.data.Bank rawScalerBank, org.jlab.utils.groups.IndexedTable fcupTable, org.jlab.utils.groups.IndexedTable slmTable, org.jlab.utils.groups.IndexedTable helTable, org.jlab.utils.groups.IndexedTable dscTable) Same as create(Bank,IndexedTable,double), except relies on DSC2's clock.- Parameters:
rawScalerBank
- HIPO RAW::scaler bankfcupTable
- /runcontrol/fcup from CCDBslmTable
- /runcontrol/slm from CCDBhelTable
- /runcontrol/helicity from CCDBdscTable
-- Returns:
-
create
public static DaqScalers create(ConstantsManager conman, org.jlab.jnp.hipo4.data.Bank runConfig, org.jlab.jnp.hipo4.data.Bank rawScaler) - Parameters:
conman
-runConfig
-rawScaler
-- Returns:
-
createRunBank
public org.jlab.jnp.hipo4.data.Bank createRunBank(org.jlab.jnp.hipo4.data.SchemaFactory schema) - Parameters:
schema
- bank schema- Returns:
- RUN::scaler banks
-
createHelicityBank
public org.jlab.jnp.hipo4.data.Bank createHelicityBank(org.jlab.jnp.hipo4.data.SchemaFactory schema) - Parameters:
schema
- bank schema- Returns:
- HEL::scaler banks
-
createBanks
public static List<org.jlab.jnp.hipo4.data.Bank> createBanks(org.jlab.jnp.hipo4.data.SchemaFactory schema, org.jlab.jnp.hipo4.data.Bank rawScalerBank, org.jlab.utils.groups.IndexedTable fcupTable, org.jlab.utils.groups.IndexedTable slmTable, org.jlab.utils.groups.IndexedTable helTable, org.jlab.utils.groups.IndexedTable dscTable) Use scaler clock for run duration for Faraday cup offset correction.- Parameters:
schema
- bank schemarawScalerBank
- RAW::scaler bankfcupTable
- /runcontrol/fcup CCDB tableslmTable
- /runcontrol/slm CCDB tablehelTable
- /runcontrol/helicity CCDB table- Returns:
- [RUN::scaler,HEL::scaler] banks
-
createBanks
public static List<org.jlab.jnp.hipo4.data.Bank> createBanks(org.jlab.jnp.hipo4.data.SchemaFactory schema, org.jlab.jnp.hipo4.data.Bank rawScalerBank, org.jlab.utils.groups.IndexedTable fcupTable, org.jlab.utils.groups.IndexedTable slmTable, org.jlab.utils.groups.IndexedTable helTable, double seconds) Use user-defined seconds for run duration Faraday cup offset correction.- Parameters:
schema
- bank schemarawScalerBank
- RAW::scaler bankfcupTable
- /runcontrol/fcup CCDB tableslmTable
- /runcontrol/slm CCDB tablehelTable
- /runcontrol/helicity CCDB tableseconds
- duration between run start and current event- Returns:
- [RUN::scaler,HEL::scaler] banks
-
createBanks
public static List<org.jlab.jnp.hipo4.data.Bank> createBanks(org.jlab.jnp.hipo4.data.SchemaFactory schema, org.jlab.jnp.hipo4.data.Bank rawScalerBank, org.jlab.utils.groups.IndexedTable fcupTable, org.jlab.utils.groups.IndexedTable slmTable, org.jlab.utils.groups.IndexedTable helTable, Date rst, Date uet) Use run start time and end times for run duration Faraday cup offset correction.- Parameters:
schema
- bank schemarawScalerBank
- RAW::scaler bankfcupTable
- /runcontrol/fcup CCDB tableslmTable
- /runcontrol/slm CCDB tablehelTable
- /runcontrol/helicity CCDB tablerst
- run start timeuet
- event time- Returns:
- [RUN::scaler,HEL::scaler] banks
-
createBanks
public static List<org.jlab.jnp.hipo4.data.Bank> createBanks(int runnumber, org.jlab.jnp.hipo4.data.SchemaFactory schema, org.jlab.jnp.hipo4.data.Event event, ConstantsManager conman) - Parameters:
runnumber
-schema
-event
-conman
-- Returns:
- [RUN::scaler,HEL::scaler] banks
-