Skip to content

Commit f3aa485

Browse files
committed
cleanup, avoid class variable
1 parent d010d99 commit f3aa485

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎common-tools/clas-detector/src/main/java/org/jlab/detector/decode/DetectorEventDecoder.java‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
*/
1919
public class DetectorEventDecoder {
2020

21-
boolean sharedManagers = false;
2221
ConstantsManager translationManager = new ConstantsManager();
2322
ConstantsManager fitterManager = new ConstantsManager();
2423
ConstantsManager scalerManager = new ConstantsManager();
@@ -54,8 +53,7 @@ public DetectorEventDecoder(DetectorEventDecoder d) {
5453
translationManager = d.translationManager;
5554
fitterManager = d.fitterManager;
5655
scalerManager = d.scalerManager;
57-
sharedManagers = true;
58-
initDecoder();
56+
initDecoder(false);
5957
}
6058

6159
public void setTimestamp(String timestamp) {
@@ -104,7 +102,11 @@ public final void initDecoderDev(){
104102
"/runcontrol/helicity","/daq/config/scalers/dsc1"}));
105103
}
106104

107-
public final void initDecoder(){
105+
public final void initDecoder() {
106+
initDecoder(true);
107+
}
108+
109+
public final void initDecoder(boolean initializeManagers){
108110

109111
// Detector translation table
110112
keysTrans = Arrays.asList(new DetectorType[]{DetectorType.FTCAL,DetectorType.FTHODO,DetectorType.FTTRK,DetectorType.LTCC,DetectorType.ECAL,DetectorType.FTOF,
@@ -136,7 +138,7 @@ public final void initDecoder(){
136138

137139
keysMicromega = Arrays.asList(new DetectorType[]{DetectorType.BMT,DetectorType.FMT,DetectorType.FTTRK});
138140

139-
if (!sharedManagers) {
141+
if (initializeManagers) {
140142
translationManager.init(tablesTrans);
141143
fitterManager.init(tablesFitter);
142144
scalerManager.init(Arrays.asList(new String[]{"/runcontrol/fcup","/runcontrol/slm","/runcontrol/hwp",

0 commit comments

Comments
 (0)