Skip to content
This repository has been archived by the owner on May 18, 2023. It is now read-only.

Commit

Permalink
Removed redundant check on run>0 in detector reconstruction engines
Browse files Browse the repository at this point in the history
  • Loading branch information
raffaelladevita committed Dec 5, 2022
1 parent a4340ce commit b7005a9
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ public boolean processDataEvent(DataEvent event) {
Swim swimmer = new Swim();

int run = this.getRun(event);
if(run<=0) return true;

IndexedTable svtStatus = this.getConstantsManager().getConstants(run, "/calibration/svt/status");
IndexedTable svtLorentz = this.getConstantsManager().getConstants(run, "/calibration/svt/lorentz_angle");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public CVTSecondPassEngine() {
public boolean processDataEvent(DataEvent event) {

int run = this.getRun(event);
if(run<=0) return true;

Swim swimmer = new Swim();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ public boolean processDataEvent(DataEvent de,EBScalers ebs) {
if (de.hasBank("RUN::config")) {
run=de.getBank("RUN::config").getInt("run",0);
}
if (run<=0) {
LOGGER.log(Level.WARNING,"EBEngine: found no run number, CCDB constants not loaded, skipping event.");
return false;
}

EBCCDBConstants ccdb = new EBCCDBConstants(run,this.getConstantsManager());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ public boolean processDataEvent(DataEvent event) {
DataBank runConfig = event.getBank("RUN::config");
if (runConfig == null || runConfig.rows() == 0) return true;
int run = runConfig.getInt("run", 0);
int eventNumber = runConfig.getInt("event", 0);

if (run<=0) {
System.out.println("FMTEngine: found no run number, CCDB constants not loaded, skipping event.");
return false;
}

// Set swimmer.
Swim swimmer = new Swim();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ public boolean processDataEvent(DataEvent event) {
if (event.hasBank("RUN::config")) {
run = event.getBank("RUN::config").getInt("run",0);
}
if (run<=0) {
LOGGER.log(Level.WARNING,"RasterEngine: found no run number, CCDB constants not loaded, skipping event.");
return false;
}

IndexedTable adc2position = this.getConstantsManager().getConstants(run, "/calibration/raster/adc_to_position");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ public boolean processDataEvent(DataEvent event) {
runNo = bank.getInt("run", 0);
eventNo = bank.getInt("event",0);
magfieldfactor = bank.getFloat("solenoid",0);
if (runNo<=0) {
System.err.println("RTPCEngine: got run <= 0 in RUN::config, skipping event.");
return false;
}
}

magfield = 50 * magfieldfactor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,7 @@ public boolean processDataEvent(DataEvent event) {
//-------------------
final int newRun = bank.getInt("run", 0);
long timeStamp = bank.getLong("timestamp", 0);
if (newRun<=0) {
System.err.println("CTOFEngine: got run <= 0 in RUN::config, skipping event.");
return false;
}

if (timeStamp==-1) {
System.err.println("CTOFEngine: got 0 timestamp, skipping event");
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,7 @@ public boolean processDataEvent(DataEvent event) {
//-------------------
int newRun = bank.getInt("run", 0);
long timeStamp = bank.getLong("timestamp", 0);
if (newRun<=0) {
System.err.println("FTOFEngine: got run <= 0 in RUN::config, skipping event.");
return false;
}

if (timeStamp==-1) {
System.err.println("FTOFEngine: got 0 timestamp, skipping event");
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,6 @@ public boolean init() {
@Override
public boolean processDataEvent(DataEvent event) {

int run = -1;

if(event.hasBank("RUN::config")){
DataBank bank = event.getBank("RUN::config");
run = bank.getInt("run", 0);
if (run<=0) {
LOGGER.log(Level.WARNING,"URwellEngine: got run <= 0 in RUN::config, skipping event.");
return false;
}
}

List<URWellStrip> strips = URWellStrip.getStrips(event, factory, this.getConstantsManager());
List<URWellCluster> clusters = URWellCluster.createClusters(strips);
List<URWellCross> crosses = URWellCross.createCrosses(clusters);
Expand Down

0 comments on commit b7005a9

Please sign in to comment.