Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F19251203
meta2yaml
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
meta2yaml
View Options
#! /usr/bin/env python
import
sys
,
os
PROGPATH
=
sys
.
argv
[
0
]
PROGNAME
=
os
.
path
.
basename
(
PROGPATH
)
## Change dlopen status to GLOBAL for Rivet lib
try
:
import
ctypes
sys
.
setdlopenflags
(
sys
.
getdlopenflags
()
|
ctypes
.
RTLD_GLOBAL
)
except
:
import
dl
sys
.
setdlopenflags
(
sys
.
getdlopenflags
()
|
dl
.
RTLD_GLOBAL
)
import
textwrap
import
rivet
anames
=
rivet
.
AnalysisLoader
.
allAnalysisNames
()
for
aname
in
anames
:
ana
=
rivet
.
AnalysisLoader
.
getAnalysis
(
aname
)
s
=
""
s
+=
"Name:
%s
\n
"
%
ana
.
name
()
s
+=
"Year:
%s
\n
"
%
ana
.
year
()
s
+=
"Summary:
%s
\n
"
%
ana
.
summary
()
s
+=
"Experiment:
%s
\n
"
%
ana
.
experiment
()
s
+=
"Collider:
%s
\n
"
%
ana
.
collider
()
s
+=
"SpiresID:
%s
\n
"
%
ana
.
spiresId
()
s
+=
"Status:
%s
\n
"
%
ana
.
status
()
s
+=
"Authors:
\n
"
for
a
in
ana
.
authors
():
s
+=
" -
%s
\n
"
%
a
s
+=
"References:
\n
"
for
r
in
ana
.
references
():
s
+=
" -
%s
\n
"
%
r
if
ana
.
runInfo
():
s
+=
"RunInfo:
\n
"
#lines = textwrap.wrap(ana.runInfo())
lines
=
ana
.
runInfo
()
.
splitlines
()
for
l
in
lines
:
s
+=
"
%s
\n
"
%
l
s
+=
"NumEvents: 1000000
\n
"
s
+=
"PtCuts: [0]
\n
"
s
+=
"Description:
\n
"
lines
=
textwrap
.
wrap
(
ana
.
description
())
for
l
in
lines
:
s
+=
"
%s
\n
"
%
l
.
strip
()
#print s
#print "\n\n-----------------------------\n\n"
afile
=
"
%s
.info.yaml"
%
aname
if
len
(
sys
.
argv
)
>
1
:
outdir
=
sys
.
argv
[
1
]
if
not
os
.
access
(
outdir
,
os
.
W_OK
):
os
.
makedirs
(
outdir
)
afile
=
os
.
path
.
join
(
outdir
,
afile
)
f
=
open
(
afile
,
"w"
)
f
.
write
(
s
)
f
.
close
()
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Sep 30, 5:48 AM (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6566375
Default Alt Text
meta2yaml (1 KB)
Attached To
Mode
rRIVETHG rivethg
Attached
Detach File
Event Timeline
Log In to Comment