StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
StEStructPool
macros
getRandomSeed.C
1
int
getRandomSeed() {
2
3
char
* jobid = gSystem->Getenv(
"JOBID"
);
4
float
fjobid=0.9999;
5
if
(jobid){
// reset fjobid from job number after _ in the envvar JOBID
6
char
* ptr=strstr(jobid,
"_"
);
7
if
(ptr){
8
ptr++;
9
fjobid=atof(ptr)+1;
10
}
11
}
12
int
timestamp=time(NULL);
13
int
iseed = (int)((
float
)timestamp/fjobid);
14
15
return
iseed;
16
};
Generated by
1.8.5