Title: The HERA-B database services detector configuration, calibration, alignment, slow control, data classification
1The HERA-B database servicesdetector
configuration, calibration, alignment, slow
control, data classification
A. Amorim, Vasco Amaral, Umberto Marconi, Tome
Pessegueiro, Stefan Steinbeck, Antonio Tome,
Vicenzo Vagnoni and Helmut Wolters
- The HERA-B detector
- The database problem
- The Architecture
- The Berkeley-DB DBMS
- The client/server integration
- The domains and solutions
- Conclusions and Outlook
2HERA-B Experiment
B0/B0 J/y KS
Vertex Detector Si strip 12 mm resolution
RICH (p/K) multianode PMT
ECAL(ge/h) W/Pb scintillator shashlik
MUON (m/h) tube,pad and gas pixel chambers
TRD (e/h) straw tubes thin fibers
C4F10
HiPt trigger pad/gas pixel
Magnet 2 Tm
Tracking - ITR(lt20cm) MSGC-GEM -
OTR(gt20cm) 510mm drift cells
3The HERA-B detector
RICH
SVD (not visible)
ECAL
Muon 1,3,4
Magnet
TRD OTR
ITR- OTR chambers
4The main challenge Selecting
5How do we select them?
Time scale
4 s
5ms
200ms
10ms
Pretrigger ECAL, m System, p T pads L1 e/m
Tracking in 4 SL, p T cut, mass cut
L3 full track vertex fit, SVD tracks, p. id
1/200
1/100
TAPE
1/2.5
1/10
L2 drift times, magnet traversal, vertexing
L4 full reconstruction, physics selection
Input rate
20 Hz
10MHz
50 kHz
500 Hz
50 Hz
6HERA-B DAQ
Detector Front End Electronics
FCS
1000 SHARC (DSP)
Event Control
DSP SWITCH
DSP SWITCH
Trigger PC
Trigger PC
Trigger PC
SLT/TLT
INTERNET SWITCH
4LT PC
4LT PC
4LT
Logger PC
L2-farm 240 PCs L4-farm 200 PCs
7The HERA-B database problem
8Characterizing the context
9Querying on time intervals
one can select objects by the values of their
attributes
Most of our requests want to query on time or
version exception Event Tag Database select
on (Part Type, E, Pt, etc).
Query on time gt Object(Time) or
Object(t1,t2)
Our simple database layer on top of Berkeley DB
provides that otherwise one has to specialize
the DBMS ( example the conditions database of
BaBar and RD45)
t
10Keys, objects and client/server
client/server at the SDB level RPM -gt an UDP
based communication package.
11The Berkeley DB
See http//www.sleepycat.com/
- Embedded transactional store with logging,
locking, commit and roll back, disaster recovery. - Intended for high-concurrency read-write
workloads, transactions and recoverability. - Cursors to speed access from many clients..
- Open Source policy The license is free for
non-commercial purposes - rather nice support - No client/server support is provided
12Slow Control Interface
Metadata Object
Data Object
Update
Update
Pmt1000 Pmt1003 Pmt2000
1.2 ...
1 ... 1.5 ... 2 ...
1.6 ... 2.3 ...
time
Optimized Queries
13Associations to Events
...
...
...
Index Obj.
Index Obj.
Index Obj.
Revision 0 - online
Calibrating
1 - offline
Index Obj.
Active server interface
Index Objects (referenced by events)
Client/server
Dynamic Associations
Index Obj. Created in active Servers
14The index API design
Index objects can associate also to transaction
objects which are not data but are associated to
sets of data objects that must be considered
together.
Tools were also developed
15The Parameter Distribution (cont.)
16(No Transcript)
17Basic n-n associations (LEDA)
- Associations are navigated with iterators
- Using hash tables.
- Keys as OIDs with the scope of classes.
- Explicitly loaded or saved (as containers)
LEDA - Object Manager (hash table implemented
associations)
Active server interface
Key objects (referenced by events)
Client/server
18GUI for editing and drawing
From RD JAVA, TCL/TK, gtk Reusing and extending
widget. Data hidden from TCL/TK
ROOT database Binding
Socket Client/ Server
19General Architecture
109 Evt./y
20The Cache Server
WAN TCP/IP gateway
User client
Cache
Cache
Db- server
User client
User client
Db- server
Cache
Memory
21The Replication Mechanism
firewall
ONLINE
OFFLINE
Offline DB server
DB server
imported
Incremental dump files
Send to tape
DB server
Offline DB server
22DAQ configuration
23DAQ (Software Components)
24VDS databases
25Maintaining the system
- A slow control process is permanently checking
the state of the database servers. - It issues alarms for the detector shift crew
- Tools to start and stop the dynamic
configuration of database servers are to be used
by a set of experts. - The configuration and startup of the distributed
database server system is performed using a
special configuration database for this system.
26Conclusions
- ONLINE
- Large number of Clients gt Gigabytes per Update
- broadcast simultaneously to SLT
- tree of cache database servers to the 4LT
- Correlates (dynamically) each event with the
databases objects - 600 k SLC parameters using data and update
objects - parameter history is re-clustered on the database
servers - The online database system has been successfully
commissioned - OFFLINE
- Replication mechanism decouples online from
offline - also provides incremental backup of the data
- TCP/IP gateways and proxies
- data warehousing for data-set classification
-gt MySQL - Relation to event tag under evaluation
- Also providing persistency to ROOT objects
- Using Open Source external packages has been
extremely useful.
27Future directions ...
One must have a plan even if it is a wrong one ...
Berkeley DB
MySQL
Client
Client
Client
Persistent State Service PSS
Persistent State Service PSS
CORBA
Client
Client
(ORBacus)
Open Communications Interface (OCI)
IIOP
UDP/ based
Farms
WAN