\section{U\-T\-I\-L\-:\-:Bit\-Set32 Class Reference}
\label{classUTIL_1_1BitSet32}\index{U\-T\-I\-L\-::\-Bit\-Set32@{U\-T\-I\-L\-::\-Bit\-Set32}}


Convenient helper class for setting single bits in a 32bit-\/field, such as collection flags or hit types -\/ extends std\-::bitset$<$32$>$.  




{\ttfamily \#include $<$U\-T\-I\-L/\-Bit\-Set32.\-h$>$}

Inheritance diagram for U\-T\-I\-L\-:\-:Bit\-Set32\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classUTIL_1_1BitSet32}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf Bit\-Set32} (int val)\label{classUTIL_1_1BitSet32_a9a04f425462ac37e316ddc812c669e9b}

\begin{DoxyCompactList}\small\item\em Allow to construct this from an int. \end{DoxyCompactList}\item 
{\bf Bit\-Set32} \& {\bf operator=} (int val)\label{classUTIL_1_1BitSet32_adde7df135f0eeb28ad25dcb742f3099c}

\begin{DoxyCompactList}\small\item\em Allow assignment from an int. \end{DoxyCompactList}\item 
{\bf operator int} ()\label{classUTIL_1_1BitSet32_a7977d5c314fd2ed247281482ea764186}

\begin{DoxyCompactList}\small\item\em Direct conversion to int. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Convenient helper class for setting single bits in a 32bit-\/field, such as collection flags or hit types -\/ extends std\-::bitset$<$32$>$. 

Use convenient methods make\-\_\-bitset32(...) to create a bit set with some bits set. \par
 Examples\-: 
\begin{DoxyPre}
  // set collection flags :
  LCCollectionVec* calVec = new LCCollectionVec( LCIO::SIMCALORIMETERHIT )  ;
  calVec->setFlag( UTIL::make\_bitset32(  LCIO::CHBIT\_LONG, LCIO::CHBIT\_STEP ) );\end{DoxyPre}



\begin{DoxyPre}  // check TrackerHit type:
  \doxyref{BitSet32}{p.}{classUTIL_1_1BitSet32} type( hit->getType() ) ;
  bool isComposite = type.test( ILDTrkHitTypeBit::COMPOSITE\_SPACEPOINT ) ; // test w/ range check
  // or shorter:
  if( \doxyref{BitSet32}{p.}{classUTIL_1_1BitSet32}( hit->getType() )[ ILDTrkHitTypeBit::COMPOSITE\_SPACEPOINT ] ) \{...\}\end{DoxyPre}



\begin{DoxyPre}\end{DoxyPre}
 

The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
Bit\-Set32.\-h\end{DoxyCompactItemize}
