Hi,
I have a quite strange problem with this little program:
int main(int argc, char **argv)
{
TApplication theApp(“App”, &argc, argv);
std::cout << argc << std::endl;
for (unsigned int nfiles = 1 ; nfiles < argc ; nfiles++)
{
std::cout << nfiles << “\t” << argv[nfiles] << std::endl;
}
theApp.Run();
return 0;
}
If I leave the TApplication theApp(…) at the top then this call of TrackingAna.exe ignores the input argument:
./TrackingAna.exe
/home/wildauer/data/data10_7TeV.00165956.express_express.vtxmon.D3PD_TRK.x44_c331._0001.1
and the print out is just
1
(which is num arguments and the first on is the program itself).
If I move TApplication past the print out then everything is fine. It prints
2
/home/wildauer/data/data10_7TeV.00165956.express_express.vtxmon.D3PD_TRK.x44_c331._0001.1
now the fun part is if I change the argument i.e. replace the .1 at the end with .2 then it works again …
any other string but the one above seems to work.
When I give 2 arguments in the “non working” case and the first one is
/home/wildauer/data/data10_7TeV.00165956.express_express.vtxmon.D3PD_TRK.x44_c331._0001.1
and the second one is
blabla
then it prints:
2
blabla
meaning it ignores the first string again. I am very confused about what is going on here!
My root version is root_v5.26.00.Linux-slc5_amd64-gcc3.4
Cheers
Andi