31 int main(
int argc, 
char **argv)
 
   44     JParser<> zap(
"Auxiliary program to monitor memory and CPU usage of process.");
 
   47     zap[
'P'] = 
make_field(process,     
"name of process");
 
   48     zap[
'T'] = 
make_field(T_us,        
"interval time [us]")    =  100000;
 
   49     zap[
'u'] = 
make_field(interactive, 
"run in interactive mode");
 
   54   catch(
const exception &error) {
 
   55     FATAL(error.what() << endl);
 
   59   JKeypress keypress(
false);
 
   61   const char QUIT = 
'q';
 
   64     cout << 
"Press '" << QUIT << 
"' to quit." << endl;
 
   69   for (
int i = 0; ;++i) {
 
   73       pid = 
getPID(shell, process.c_str());
 
   77     catch(
const exception& error) {
 
   80         cout << 
"No process " << setw(8) << i << endl;
 
   83       if (keypress.timeout(T_us)) {
 
   84         if (keypress.get() == QUIT && interactive) {
 
   91   NOTICE(
"Process identifier " << pid << endl);
 
   94     FATAL(
"Invalid process identifier " << pid << endl);
 
   97   TH1D h0(
"h0", NULL, 101,-0.5, 100.5);
 
   98   TH1D 
h1(
"h1", NULL, 101,-0.5, 100.5);
 
  106   for (
int i = 0; ;++i) {
 
  121         cout << setw(8) << i << 
' ' << 
FIXED(7,3) << mem << 
' ' << 
FIXED(7,3) << cpu << endl;
 
  124       if (keypress.timeout(T_us)) {
 
  125         if (keypress.get() == QUIT && interactive) {
 
  130     catch(
const exception& error) {
 
  136   TGraph g0(
X.size(), 
X.data(), 
Y.data());
 
  137   TGraph 
g1(
X.size(), 
X.data(), 
Z.data());
 
Utility class to parse command line options. 
 
float getMemoryUsage(JShell &shell, const pid_t pid)
Get memory usage in percent of given process identifier. 
 
int main(int argc, char *argv[])
 
#define MAKE_CSTRING(A)
Make C-string. 
 
then for HISTOGRAM in h0 h1
 
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
 
Auxiliary data structure for floating point format specification. 
 
I/O formatting auxiliaries. 
 
Keyboard settings for unbuffered input. 
 
static const JLocalTime getLocalTime
Function object to get local time in micro seconds. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
float getCpuUsage(JShell &shell, const pid_t pid)
Get cpu usage in percent of given process identifier. 
 
pid_t getPID(JShell &shell, const char *process)
Get process identifier. 
 
General purpose messaging. 
 
long long int localtime_t
Type definition of local time. 
 
Utility class to parse command line options. 
 
Shell interaction via I/O streams. 
 
no fit printf nominal n $STRING awk v X
 
do set_variable MODULE getModule a $WORKDIR detector_a datx L $STRING JEditDetector a $WORKDIR detector_a datx M $MODULE setz o $WORKDIR detector_a datx JEditDetector a $WORKDIR detector_b datx M $MODULE setz o $WORKDIR detector_b datx done echo Output stored at $WORKDIR detector_a datx and $WORKDIR tripod_a txt JDrawDetector2D a $WORKDIR detector_a datx a $WORKDIR detector_b datx L BL o detector $FORMAT $BATCH JDrawDetector2D T $WORKDIR tripod_a txt T $WORKDIR tripod_b txt L BL o tripod $FORMAT $BATCH JCompareDetector a $WORKDIR detector_a datx b $WORKDIR detector_b datx o $WORKDIR abc root &dev null for KEY in X Y Z
 
Double_t g1(const Double_t x)
Function.