diff --git a/source/LumiCalReco/include/LumiCalClusterer.h b/source/LumiCalReco/include/LumiCalClusterer.h index b83fa95..dd666dd 100644 --- a/source/LumiCalReco/include/LumiCalClusterer.h +++ b/source/LumiCalReco/include/LumiCalClusterer.h @@ -25,6 +25,11 @@ #include #include +enum RETVAL { + NOK = 0, + OK = 1, +}; + namespace EVENT { class CalorimeterHit; class LCEvent; @@ -45,7 +50,7 @@ class LumiCalClustererClass { void setCutOnFiducialVolume( bool cutFlag ) { _cutOnFiducialVolume = cutFlag; } // main actions in each event -Called for every event - the working horse. - int processEvent( EVENT::LCEvent * evt ) ; + RETVAL processEvent( EVENT::LCEvent * evt ) ; MapIntMapIntVInt _superClusterIdToCellId; MapIntMapIntVDouble _superClusterIdToCellEngy; diff --git a/source/LumiCalReco/src/LumiCalClusterer.cpp b/source/LumiCalReco/src/LumiCalClusterer.cpp index eb14053..ad6f601 100644 --- a/source/LumiCalReco/src/LumiCalClusterer.cpp +++ b/source/LumiCalReco/src/LumiCalClusterer.cpp @@ -154,9 +154,7 @@ void LumiCalClustererClass::init( GlobalMethodsClass const& gmc ){ /* ============================================================================ main actions in each event: ========================================================================= */ -int LumiCalClustererClass::processEvent( EVENT::LCEvent * evt ) { - int OK = 1; - int NOK = 0; +RETVAL LumiCalClustererClass::processEvent( EVENT::LCEvent * evt ) { // increment / initialize global variables _totEngyArm[-1] = _totEngyArm[1] = 0.; _numHitsInArm[-1] = _numHitsInArm[1] = 0; @@ -175,7 +173,7 @@ int LumiCalClustererClass::processEvent( EVENT::LCEvent * evt ) { of IMPL::CalorimeterHitImpl. Hits are split in two std::vectors, one for each arm of LumiCal. -------------------------------------------------------------------------- */ - if ( !getCalHits(evt , calHits) ) return NOK; + if ( !getCalHits(evt , calHits) ) return RETVAL::NOK; /* -------------------------------------------------------------------------- @@ -258,6 +256,6 @@ int LumiCalClustererClass::processEvent( EVENT::LCEvent * evt ) { } } - return OK; + return RETVAL::OK; } diff --git a/source/LumiCalReco/src/MarlinLumiCalClusterer.cpp b/source/LumiCalReco/src/MarlinLumiCalClusterer.cpp index 65ae183..1bff862 100644 --- a/source/LumiCalReco/src/MarlinLumiCalClusterer.cpp +++ b/source/LumiCalReco/src/MarlinLumiCalClusterer.cpp @@ -57,7 +57,7 @@ void MarlinLumiCalClusterer::TryMarlinLumiCalClusterer(EVENT::LCEvent* evt) { create clusters using: LumiCalClustererClass -------------------------------------------------------------------------- */ - bool stat = LumiCalClusterer.processEvent(evt); + RETVAL status = LumiCalClusterer.processEvent(evt); LCCollectionVec* LCalClusterCol = new LCCollectionVec(LCIO::CLUSTER); IMPL::LCFlagImpl lcFlagImpl; @@ -66,7 +66,7 @@ void MarlinLumiCalClusterer::TryMarlinLumiCalClusterer(EVENT::LCEvent* evt) { LCCollectionVec* LCalRPCol = new LCCollectionVec(LCIO::RECONSTRUCTEDPARTICLE); - if (stat) { + if (status == RETVAL::OK) { streamlog_out(DEBUG6) << " Transfering reco results to LCalClusterCollection....." << std::endl; for (int armNow = -1; armNow < 2; armNow += 2) {