From 031c267fadc3a3a1f63f6ef238842328f6c7e608 Mon Sep 17 00:00:00 2001 From: hadaq Date: Mon, 28 Aug 2017 17:54:52 +0200 Subject: [PATCH] tool for checking rising and trailing edges --- users/gsi_dirc/check_tot.cc | 110 ++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 users/gsi_dirc/check_tot.cc diff --git a/users/gsi_dirc/check_tot.cc b/users/gsi_dirc/check_tot.cc new file mode 100644 index 0000000..32b1f9e --- /dev/null +++ b/users/gsi_dirc/check_tot.cc @@ -0,0 +1,110 @@ +#include +#include +using std::string; + + +#include +using std::cout; +using std::cerr; +using std::cin; +using std::endl; +#include +using std::hex; +using std::dec; +using std::oct; + +#include +using std::fstream; + +#include + +#include +using std::stringstream; + +#include +#include + + + +int main(int argc, char* argv[]) +{ + + + + fstream infile; + infile.open("check_tot.dat",std::ios::in); + + int good=0,bad=0,good_sum=0,bad_sum=0; + for (int i=0; i<30; i++) + { + + if (i<=15 || i>=20) + { + infile>>bad; + infile>>good; + + bad_sum+=bad; + good_sum+=good; + //cout<=2.0) + { + + cout<<"\033[1;31m"; + cout.precision(1); + cout.fill (' '); + cout.width(5); + cout<=2.0) + { + cout<<"\033[1;31m"; + } + else + { + cout<<"\033[1;32m"; + } + + cout.precision(1); + cout.fill (' '); + cout.width(5); + cout<