From 62366fc3e7391a1ce7942553b2a49bf80d1eead7 Mon Sep 17 00:00:00 2001 From: Oliver Kirsebom <oliver.kirsebom@gmail.com> Date: Tue, 23 May 2017 22:10:18 +0300 Subject: [PATCH] progress gets correctly printed --- VeikonKone.dox | 6 +++--- allowed.mac | 6 ++++-- analysis/plot/CreateHisto.C | 3 ++- compile.sh | 4 ++-- src/VKEventAction.cpp | 2 ++ 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/VeikonKone.dox b/VeikonKone.dox index e494814..9feef7e 100644 --- a/VeikonKone.dox +++ b/VeikonKone.dox @@ -753,7 +753,7 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = /home/oliskir/f20/VeikonKone/include/ +INPUT = /home/oliskir/Desktop/f20/VeikonKone/include/ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -2087,7 +2087,7 @@ HIDE_UNDOC_RELATIONS = YES # set to NO # The default value is: NO. -HAVE_DOT = NO +HAVE_DOT = YES # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed # to run in parallel. When set to 0 doxygen will base this on the number of @@ -2259,7 +2259,7 @@ INTERACTIVE_SVG = YES # found. If left blank, it is assumed the dot tool can be found in the path. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_PATH = +DOT_PATH = /usr/bin # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the \dotfile diff --git a/allowed.mac b/allowed.mac index 1e225f5..8a82ada 100644 --- a/allowed.mac +++ b/allowed.mac @@ -25,7 +25,9 @@ # output /VK/output/zeroSuppression true /VK/storeTrajectoryData false -/VK/output/openFile output/220517/allowed_cut.root # run simulation -/run/beamOn 20000000 +/VK/output/openFile output/test1.root +/run/beamOn 1000 +/VK/output/openFile output/test2.root +/run/beamOn 1000 diff --git a/analysis/plot/CreateHisto.C b/analysis/plot/CreateHisto.C index c282a93..48d9df5 100644 --- a/analysis/plot/CreateHisto.C +++ b/analysis/plot/CreateHisto.C @@ -20,6 +20,7 @@ void CreateHisto(double hours = 168, int binWidth = 100, double ROImin = 5600, d const int bins = (emax - emin) / binWidth; vector<string> fname = {"backgr", "allowed", "forbidden", "pileup", "summing"}; + vector<string> hname = {"backgr", "allowed", "forbidden", "pileup", "summing"}; vector<double> sf; vector<TH1F*> hist, histVeto; @@ -30,7 +31,7 @@ void CreateHisto(double hours = 168, int binWidth = 100, double ROImin = 5600, d for (auto& fn : fname) { // output histogram names - TString hn = fn; + TString hn = hname[i]; TString hnV = hn + "Veto"; if (fn == "backgr") { diff --git a/compile.sh b/compile.sh index f8a0ae0..7854150 100755 --- a/compile.sh +++ b/compile.sh @@ -2,13 +2,13 @@ rm -f CMakeCache.txt rm -rf CMakeFiles #@carbonoli -#cmake -DCMAKE_BUILD_TYPE=DEBUG -DGeant4_DIR=/home/oliskir/src/geant-4.10/geant4.10.3-install/lib/Geant4-10.3.0 $pwd +cmake -DCMAKE_BUILD_TYPE=DEBUG -DGeant4_DIR=/home/oliskir/src/geant-4.10/geant4.10.3-install/lib/Geant4-10.3.0 $pwd #@squamish #cmake -DCMAKE_BUILD_TYPE=DEBUG -DGeant4_DIR=/home/oliskir/src/geant4/geant4.10.2-install/lib/Geant4-10.2.0 $pwd -DCMAKE_BUILD_TYPE=DEBUG #@stkernfys -cmake -DCMAKE_BUILD_TYPE=DEBUG -DGeant4_DIR=/home/kernadmin/geant4/geant4.10.2-install/lib/Geant4-10.2.2/ $pwd -DCMAKE_BUILD_TYPE=DEBUG +#cmake -DCMAKE_BUILD_TYPE=DEBUG -DGeant4_DIR=/home/kernadmin/geant4/geant4.10.2-install/lib/Geant4-10.2.2/ $pwd -DCMAKE_BUILD_TYPE=DEBUG make -j4 diff --git a/src/VKEventAction.cpp b/src/VKEventAction.cpp index 6bd4634..96bc38b 100644 --- a/src/VKEventAction.cpp +++ b/src/VKEventAction.cpp @@ -262,6 +262,8 @@ void VKEventAction::PrintProgress() // current event no. double evt = G4RunManager::GetRunManager() ->GetCurrentEvent()->GetEventID(); + + if (evt == 0) fEvtPct = 0; G4int evtPct = (evt + 0.5) / evtMax * 100; if (evtPct > fEvtPct && evt > 0) -- GitLab