| 11 |
#include <TSystem.h> |
#include <TSystem.h> |
| 12 |
#include <iostream> |
#include <iostream> |
| 13 |
#include <sstream> |
#include <sstream> |
| 14 |
|
#include <cstdlib> |
| 15 |
#include <sys/types.h> |
#include <sys/types.h> |
| 16 |
#include <unistd.h> |
#include <unistd.h> |
| 17 |
#include <stdio.h> |
#include <stdio.h> |
| 114 |
return(0); |
return(0); |
| 115 |
}; |
}; |
| 116 |
// |
// |
| 117 |
|
stringstream figsave; |
| 118 |
if ( !beverbose ){ |
if ( !beverbose ){ |
| 119 |
// |
// |
| 120 |
const string fil = gSystem->BaseName(name.Data()); |
const string fil = gSystem->BaseName(name.Data()); |
| 130 |
const char *figrec = file2; |
const char *figrec = file2; |
| 131 |
// |
// |
| 132 |
const char *outDir = outdir; |
const char *outDir = outdir; |
|
stringstream figsave; |
|
| 133 |
figsave.str(""); |
figsave.str(""); |
| 134 |
figsave << outDir << "/" ; |
figsave << outDir << "/" ; |
| 135 |
figsave << figrec << "_CaloQLOOK.txt"; |
figsave << figrec << "_CaloQLOOK.txt"; |
| 136 |
// |
// |
| 137 |
// redirect to /dev/null the stdout and stderr |
// redirect to /dev/null the stdout and stderr |
| 138 |
// |
// |
| 139 |
nul = open(figsave.str().c_str(), O_CREAT | O_RDWR,S_IREAD | S_IWRITE); |
nul = open(figsave.str().c_str(), O_CREAT | O_RDWR,S_IREAD | S_IWRITE | S_IRGRP | S_IWGRP | S_IROTH); |
| 140 |
dup2(nul,1); |
dup2(nul,1); |
| 141 |
dup2(nul,2); |
dup2(nul,2); |
| 142 |
}; |
}; |
| 143 |
printf("\n Welcome to FCaloQLOOK! \n"); |
printf("\n Welcome to FCaloQLOOK! v1r23 \n"); |
| 144 |
// |
// |
| 145 |
FCaloQLOOK(name,fromev,toev,outdir,format,iactive,w4i); |
FCaloQLOOK(name,fromev,toev,outdir,format,iactive,w4i); |
| 146 |
// |
// |