small improve
This commit is contained in:
parent
fc3a73cd6c
commit
aa5580bf25
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user