00001 #ifndef TrigConf_HLTSequenceList
00002 #define TrigConf_HLTSequenceList
00003
00004 #include <iosfwd>
00005 #include <string>
00006 #include <vector>
00007 #include <map>
00008
00009 #include "TrigConfHLTData/HLTSequence.h"
00010
00011 #include <boost/multi_index_container.hpp>
00012 #include <boost/multi_index/mem_fun.hpp>
00013 #include <boost/multi_index/hashed_index.hpp>
00014 #include <boost/multi_index/ordered_index.hpp>
00015
00016 namespace TrigConf {
00017
00018 class HLTSequenceList;
00019 class DiffStruct;
00020 class HLTSequence;
00021
00022 std::ostream & operator<<(std::ostream &, const HLTSequenceList &);
00023
00024 struct seq_name_hash{};
00025 struct seq_hash_id{};
00026
00027 typedef boost::multi_index::multi_index_container<HLTSequence*, boost::multi_index::indexed_by<
00028 boost::multi_index::ordered_unique< boost::multi_index::identity<HLTSequence> >,
00029 boost::multi_index::ordered_unique< boost::multi_index::tag<seq_hash_id>, boost::multi_index::const_mem_fun<HLTSequence, unsigned int, &HLTSequence::hashId> >,
00030 boost::multi_index::hashed_unique< boost::multi_index::tag<seq_name_hash>, boost::multi_index::const_mem_fun<TrigConfData, const std::string&, &TrigConfData::name> >
00031 >
00032 > HLTSequenceContainer;
00033
00034
00036 class HLTSequenceList : public HLTSequenceContainer {
00037 public:
00038
00040 HLTSequenceList();
00041
00046 HLTSequenceList( std::vector<HLTSequence*>& HLTSequenceList );
00047
00049 ~HLTSequenceList();
00050
00055 void addHLTSequence( HLTSequence * sequence);
00056
00057 void clear();
00058
00059
00060
00061
00063 void print(const std::string& indent="", unsigned int detail=1) const;
00064
00065 bool hasTE(const std::string& name);
00066
00071 HLTSequence* getSequence(unsigned int id) const;
00072 HLTSequence* getSequence(const std::string& tename) const;
00073
00080 bool getLabel(unsigned int hashId, std::string & label);
00081
00088 bool getHashIdFromLabel(const char * label, unsigned int & hashId);
00089
00090 DiffStruct* compareTo(const HLTSequenceList* o) const;
00091
00092 private:
00093
00094 friend std::ostream & operator<<(std::ostream &, const HLTSequenceList &);
00095 };
00096
00097 }
00098
00099 #endif
00100