diff --git a/src/Scandalizer.cxx b/src/Scandalizer.cxx index 249e199a21da1e04d99694977b0edc3705e28162..f4c0c49050954ad7bb706bb355e681987e9a561b 100644 --- a/src/Scandalizer.cxx +++ b/src/Scandalizer.cxx @@ -22,14 +22,14 @@ Int_t Scandalizer::ReadOneEvent() Int_t status = THaRunBase::READ_OK; while(_skip_events > 0 ) { - std::cout << _skip_events << " skipping\n"; + _logger->debug("non-zero skip_events: {}", _skip_events); int skipped = 0; auto run = dynamic_cast<THaRun*>(fRun); if( run ) { skipped = run->SkipToEndOfFile(_skip_events); } _skip_events = 0; - std::cout << skipped << " skipped\n"; + _logger->debug("skipped {} events", skipped); continue; } if (to_read_file){ @@ -275,15 +275,16 @@ Int_t Scandalizer::Process( THaRunBase* run ) //--- Report statistics if( fVerbose>0 ) { cout << dec; - if( status == THaRunBase::READ_EOF ) - cout << "End of file"; - else if ( fNev == nlast ) - cout << "Event limit reached."; - else if ( fatal ) - cout << "Fatal processing error."; - else if ( terminate ) - cout << "Terminated during processing."; - cout << endl; + if( status == THaRunBase::READ_EOF ){ + _logger->info("End of file status, THaRunBase::READ_EOF"); + } + else if ( fNev == nlast ) { + _logger->info("Event limit reached."); + } else if ( fatal ) { + _logger->error("Fatal processing error."); + } else if ( terminate ) { + _logger->warn("Terminated during processing."); + } if( !fatal ) { PrintCounters(); @@ -294,9 +295,9 @@ Int_t Scandalizer::Process( THaRunBase* run ) } // Print cut summary (also to file if one given) - if( !fatal ) { - PrintCutSummary(); - } + //if( !fatal ) { + // PrintCutSummary(); + //} // Print timing statistics, if benchmarking enabled if( fDoBench && !fatal ) { diff --git a/src/THcScalerEvtHandler.cxx b/src/THcScalerEvtHandler.cxx index a785b704a1516ac4699c3f039a9900aa273de3cd..808feb51c491dc931c5caeb930675b2270bbd9fe 100644 --- a/src/THcScalerEvtHandler.cxx +++ b/src/THcScalerEvtHandler.cxx @@ -114,7 +114,8 @@ Int_t THcScalerEvtHandler::End( THaRunBase* ) { // Process any delayed events in order received - cout << "THcScalerEvtHandler::End Analyzing " << fDelayedEvents.size() << " delayed scaler events" << endl; + _param_logger->info("THcScalerEvtHandler::End Analyzing {} delayed scaler events", fDelayedEvents.size()); + for(std::vector<UInt_t*>::iterator it = fDelayedEvents.begin(); it != fDelayedEvents.end(); ++it) { UInt_t* rdata = *it; @@ -728,8 +729,9 @@ THaAnalysisObject::EStatus THcScalerEvtHandler::Init(const TDatime& date) // fNormSlot is the slot#, checked for consistency if (clkchan >= 0) { scalers[idx]->SetClock(defaultDT, clkchan, clkfreq); - cout << "Setting scaler clock ... channel = "<<clkchan<<" ... freq = "<<clkfreq<<endl; - if (fDebugFile) *fDebugFile <<"Setting scaler clock ... channel = "<<clkchan<<" ... freq = "<<clkfreq<<endl; + _param_logger->info("Setting scaler clock ... channel = {} ... freq = {} ", + clkchan, clkfreq); + if (fDebugFile) *fDebugFile <<"Setting scaler clock ... channel = "<<clkchan<<" ... freq = "<<clkfreq<<endl; fNormIdx = idx; if (islot != fNormSlot) cout << "THcScalerEvtHandler:: WARN: contradictory norm slot ! "<<islot<<endl; diff --git a/src/THcSecondaryKine.cxx b/src/THcSecondaryKine.cxx index 157efc9a8c41bae3788de25d7eb8031b4d5be90e..55c26f30422d1ccc28aee5fe2a76b57e04066bf7 100644 --- a/src/THcSecondaryKine.cxx +++ b/src/THcSecondaryKine.cxx @@ -293,6 +293,7 @@ Int_t THcSecondaryKine::ReadDatabase( const TDatime& date ) prefix[0] = tolower(GetName()[0]); prefix[1] = '\0'; + _param_logger->info("THcSecondaryKine prefix = {}", prefix ); fOopCentralOffset = 0.0; DBRequest list[]={ {"_oopcentral_offset",&fOopCentralOffset,kDouble, 0, 1}, @@ -300,18 +301,19 @@ Int_t THcSecondaryKine::ReadDatabase( const TDatime& date ) {0} }; gHcParms->LoadParmValues((DBRequest*)&list,prefix); - cout << "THcSecondaryKine particleMASS: " << fMX << endl; - + //cout << "THcSecondaryKine particleMASS: " << fMX << endl; + _param_logger->info("THcSecondaryKine particleMASS: {}", fMX ); return kOK; } //_____________________________________________________________________________ void THcSecondaryKine::SetMX( Double_t m ) { - if( !IsInit()) - fMX = m; - else + if (!IsInit()) { + fMX = m; + } else { PrintInitError("SetMX()"); + } } //_____________________________________________________________________________ diff --git a/src/THcTimeSyncEvtHandler.cxx b/src/THcTimeSyncEvtHandler.cxx index 0f81bbe3acee726378f30a28307d1e25910fb35d..e29ea8572065c18ca14862eb4c5bf391128edc1e 100644 --- a/src/THcTimeSyncEvtHandler.cxx +++ b/src/THcTimeSyncEvtHandler.cxx @@ -209,7 +209,9 @@ Int_t THcTimeSyncEvtHandler::Analyze(THaEvData *evdata) fFirstTime = kFALSE; fDumpNew=2; } - if(issyncevent) cout << "SYNC event" << endl; + if(issyncevent){ + _param_logger->info("SYNC event"); + } AccumulateStats(fLastEventWasSync); fLastEventWasSync = issyncevent; @@ -220,7 +222,7 @@ Int_t THcTimeSyncEvtHandler::Analyze(THaEvData *evdata) fWriteDelayed=kTRUE; // cout << "Will write corrected event" << endl; } else { - cout << "Skipping event " << evdata->GetEvNum() << endl; + _param_logger->info( "Skipping event {}", evdata->GetEvNum() ); } } else { // Not slipping yet, just copy event if(fCodaOut) {