EmcFEM.h

Go to the documentation of this file.
00001 #ifndef __EMCFEM_H__
00002 #define __EMCFEM_H__
00003 
00004 // EMCalFEE.h Describes class EMCalFEE
00005 // Reads data from file or pool and stores it in EmcDynamicData obect arrays.
00006 // Array FEMstatus keeps information about FEM faults during current event.
00007 // Possible mistakes: FEMstatus[i]=1 if FEM i had not its packet in this event while other had;
00008 //                    FEMstatus[i]=2 if delay between TAC and presamle or between post and presample
00009 //                                   does not equal to expected value
00010 //==================================================================================================
00011 // Created by Sergei Belikov 04/20/99
00012 //-------------------------------------------------------------------------------------------------- 
00013 
00014 class Eventiterator;
00015 class Event;
00016 class EmcDynamicData;
00017 
00021 struct FEMlimits
00022 {
00024   int minAmp;
00026   int maxAmp;
00027 };
00028 
00031 struct cells
00032 {
00034   int pre;
00036   int post;
00038   int tac;
00039 };
00040 
00042 struct evtInfo
00043 {  
00045   int evtLength;
00047   int evtType;
00049   int evtSequence;
00051   int evtRunNumber;
00052 };
00053 
00060 class EMCalFEE
00061 {
00062 protected:
00063   FEMlimits * lim;
00064   EmcDynamicData* dd;
00065   int* FEMstatus;
00066   int* DataErrors;
00067   int* RefErrors;
00068   cells* EvtCells;
00069   evtInfo evtIn;
00070   //  We keep the pointer to last event read-in
00071   Event  * event;
00072 public:
00076   EMCalFEE(EmcDynamicData* d, FEMlimits * l, int& status);
00078   virtual ~EMCalFEE();
00080   virtual int processEvent(Event* evt) ;
00082   virtual int getNextEvent(Eventiterator *it);
00084   virtual int readNextEvent(Eventiterator *it);
00086   virtual int convertNextEvent();
00098   const int* getFEMstatus(){return FEMstatus;}
00120   int      * getDataErrors(){return DataErrors;}
00122   int     * getRefErrors(){return RefErrors;}
00124   const cells* getCells(){return EvtCells;}
00126   const evtInfo* getEvtInfo(){return &evtIn;}
00128   int getEvtLength(){return evtIn.evtLength;}
00130   int getEvtType(){return evtIn.evtType;}
00132   int getEvtSequence(){return evtIn.evtSequence;}
00134   int getRunNumber(){return evtIn.evtRunNumber;}
00135 };
00136 #endif