Trackermaps implementation

Download Report

Transcript Trackermaps implementation

Trackermaps implementation
Giuseppe Zito
Index
1. The goal
2. Early implementation
3. Problems encountered and their solution
4. Fedtrackermap implementation
5. Web interface
6. Implementation for online (DQM)
7. Future developments
2
The goal (1) : 3 use cases
(from TDR)
Three main use cases of Trackermap are
foreseen:
1. Dashboard display – A single image for the
whole tracker updated regularly and shown on
a terminal with sufficient resolution
2. A way to store and transfer in a single file
information about the whole tracker.
3. Graphics interface to access and modify
information to control the tracker during data
taking.
3
The goal (2) : many trackermaps
The
geometric
trackermap
has
to
be
complemented by other kinds of trackermaps or
views.
The

which

fedtrackermap
or
readout
view
shows fed channels as single elements.
The slow control view or fectrackermap
which shows control rings

Others (…)
4
Early implementation of
trackermaps(1)
svgmap1.xml
Early implementation of
trackermaps(2)
Each trackermap implemented by a different class in
CommonTools/TrackerMap
- TrackerMap for geometric trackermap
- FedTrackerMap for readout view
Both filled by method “fill” at module/fedchannel
level like an histogram
Saved on disk by method “print” as a single XML (SVG) file
with a Javascript interface.
Two problems with this implementation(1)
(the first problem)
Implementing the fedtrackermap as a different class
doesn’t describe well the real thing.
In fact we have the same data behind and we want only
to represent them in different ways:
as color of modules in the geotrackermap or as a color of the
connected fedchannels in the fedtrackermap.
(the solution)
There is only a single trackermap with many views. The
fedtrackermap is simply another representation of the
tracker information. It is implemented as a new method of
the same TrackerMap class
7
Two problems with this implementation(2)
(the second problem)
The browser SVG rendering engine ,when an
image has more than 5000 polylines
,becomes too slow to be compatible with an
interactive application
(the solution)
Divide et Impera! The SVG image (and file) is
partitioned in a few tens of smaller images
corresponding to “natural” tracker parts: i.e.
layers for geotrackermap, crates for
fedtrackermap.
8
Two problems with this implementation(3)
But the solution of cutting in pieces the trackermap image
creates a new problem: how you can fulfil goal 1 ( single
image) and goal 2 (single file) if you have to partition the
svg in 30+ files?
(solution)
An image representing the whole tracker is now computed
in png,jpg or pdf format, ready for visual inspection (goal
1).
Or a single SVG file (without Javascript) can be saved
where you store tracker data for future (computer or
human) inspection (goal 2).
This has been implemented with a new method:
save for geotrackermap
save_as_fedtrackermap for fedtrackermap
9
Two problems with this implementation(4)
Why we use firefox ?
- SVG completely integrated with HTML in a
single DOM tree
- The same Javascript can handle both HTML
elements and SVG graphics primitives.
- Firefox is giving full support to SVG
Compare with I.E. implementation:
- SVG image seen by Adobe plugin
- SVG Javascript doesn’t communicate with
HTML Javascript
- Microsoft doesn’t support SVG and Adobe is
discontinuing support to plugin.
10
Fedtrackermap implementation(1)
The real thing
11
Fedtrackermap implementation(2)
Synoptic view :each box is a crate with 18 smaller boxes representing fed
12
Fedtrackermap implementation(3)
Crate : the real thing
13
Fedtrackermap implementation(4)
Crate representation in
Fedtrackermap: 18 boxes
each one corresponding
to a slot.
Each box is a fed with
96 fedchannels
represented in a 8x12
matrix following the
readout cables
arrangements..
14
Fedtrackermap implementation(5)
The fedtrackemap is created automatically if you put in the cfg file:
PSet TkmapParameters = {
untracked bool loadFedCabling=true
}
The class TmApvPair is used to load information about fed channels.
The fed channels may be filled individually using the methods:
fillc_fed_channel
fill_fed_channel
The fedtrackermap can be printed as a single image (or saved as
xml )using method:
save_as_fedtrackermap(,,,filename)
where filename=“anything.png/jpg/pdf/svg”
The method printall creates authomatically the web interface for the
geotrackermap and the fedtrackermap(and in future for other trackermaps)
Other trackermaps will be implemented in the same way
15
Fedtrackermap implementation(6)
Sample code to fill each cell in geotrackermap and in the fedtrackermap
with a random color is: Create a normal trackermap: no need to create a special fedtrackermap
edm::ESHandle<SiStripFedCabling> tkFed;
tkMap = new TrackerMap("title");
const vector<unsigned short> feds = tkFed->feds();
for(vector<unsigned short>::const_iterator ifed = feds.begin();ifed<feds.end();ifed++){
const std::vector<FedChannelConnection> theconn = tkFed->connections( *ifed );
int red = rand()%256;int green=rand()%256;int blue=rand()%256;
for(std::vector<FedChannelConnection>::const_iterator iconn = theconn.begin();
iconn<theconn.end();iconn++){
kMap->fillc_fed_channel(iconn->fedId(), iconn->fedCh(),red,green,blue);
tkMap->fillc(iconn->detId(),red,green,blue);
}
}
Special methods to fill fed channels cells
tkMap->save(true,0.,0.,”tmapname.png”);
tkMap->save(true,0.,0.,”tkmapname.svg”);
tkmap->save_as_fedtrackermap(true,0.,0.,”tkmapnamefed.png”);
tkmap->save_as_fedtrackermap(true,0.,0.,”tkmapnamefed.svg”);
tkMap->printall(true,0.,0.,"tmapname");
Save fedtrackermap data in xml file
Save fedtrackermap as a single png image
Create web interface for all trackermaps
16
Fedtrackermap implementation(7)
17
The new Web interface(1)
Buttons to zoom trackermap
Buttons to navigate trackermap
Each trackermap in a separate tab
Panning possible also with mouse
18
The new Web interface(2): two levels of
viewing for each trackermap
Go to previous/next
crate
Buttons to switch from
full image to single part
Moving the mouse on
fedchannels produces
fedchannel coordinates
and content
Click on a fedchannel and get
detailed printout on right window
19
The new Web interface(3): showing
correlations between different
trackermaps
Detached window used to show correlated part
Click on a module and the connected fedchannels are shown
highlighted
20
The new Web interface(4): how it works
The new method “printall” of class TrackerMap
will create around 100 files necessary to represent
the geometric trackermap and the fedtrackermap :
-as a single high resolution png image
tif.png tiffed.png
-svg images for each layer /crate
tiflayer1.xml tifcrate1.xml
- the html files containing detailed information in
text format about modules and fed channels
tiflayer1.html tifcrate1.html
-the javascript interface
tifviewer.js …
-the main document that allows access to
everything
tifviewer.xhtml
21
Online(DQM) implementation – from printall to
printonline
1. The file structure created by method “printall” for the
“offline” web interface, is reused almost without
modifications to create a web interface for online DQM.
2. The method “printonline” implementing this new interface is
called every time there is some change in the DQM data
(every few events) . It writes the full set of files only once
at the beginning. After that it updates only the files
interested by DQM changes.
3. It provides to the client also a slightly modified Javascript
interface that uses the AJAX client-server protocol to
refresh from time to time the images displayed by the web
interface.
4. Using this scheme we have no limit to the people that can
access the DQM data because pages are cached by the
server .
22
Future web interface(1): how to show names of
tracker parts
1. All static information can be represented once for
all in images built with a drawing software like
gimp. They must have the same size of the
dynamic images and must be transparent.
2. The user should have buttons or selections
available that , when choosen, will overlay the
transparent image on the dynamic image.
3. In this way we can show :
- tracker parts shape and numbering
(strings,rods, rings and petals)
- which crate feeds a tracker layer
- other …
23
Future web interface(2): how to show names of
tracker parts
Screenshot from a demo: the names and numbers are overlaid
on the background image clicking on the button on top
24
Future web interface(3): adding new
trackermaps
1. We can add new trackermaps or views using the same
scheme used for fedtrackermap. The new view will be
managed in another tab. The corresponding SVG file will
contain an entry for each element in the view.
2. An obvious candidate is a fectrackermap where each
element is a control ring and is connected to a list of 6
modules.
3. Another possible view (suggested by Domenico) is a
hierarchical one corresponding to the sistrip tracker tree
where the leafs are strings,rods, rings and petals . Their
content is the sum of the signal of the connected modules.
It should show immediately disimmetries between tracker
parts(see next slide).
4. Others …
25
Future web interface(4): adding new
trackermaps
How a tracker parts size view trackermap could look like
26
Future web interface(5): other
improvements
1. Representing values in SVG images using
methods different from color. A simple variation
to try could be a circle with center in the module
and size proportional to value stored.
2. Use a robust Javascript API like ext js
3. Integrate our GUI with Dario Gui using the same
tools
4. Other …
27
Other improvements
• Use a parameter “siStripOnly” to take away from
trackermap the pixel stuff.
•
Refactor the code ?
•
Other …
28
Summary
1. Geo and fed trackermaps implemented
2. Web interface ready for online monitoring
3. Other trackermaps to be added
4. Many improvements possible to web interface
5. First two goals (use as dashboard display and single file
to store whole tracker data) reached!
6. Concerning the third goal, the graphics interface can
access tracker monitoring data and visualize them.
It is possible (see Dario work) to build a full graphics
interface that can also change data used to control
tracker. Because of manpower lack( working alone on
this) I can’t do it but if someone wants to work on it I’ll
be happy to help...
29
Bibliography and further documentation
1. Trackermap wiki
2. Dario's proposal of a common sistrip/pixel
interface
3. Pixel web gui for db browsing
30