Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

HecEvent.h

Go to the documentation of this file.
00001 #ifndef HecEvent_h
00002 #define HecEvent_h
00003 
00004 #include <vector>
00005 #include "HecCell.h"
00006 #include "Geometry.h"
00007 
00008 /*!  - Class HecEvent
00009   * - Author: Ian Gable (igable@uvic.ca)
00010   * - Date:  05/10/2002
00011   * - Description: HecEvent stores a list of HecCells in a vector. Each HecCell can be retrieved.
00012   */
00013 class HecEvent{
00014 
00015  public:
00016   /** The default contructor
00017     */
00018   HecEvent();
00019 
00020   /** Add adcValue to hecCell with adcNumber
00021     * @param cell a static HecCell Class
00022     */
00023   bool addHecCell(HecCell cell);
00024 
00025   /** Return a pointer to hec Cell with adcNumber
00026     * @param   acdNumber The acd Number of the cell you wish to return
00027     */
00028   HecCell* hecCell(int adcNumber);
00029 
00030    //! clear the content of the cells so that  new info can be loaded
00031   void clearCells();
00032 
00033   //! return the number of cells
00034   int numCells();
00035 
00036   // ! return a constant pointer to the m_hecCells vector
00037   const vector<HecCell>* hecCellsPointer();
00038 
00039   //! get event number
00040   int eventNumber() { return m_eventNumber; };
00041 
00042   //! set event number
00043   void eventNumber(int eventNum) {m_eventNumber = eventNum;};
00044 
00045   /** Set the hecTrigger. Note that the parameter MUST be an array of
00046     * 5 integers.
00047     * @param hecTriggerArray a pointer to the hecTriggerArray
00048     */
00049   void setHecTrigger(unsigned int hecTriggerArray[5]);
00050 
00051   //! Return a pointer to the HecTriggerVector
00052   vector<int>* getHecTriggerVector(){ return &m_hecTriggerVector;};
00053 
00054   //! Returns true when particle has contancted both muon detectors
00055   bool isMuon() { return m_isMuon;}
00056 
00057   //! Returns true when event is a Random Trigger
00058   bool isRandom() { return m_isRandom;}
00059 
00060   /** Get the trigger bit from 0 to 4
00061     * (physics,electron,pion,muon,random)
00062     * @param bit The trigger bit 0-4 will cause exit(1) if accessed outside
00063     */
00064   int getTriggerBit(int bit);
00065 
00066   //maybe include method to get individual elements of the Trigger Vector
00067 
00068  private:
00069   vector<HecCell> m_cellVector; //! contains an array of cells
00070   void processTrigger();
00071 
00072   int m_eventNumber; //! the event number
00073   vector<int> m_hecTriggerVector; //! vector of the trigger information
00074   bool m_isMuon;
00075   bool m_isRandom;
00076 
00077 };
00078 #endif

Generated on Fri Aug 15 10:52:04 2003 for TBRootAna by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002