Belle II Software
release-08-02-06
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
x
z
Typedefs
a
b
c
d
e
g
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
a
b
c
e
f
g
n
p
s
v
z
Enumerator
c
d
f
p
t
u
v
w
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Functions
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
Typedefs
Macros
TRGCDCFrontEndImplementation.cc
1
/**************************************************************************
2
* basf2 (Belle II Analysis Software Framework) *
3
* Author: The Belle II Collaboration *
4
* *
5
* See git log for contributors and copyright holders. *
6
* This file is licensed under LGPL-3.0, see LICENSE.md. *
7
**************************************************************************/
8
9
//-----------------------------------------------------------------------------
10
// Description : A program to generate VHDL code for the CDC trigger front-end.
11
//-----------------------------------------------------------------------------
12
13
#define TRG_SHORT_NAMES
14
15
#include <iostream>
16
#include <fstream>
17
#include <string>
18
#include "trg/trg/Utilities.h"
19
#include "trg/cdc/FrontEnd.h"
20
21
using namespace
std;
22
using namespace
Belle2
;
23
24
#define DEBUG_LEVEL 0
25
#define NAME "TRGCDCFrontEndImplementation"
26
#define VERSION "version 0.00"
27
#define NOT_CONNECTED 99999
28
29
int
30
main
(
int
argc,
const
char
* argv[])
31
{
32
33
cout << NAME <<
" ... "
<< VERSION << endl;
34
const
string
tab =
" "
;
35
36
//...Check arguments...
37
if
(argc < 2) {
38
cout << NAME <<
" !!! one argument necessary"
<< endl
39
<< tab <<
" 1 : Version for new config file"
<< endl;
40
return
-1;
41
}
42
43
//...Date...
44
string
ts0 = TRGUtil::dateStringF();
45
string
ts1 = TRGUtil::dateString();
46
47
//...2nd argument...
48
const
string
version = argv[1];
49
50
//...1st argument...
51
const
string
outname =
"TRGCDCFrontEndImplementation_"
+ version +
"_"
52
+ ts0 +
".vhdl"
;
53
54
//...Open configuration data...
55
ofstream outfile(outname.c_str(), ios::out);
56
if
(outfile.fail()) {
57
cout << NAME <<
" !!! can not open file"
<< endl
58
<<
" "
<< outname << endl;
59
return
-2;
60
}
61
62
//...Inner...
63
outfile <<
"-- Generated by "
<< NAME <<
" "
<< VERSION << endl;
64
outfile <<
"-- "
<< TRGCDCFrontEnd::version() << endl;
65
outfile <<
"-- "
<< ts1 << endl;
66
outfile <<
"--"
<< endl;
67
TRGCDCFrontEnd::implementation(TRGCDCFrontEnd::innerInside, outfile);
68
outfile.close();
69
70
//...Termination...
71
cout << NAME <<
" ... terminated"
<< endl;
72
}
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:17
main
int main(int argc, char **argv)
Run all tests.
Definition:
test_main.cc:91
trg
cdc
tools
TRGCDCFrontEndImplementation.cc
Generated on Tue Jan 28 2025 01:59:03 for Belle II Software by
1.9.1