Skip to content

Commit 53b15b0

Browse files
committed
$STARFPE=NO no fpe, =YES float point exception is ON.In .DEV default is ON
1 parent 6e1e332 commit 53b15b0

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

StRoot/macros/rootlogon.C

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// $Id: rootlogon.C,v 1.37 2004/01/27 18:43:26 perev Exp $
1+
// $Id: rootlogon.C,v 1.38 2004/01/29 17:50:12 perev Exp $
22
//
33
//=======================================================================
44
// owner: Yuri Fisyak
@@ -9,12 +9,21 @@
99

1010
#pragma optimize 0
1111
// set FloatPointException trap
12-
if (strstr(gSystem->Getenv("STAR"),".DEV")
13-
|| gSystem->Getenv("STARFPE")) {
12+
namespace rootlogon {
13+
int fpe=0;const char *env=0;
14+
}
15+
rootlogon::fpe = strstr(gSystem->Getenv("STAR"),".DEV")!=0;
16+
rootlogon::env = gSystem->Getenv("STARFPE");
17+
if (rootlogon::env) {
18+
if (strcmp(rootlogon::env,"YES")==0) rootlogon::fpe=1;
19+
if (strcmp(rootlogon::env,"NO" )==0) rootlogon::fpe=0;
20+
}
21+
if (rootlogon::fpe) {
1422
gSystem->SetFPEMask(kInvalid | kDivByZero | kOverflow );
1523
printf("*** Float Point Exception is ON ***");
24+
} else {
25+
printf("*** Float Point Exception is OFF ***");
1626
}
17-
1827
// Load StarRoot lib.
1928
gSystem->Load("StarRoot");
2029
if (!strstr(gSystem->GetLibraries(),"libTable")) gSystem->Load("libTable");

0 commit comments

Comments
 (0)