/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Event/TrigEvent/TrigEvent-00-01-02/TrigEvent/TrigMdc.h

Go to the documentation of this file.
00001 #ifndef EVENT_TRIG_MDC_H
00002 #define EVENT_TRIG_MDC_H
00003 
00004 #include <stdint.h>
00005 #include <string>
00006 #include <vector>
00007 #include <map>
00008 
00009 class TrigMdc {
00010 public:
00011   TrigMdc(const char* name);
00012   virtual ~TrigMdc();
00013 
00014   void setMdcTrigData(uint32_t boardId, uint32_t window, uint32_t datasize, const uint32_t* data);
00015 
00016   void initialize();
00017 
00018   inline const std::string& getName() const { return m_name; }
00019   // hit
00020   inline int getMdcHitOne(int layer, int wire) const { return m_mdchit_one[layer][wire]; }
00021   inline int getMdcHitSOne(int layer, int wire) const { 
00022     if(m_mdchit_sone[layer][wire] != 0) {
00023       return (m_mdchit_sone[layer][wire] + 1); 
00024     }
00025     else return 0;
00026   }
00027   inline int getMdcHitPre(int layer, int wire) const { return m_mdchit_pre[layer][wire]; } // first up in windows
00028   inline int getMdcHitAft(int layer, int wire) const { return m_mdchit_aft[layer][wire]; } // first down in windows after first up
00029   inline uint32_t getMdcHitWin(int layer, int wire) const { return m_mdchit_win[layer][wire]; } // hit distributions in windows
00030 
00031   // tsf
00032   inline int getMdcTSFOne(int layer, int wire) const { return m_mdctsf_one[layer][wire]; }
00033   inline int getMdcTSFSOne(int layer, int wire) const { 
00034     if(m_mdctsf_sone[layer][wire] != 0) {
00035       return (m_mdctsf_sone[layer][wire] + 1);
00036     }
00037     else return 0;
00038   }
00039   inline int getMdcTSFPre(int layer, int wire) const { return m_mdctsf_pre[layer][wire]; } // first up in windows
00040   inline int getMdcTSFAft(int layer, int wire) const { return m_mdctsf_aft[layer][wire]; } // first down in windows after first up
00041   inline uint32_t getMdcTSFWin(int layer, int wire) const { return m_mdctsf_win[layer][wire]; } // hit distributions in windows
00042 
00043   // ltrk
00044   inline int getMdcLtrkOne(int id) const { return m_mdcltrk_one[id]; }
00045   inline int getMdcLtrkSOne(int id) const { 
00046     if(m_mdcltrk_sone[id] != 0) {
00047       return (m_mdcltrk_sone[id] + 1);
00048     }
00049     else return 0;
00050   }
00051   inline int getMdcLtrkPre(int id) const { return m_mdcltrk_pre[id]; } // first up in windows
00052   inline int getMdcLtrkAft(int id) const { return m_mdcltrk_aft[id]; } // first down in windows after first up
00053   inline uint32_t getMdcLtrkWin(int id) const { return m_mdcltrk_win[id]; } // hit distributions in windows
00054 
00055   // strk
00056   inline int getMdcStrkOne(int id) const { return m_mdcstrk_one[id]; }
00057   inline int getMdcStrkSOne(int id) const { 
00058     if(m_mdcstrk_sone[id] != 0) {
00059       return (m_mdcstrk_sone[id] + 1);
00060     }
00061     else return 0;
00062   }
00063   inline int getMdcStrkPre(int id) const { return m_mdcstrk_pre[id]; } // first up in windows
00064   inline int getMdcStrkAft(int id) const { return m_mdcstrk_aft[id]; } // first down in windows after first up
00065   inline uint32_t getMdcStrkWin(int id) const { return m_mdcstrk_win[id]; } // hit distributions in windows
00066   
00067   // ltrk in couter
00068   inline int getMdcLtrkCoutOne(int id) const { return m_mdcltrkc_one[id]; }
00069   inline int getMdcLtrkCoutSOne(int id) const { 
00070     if(m_mdcltrkc_sone[id] != 0) {
00071       return (m_mdcltrkc_sone[id] + 1);
00072     }
00073     else return 0;
00074   }
00075 
00076   // strk in counter
00077   inline int getMdcStrkCoutOne(int id) const { return m_mdcstrkc_one[id]; }
00078   inline int getMdcStrkCoutSOne(int id) const { 
00079     if(m_mdcstrkc_sone[id] != 0) {
00080       return (m_mdcstrkc_sone[id] + 1);
00081     }
00082     else return 0;
00083   }
00084 
00085   inline int getMdcTrigCondi(int id) const { return m_mdcTrigCondi[id]; }
00086 
00087 
00088 
00089   void print();
00090 
00091 private:
00092   std::string m_name;
00093   std::string filename;
00094   std::map<uint32_t, std::vector<uint32_t> > m_datamap;
00095 
00096   int **m_mdchit_one;
00097   int **m_mdchit_sone;
00098   int **m_mdchit_pre;
00099   int **m_mdchit_aft;
00100   uint32_t **m_mdchit_win;
00101 
00102   int **m_mdctsf_one;
00103   int **m_mdctsf_sone;
00104   int **m_mdctsf_pre;
00105   int **m_mdctsf_aft;
00106   uint32_t **m_mdctsf_win;
00107   
00108   int *m_mdcltrk_one;
00109   int *m_mdcltrk_sone;
00110   int *m_mdcltrk_pre;
00111   int *m_mdcltrk_aft;
00112   uint32_t *m_mdcltrk_win;
00113 
00114   int* m_mdcstrk_one;
00115   int* m_mdcstrk_sone;
00116   int *m_mdcstrk_pre;
00117   int *m_mdcstrk_aft;
00118   uint32_t *m_mdcstrk_win;
00119 
00120   int* m_mdcltrkc_one;
00121   int* m_mdcltrkc_sone;
00122 
00123   int* m_mdcstrkc_one;
00124   int* m_mdcstrkc_sone;
00125 
00126   int* m_mdcTrigCondi;
00127 
00128 /*
00129   int m_mdchit_one[24][256];
00130   int m_mdctsf_one[6][256];
00131   int m_mdcltrk_one[128];
00132   int m_mdcstrk_one[128];
00133   int m_mdcltrkc_one[132];
00134   int m_mdcstrkc_one[132];
00135 
00136   int m_mdchit_sone[24][256];
00137   int m_mdctsf_sone[6][256];
00138   int m_mdcltrk_sone[128];
00139   int m_mdcstrk_sone[128];
00140   int m_mdcltrkc_sone[132];
00141   int m_mdcstrkc_sone[132];
00142 */
00143 };
00144 
00145 #endif  // EVENT_TRIG_MDC_H

Generated on Tue Nov 29 23:11:43 2016 for BOSS_7.0.2 by  doxygen 1.4.7