00001
00002 #ifndef TrigConf_Random
00003 #define TrigConf_Random
00004
00005 #include <iosfwd>
00006 #include <string>
00007 #include "TrigConfL1Data/L1DataBaseclass.h"
00008
00009 namespace TrigConf {
00010 class Random : public L1DataBaseclass {
00011 public:
00012 Random();
00013 ~Random();
00014
00015
00016 uint32_t cuts(unsigned int idx) const { return m_cuts[idx]; }
00017 const std::string & rndmName(unsigned int idx) const { return m_names[idx]; }
00018 int rate1() const { return m_rate1; }
00019 int rate2() const { return m_rate2; }
00020 float getRateFromCut(unsigned int idx) const;
00021
00022
00023 void setRndmName( uint32_t idx, const std::string& name ) { m_names[idx] = name; }
00024 void setCut( uint32_t idx, uint32_t cut ) { m_cuts[idx] = cut; }
00025 void setRate1( int rate ) { m_rate1 = rate; }
00026 void setRate2( int rate ) { m_rate2 = rate; }
00027
00028 virtual void print(const std::string& indent="", unsigned int detail=1) const;
00029 virtual void writeXML(std::ostream & xmlfile, int indentLevel=0, int indentWidth=2) const;
00030
00031 private:
00032 int m_rate1;
00033 int m_rate2;
00034 std::string m_names[4];
00035 uint32_t m_cuts[4];
00036 };
00037 }
00038 #endif