Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F11221467
convert2bibtex_collaborationnotes.pl
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
convert2bibtex_collaborationnotes.pl
View Options
#!/usr/bin/perl -T -w
# This script creates a bibtex file of the collaboration notes called collaborationnotes.bib
# It uses example_data/HB_randomtest50points_Key.dat-for-comparison
use
strict
;
my
%cdf=();
my
%d0=();
my
%lhwg=();
my
$
correctsettings='no'
;
my
$
notenumber=''
;
open
FILE1
,
"<"
,
"example_data/HB_randomtest50points_Key.dat-for-comparison"
or
die
$
!;
#
Key
generated
by
HB
open
FILE3
,
">"
,
"collaborationnotes.bib"
or
die
$
!;
#
while
(
my
$
line
=
<
FILE1
>
)
{
#goes
through
each
line
in
the
file
if
(
$
line
=~
/
(
CDF
\sNote\s\d\d\d\d
)
/
i
){
$
cdf
{
$
1
}
=
1
;}
if
(
$
line
=~
/
(
D0
\sNote\s\d\d\d\d
)
/
i
){
$
d0
{
$
1
}
=
1
;}
if
(
$
line
=~
/
(
LHWG
\sNote\s\d\d\d\d\-\d\d
)
/
i
){
$
lhwg
{
$
1
}
=
1
;}
if
(
$
line
=~
m/\swith\sthe\ssetting\swhichanalyses\=
LandH
/
){
$
correctsettings='yes'
;}
}
if
(
$
correctsettings
ne
'yes'
){
print
"Something wrong with Key file\n"
;
die
;
}
foreach
(
keys
%cdf){
print
FILE3
"\n\n"
;
/
CDF
\sNote\
s
(
\d\d\d\d
)
/
;
$
notenumber=
$
1
;
print
FILE3
'@misc{cdf'
.
$
notenumber
.
','
.
"\n"
;
#print
FILE3
' author = "CDF, Collaboration",'
.
"\n"
;
print
FILE3
' collaboration = "CDF",'
.
"\n"
;
#print
FILE3
' howpublished = "CDF Notes'
;
print
FILE3
' note = "CDF Notes'
;
print
FILE3
'",'
.
"\n"
;
print
FILE3
' year = ""'
.
"\n"
;
print
FILE3
'}'
.
"\n\n"
;
}
foreach
(
keys
%d0){
/
D0
\sNote\
s
(
\d\d\d\d
)
/
;
$
notenumber=
$
1
;
print
FILE3
'@misc{dzero'
.
$
notenumber
.
','
.
"\n"
;
#print
FILE3
' author = "D0, Collaboration",'
.
"\n"
;
print
FILE3
' collaboration = "D0",'
.
"\n"
;
print
FILE3
' title = "",'
.
"\n"
;
print
FILE3
' note = "D0 Notes'
;
print
FILE3
'",'
.
"\n"
;
print
FILE3
' year = ""'
.
"\n"
;
print
FILE3
'}'
.
"\n\n"
;
}
foreach
(
keys
%lhwg){
/
LHWG
\sNote\
s
(
\d\d\d\d\-\d\d
)
/
;
$
notenumber=
$
1
;
print
FILE3
'@misc{LHWG'
.
$
notenumber
.
','
.
"\n"
;
#print
FILE3
' author = "LEP Higgs Working Group",'
.
"\n"
;
print
FILE3
' collaboration = "LHWG",'
.
"\n"
;
print
FILE3
' title = "",'
.
"\n"
;
print
FILE3
' note = "LHWG Notes'
;
print
FILE3
'",'
.
"\n"
;
print
FILE3
' year = ""'
.
"\n"
;
print
FILE3
'}'
.
"\n\n"
;
}
#\d means match any digit character
#/i means case independent
#| means 'or'
close
FILE1
;
close
FILE3
;
File Metadata
Details
Attached
Mime Type
text/x-perl
Expires
Wed, May 14, 10:28 AM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5068985
Default Alt Text
convert2bibtex_collaborationnotes.pl (2 KB)
Attached To
rHIGGSBOUNDSSVN higgsboundssvn
Event Timeline
Log In to Comment