diff --git a/armory/EventBuilder.cpp b/armory/EventBuilder.cpp index 6631362..5aebf48 100644 --- a/armory/EventBuilder.cpp +++ b/armory/EventBuilder.cpp @@ -181,9 +181,9 @@ int main(int argc, char ** argv){ int percentage = count * 100/totNumEvent; - if( percentage > last_precentage + 1.0 ) { + if( percentage >= last_precentage ) { printf("Processed : %u, %.0f%% \n\033[A\r", count, count*100./totNumEvent); - last_precentage = percentage; + last_precentage = percentage + 1.0; } } diff --git a/armory/GeneralSort.C b/armory/GeneralSort.C index a98e61a..28c228e 100644 --- a/armory/GeneralSort.C +++ b/armory/GeneralSort.C @@ -81,9 +81,9 @@ Bool_t GeneralSort::Process(Long64_t entry){ if( !isParallel){ processedEntry ++; float percentage = processedEntry*100/NumEntries; - if( percentage > lastPercentage + 1.0) { + if( percentage >= lastPercentage ) { printf("Processed : %lld, %.0f%% \n\033[A\r", entry, percentage); - lastPercentage = percentage; + lastPercentage = percentage + 1.0; } } @@ -95,7 +95,7 @@ Bool_t GeneralSort::Process(Long64_t entry){ //^############################################################## void GeneralSort::Terminate(){ - printf("========================= %s\n", __func__); + printf("=============================== %s\n", __func__); DecodeOption(); @@ -106,7 +106,6 @@ void GeneralSort::Terminate(){ saveFile->Close(); } - printf("=======================================================\n"); //get entries saveFile = TFile::Open(saveFileName); if( saveFile->IsOpen() ){ @@ -115,9 +114,10 @@ void GeneralSort::Terminate(){ saveFile->Close(); - printf("=======================================================\n"); + printf("=========================================================================\n"); PrintTraceMethod(); printf("----- saved as \033[1;33m%s\033[0m. valid event: %d\n", saveFileName.Data() , validCount); + printf("=========================================================================\n"); } } @@ -136,14 +136,10 @@ void GeneralSort::Begin(TTree * tree){ } void GeneralSort::SlaveBegin(TTree * /*tree*/){ - printf("%s\n", __func__); } void GeneralSort::SlaveTerminate(){ - - printf("\n%s\n", __func__); - if( isParallel){ printf("%s::SaveTree\n", __func__); saveFile->cd(); diff --git a/armory/GeneralSort.h b/armory/GeneralSort.h index 6802ab9..df7199b 100644 --- a/armory/GeneralSort.h +++ b/armory/GeneralSort.h @@ -253,8 +253,6 @@ void GeneralSort::DecodeOption(){ //^############################################################## void GeneralSort::Init(TTree *tree){ - printf("%s\n", __func__); - // Set branch addresses and branch pointers if (!tree) return; fChain = tree; @@ -299,7 +297,6 @@ void GeneralSort::Init(TTree *tree){ } Bool_t GeneralSort::Notify(){ - printf("%s\n", __func__); return kTRUE; } @@ -312,7 +309,7 @@ void GeneralSort::PrintTraceMethod(){ case 2 : traceMethodStr = "Trapezoid"; break; default: traceMethodStr = "Unknown"; break; } - printf(" Trace method ? %s \n", traceMethodStr); + printf("\033[1;33m ===== Trace method ? %s \033[m\n", traceMethodStr); } #endif // #ifdef GeneralSort_cxx diff --git a/armory/GeneralSortAgent.C b/armory/GeneralSortAgent.C index ff26a8e..9b05435 100644 --- a/armory/GeneralSortAgent.C +++ b/armory/GeneralSortAgent.C @@ -13,7 +13,7 @@ void GeneralSortAgent(Int_t runNum, int nWorker = 1, int traceMethod = -1){ chain->GetListOfFiles()->Print(); - printf("----------------------------\n"); + printf("\033[1;33m---------------------total number of Events %llu\033[0m\n", chain->GetEntries()); //this is the option for TSelector, the first one is traceMethod, 2nd is save fileName; TString option; diff --git a/armory/Process_Download b/armory/Process_Download index 171175a..91c8127 100755 --- a/armory/Process_Download +++ b/armory/Process_Download @@ -8,6 +8,9 @@ if [ $# -eq 0 ] || [ $1 == "-help" ]; then fi; RUN=$1 +runNum=${RUN#0} #remove zero +RUN=$(printf '%03d' $runNum) ##add back the zero + source $SOLARISANADIR/armory/Process_BasicConfig source $SOLARISANADIR/working/expName.sh diff --git a/armory/Process_Run b/armory/Process_Run index 3ed09a3..86da979 100755 --- a/armory/Process_Run +++ b/armory/Process_Run @@ -56,12 +56,14 @@ if [ ${PCID} -eq 1 ]; then else source Process_Download $RUN - source Process_EventBuilder $RUN $EventBld + source Process_EventBuilder $RUN $EventBld $timeWin fi #################################### GeneralSort +source Process_Sort $RUN $nWorker $TraceMethod + #################################### Monitor