00001 #ifndef TrigConf_BunchGroupSet
00002 #define TrigConf_BunchGroupSet
00003
00004 #include "TrigConfL1Data/BunchGroup.h"
00005 #include "TrigConfL1Data/L1DataBaseclass.h"
00006
00007 #include <iosfwd>
00008 #include <string>
00009 #include <vector>
00010 #include <inttypes.h>
00011 #include <sys/types.h>
00012
00013 namespace TrigConf {
00014
00015 class BunchGroupSet : public L1DataBaseclass {
00016 public:
00017 BunchGroupSet();
00018 BunchGroupSet(const std::vector<BunchGroup>&);
00019 ~BunchGroupSet();
00020
00021
00022 uint16_t menuPartition() const { return m_MenuPartition; }
00023 const std::vector<BunchGroup>& bunchGroups() const { return m_BunchGroups; }
00024 const std::vector<uint16_t>& bgPattern() const { return m_BGpattern; }
00025
00026
00027 void setMenuPartition(uint16_t part) { m_MenuPartition = part; }
00028 void setBGName(uint32_t, const std::string&);
00029 void addBunchGroup(const BunchGroup&);
00030
00031
00032 virtual void print(const std::string& indent="", unsigned int detail=1) const;
00033 void writeXML(std::ostream & xmlfile, int indentLevel=0, int indentWidth=2) const;
00034
00035
00036 private:
00037 void fillPattern(uint32_t bitpos, const BunchGroup& bg);
00038
00039 uint16_t m_MenuPartition;
00040 std::vector<BunchGroup> m_BunchGroups;
00041 std::vector<uint16_t> m_BGpattern;
00042 };
00043
00044 }
00045
00046 #endif
00047