\chapter{EVS}\label{sec:EVS}
\begin{enumerate}
\item First, declare the name of event selection.                   
\begin{quote}\baselineskip 3.2mm\begin{verbatim}
      Call EVSDEF( name )
\end{verbatim}\end{quote}
will define the name ( charcter string within 32 chars ).      
\item There are three ways to set the value of event selection.      
\begin{enumerate}
\item EVSSET( name )                                              
\begin{quote}\baselineskip 3.2mm\begin{verbatim}
      Call EVSSET( name )                                          
\end{verbatim}\end{quote}
will set the value of the specified event selection to .TRUE. .
\item EVSCLR( name )                                               
\begin{quote}\baselineskip 3.2mm\begin{verbatim}
      Call EVSCLR( name )
\end{verbatim}\end{quote}
will set the value of the name to .FALSE. ;in other word, 'clear'.
\item EVSVAL( name, logic )
\begin{quote}\baselineskip 3.2mm\begin{verbatim}
      Call EVSVAL( name, logic )                                   
\end{verbatim}\end{quote}
will set the value of the event selection to the value
given by 'logic'. 'logic' is a logical expression, as
.TRUE., .FALSE., logical variable, or logical
combination of logical variables.                            
\end{enumerate}
\item In order to get the value of the event selection, use
logical function EVS.                                          
\begin{quote}\baselineskip 3.2mm\begin{verbatim}
EVS( name )
\end{verbatim}\end{quote}
returns the value of the specified event selection.
For example, you can use EVS as
\begin{quote}\baselineskip 3.2mm\begin{verbatim}
     If( EVS( 'ALL_CHAMBERS_HIT' ) ) then                           
       ......                                                       
     or                                                             
     Call EVSVAL( 'PC1V_IS_OK', ( MULT(1).GT.0 ) )                  
     Call EVSVAL( 'PC1H_IS_OK', ( MULT(2).GT.0 ) )                  
     Call EVSVAL( 'PC1_IS_OK',                                      
    &             ( EVS('PC1V_IS_OK') .and. EVS('PC1H_IS_OK') ) )   
     ...                                                            
\end{verbatim}\end{quote}
and so on.                                                     
Do not forget to declare the function EVS as logical ;         
put the next statement in a declaration part in each routine   
which uses EVS.                                                     
\end{enumerate}






