\documentclass{CHEP2006}
\setlength{\paperheight}{297mm}
\setlength{\paperwidth}{210mm}

%%
%%  Use \documentclass[boxit]{JAC2003}
%%  to draw a frame with the correct margins on the output.
%%
%%  Use \documentclass[acus]{JAC2003}
%%  for US letter paper layout
%%

\usepackage{graphicx}

%%
%%   VARIABLE HEIGHT FOR THE TITLE BOX (default 35mm)
%%

\setlength{\titleblockheight}{35mm}

\begin{document}
\title{DEVELOPING A ROOT INTERFACE FOR GLITE\thanks{This work is supported by BMBF F\"orderkennzeichen 01AK802G}}

\author{K. Schwarz, A. Manafov, P. Malzacher, GSI, 64291 Darmstadt, Germany}

\maketitle

\begin{abstract}
The D-Grid~\cite{D-Grid-ref} initiative, following similar programs in the USA and the UK, 
shall help to set up a nationwide German Grid infrastructure. Within work 
package 3 of the HEP~\cite{HEPCG-ref} Community Grid distributed analysis tools under usage 
of grid resources shall be developed.

A starting point is the analysis framework ROOT~\cite{ROOT-ref}. A set of abstract ROOT classes
(TGrid ...) provides the user interface to enable Grid access directly from within
ROOT. A concrete implementation exists already for the ALICE
%~\cite{ALICE-ref} 
Grid Environment AliEn~\cite{AliEn-ref}.
We are developing an interface to the common HEP Grid middleware gLite~\cite{gLite-ref}. This 
includes querying the gLite File Catalogue, access to individual files, job
submission, getting the job status, and retrieving job output. Extensive tests will
be done by using the gLite testbed of GSI
%~\cite{GSI-ref}.

First interactive analysis environments have been set up at single sites using 
the Parallel ROOT Facility, PROOF~\cite{PROOF-ref}. This shall be extended towards several sites
using existing Grid Middleware with the aim of a dynamic generation of Grid
Analysis Clusters. 

\end{abstract}

\section{THE D-GRID PROJECT}

The D-Grid project has been announced by the German Ministry of Science and Education during the 10th Global Grid Forum
%~\cite{GGF} 
in March 2004 in Berlin. It follows similar
programs in the UK and the USA and shall help to build a Grid infrastructure in Germany. The project structure supports six community Grid projects, namely 
AstroGrid, C3 for climate research, InGrid for engineering, MediGrid, TextGrid for humanities, and HEP-Grid, the Grid for the High Energy Physics community, 
as well as a
comprehensive integration project DGI~\cite{DGI-ref}. It should be possible to integrate the results of middleware developments within the 
community projects into the core D-Grid infrastructure. This way an
application neutral grid platform shall be created and the approach to Grid
technology should become facilitated for new communities. The resulting platform
has to fit to international Grid projects though, especially to EU Grid projects
like EGEE~\cite{EGEE-ref}.
With this architecture community specific applications and requirements are supported as well as the development of a
sustainable basic Grid Infrastructure, which shall be applicable for the whole German Scientific Community and help to establish methods of e-science in Germany.   

\subsection{The HEP-Grid community project}

The HEP Community Grid project has been inspired by the LHC Computing Grid~\cite{LCG-ref} of the 4 LHC~\cite{LHC-ref} experiments at CERN. The software developments
within this sub project shall concentrate on aspects which are considered
important by Particle Physics and still need development efforts. The main
points concentrate on dynamic data management, job scheduling, accounting and
monitoring as well as the creation of tools for interactive data anysis on the
Grid by individual users. 
The latter will be described more closely in this paper. 
The first task is to look for gaps in current interactive analysis systems. Since GSI is a member in the ALICE collaboration the work concentrates on software used by
the ALICE experiment (ROOT/PROOF). Lateron existing ALICE specific solutions (TAliEn, an interface between ROOT and AliEn) shall be generalised by
developing an interface between ROOT 
and the more general Grid middleware gLite. 

In Munich similar work is performed for the ATLAS experiment~\cite{Munich-ref}.


%\begin{Itemize}
%\item Either A4 sheet paper size(21.0 cm~$\times$~29.7~cm;
%8.27~in~$\times$~11.69~in).
%\item Single spaced text in two
%columns of 82.5 mm (3.25~in) with 5.0~mm
%  (0.2~in) separation.
%\item The text located within the margins specified in Table~\ref{l2ea4-t1}
%  to facilitate electronic processing of the PDF file.
%\end{Itemize}

%\begin{table}[hbt]
%\begin{center}
%\caption{Margin specifications}
%\begin{tabular}{|l|c|}
%\hline \textbf{Margin} & \textbf{A4 Paper} \\ \hline
%Top    & 37 mm \\
%Bottom & 19 mm \\
%Left   & 20 mm \\
%Right  & 20 mm \\ \hline
%\end{tabular}
%\label{l2ea4-t1}
%\end{center}
%\end{table}

%The layout of the text on the page is illustrated in
%Fig.~\ref{l2ea4-f1}. Note that the paper's title should be the width of the
%full page and that tables and figures may span the whole 170~mm page width,
%if desired (see Fig.~\ref{l2ea4-f2}).


%\begin{figure}[htb]
%\centering
%\includegraphics*[width=65mm]{JACpic_mc.eps}
%\caption{Layout of papers.}
%\label{l2ea4-f1}
%\end{figure}



%If a displayed equation needs a number, place it flush with the right
%margin of the column (see Eq.~\ref{eq:units}). Units should be written
%using the roman font, not the italic font.

%\begin{equation}\label{eq:units}
%C_B={q^3\over 3\epsilon_0 mc}=3.54\,\hbox{$\mu$eV/T}
%\end{equation}



%\subsection{Footnotes}

%Footnotes on the title and author lines may be used for acknowledgements,
%affiliations and e-mail addresses. A nonnumeric sequence of characters (*,
%\dag, \ddag, \S) should be used. All other notes should be included in the
%references section and use the normal numeric sequencing.


\section{THE ROOT - GLITE INTERFACE}

\subsection{The ROOT System}

A starting point is the analysis software package ROOT, which is largely used within the HEP environment. Especially for members of the ALICE experiment ROOT provides
the starting point for basically everything. Since the ALICE framework AliRoot~\cite{AliRoot-ref} is based directly on ROOT, an ALICE user can do data simulation, 
reconstruction and analysis all by using the same framework and from within the ROOT-system. Additionally a working interface between ROOT and the ALICE Grid 
Environment AliEn exists so that also Grid-access from within ROOT is possible. 
According to the  ALICE analysis model it is planned to provide a prompt analysis facility at CERN by using PROOF, the Parallel ROOT Facility, which enables parallel and  interactive
analysis of large data sets situated at one site. Also batch style analysis of distributed data sets by using ROOT and existing Grid infrastructures as well as
interactive analysis of distributed data by combining PROOF and Grid should be possible.

To be able to realise all features of the analysis model described above, it is necessary to provide general Grid-access directly from ROOT, 
which is a well known environment for most
Physicists working for ALICE or in the field of High Energy Physics. As a Grid middleware of general interest gLite has been chosen since it is planned to become 
the basis for all LHC experiments in near future.

For accomplishing this,
ROOT offers a set of abstract base classes (Fig.~\ref{TGrid}), which provides an interface between ROOT and the Grid. A concrete implementation exists already for the
ALICE Grid environment AliEn. An interface to the more general Grid middleware gLite is currently being created. 
The interface will include inquiring the file catalogue, access to
individual files in the Grid, submission of jobs, inquiring the status and receiving the output of jobs.

\begin{figure}[htb]
\centering
\includegraphics*[width=65mm]{tgrid2.ps}
\caption{A set of abstract base classes providing an interface between ROOT and the Grid.}
\label{TGrid}
\end{figure}

\subsection{TGLite}

The concrete implementation of TGLite uses the gLite WMProxy C++ API~\cite{WMPAPI-ref}.
The WMProxy is a simple service providing access to the WMS functionality (Workload Management System) of gLite through a Web Services based interface.
It accepts job submission requests described with the job description language (JDL) and other job management and control requests such as job cancellation, job output
retrieval etc. Compared to the older WM UI API it provides additional functionality such as bulk job submission and support for shared and compressed sandboxes.
The WMProxy client API supplies the client applications with a set of corresponding interfaces and includes a Brokerinfo Access API, via which information from the
Resource Broker can be retrieved. Also a simple API for the management of job identifiers is also provided.

The current implementation of TGLite does not use the API of gLite directly, though. Instead a glite-api-wrapper library which contains all necessary information 
is being created and used. The schema is displayed in (Fig.~\ref{TGLite-API}).

\begin{figure}[htb]
\centering
\includegraphics*[width=65mm]{glite-api-wrapper.ps}
\caption{The ROOT application uses the gLite-API via a wrapper library in between.}
\label{TGLite-API}
\end{figure}

Currently the glite-api-wrapper library, ROOT and the TGLite-interface have to be installed on a gLite User Interface. After a
grid-proxy-init, the user can start ROOT and connect to the Grid. An example session is shown in Fig.~\ref{session}. The user connects to the Grid (gLite or AliEn), gets
the list of files to be analysed from the Grid file catalogue, and fills the result into a ROOT Chain. In case a set of PROOF daemons have been submitted beforehand a
connection to a remote PROOF master can be accomplished from the ROOT client on the Grid UI and a PROOF session analysing several files in the Grid can be initiated.
Intensive tests are currently being performed on the gLite testbed which has been set up at GSI on a number of virtual XEN machines.  

\begin{figure}[htb]
\centering
\includegraphics*[width=75mm]{jdl-example2.ps}
\caption{An example session running PROOF on the Grid.}
\label{session}
\end{figure}



\begin{thebibliography}{9}   % Use for  1-9  references
%\begin{thebibliography}{99} % Use for 10-99 references

\bibitem{D-Grid-ref}
http://www.d-grid.de.

\bibitem{HEPCG-ref}
http://www.d-grid.de/index.php?id=44.

\bibitem{ROOT-ref}
http://root.cern.ch.

%\bibitem{ALICE-ref}
%http://aliceinfo.cern.ch/Public.

\bibitem{AliEn-ref}
http://alien.cern.ch/twiki/bin/view/AliEn/Home.

\bibitem{gLite-ref}
http://glite.web.cern.ch/glite/.

%\bibitem{GSI-ref}
%http://www.gsi.de.

\bibitem{PROOF-ref}
http://root.cern.ch/root/PROOF.html.

%\bibitem{GGF}
%http://www.ggf.org.

\bibitem{DGI-ref}
http://dgi.d-grid.de/.

\bibitem{EGEE-ref}
http://public.eu-egee.org/.

\bibitem{LCG-ref}
http://lcg.web.cern.ch/LCG/.

\bibitem{LHC-ref}
http://lhc.web.cern.ch/lhc/.

\bibitem{Munich-ref}
J.~Elmsheuser, Distributed Analysis Experiences within D-Grid, this proceedings.

\bibitem{AliRoot-ref}
http://root.cern.ch/root/R2000/Html/AliRoot/index.htm.

\bibitem{WMPAPI-ref}
http://egee-jra1-wm.mi.infn.it/egee-jra1-wm/glite-wmproxy-api-index.shtml.




%\bibitem{jacow-help} A. Name and D. Person, Modern Editor.s Journal 25
%(1997) 56.
%
%\bibitem{exampl-ref}
%A.N. Other, ``A Very Interesting Paper'', EPAC'96, Sitges, June 1996.


\end{thebibliography}

\end{document}
