00001 #ifndef TrigConf_HLTChainList
00002 #define TrigConf_HLTChainList
00003
00004 #include <string>
00005 #include <iosfwd>
00006 #include <vector>
00007 #include <map>
00008
00009 #include "TrigConfHLTData/HLTChain.h"
00010
00011 #include <boost/unordered_map.hpp>
00012 #include <boost/multi_index_container.hpp>
00013 #include <boost/multi_index/mem_fun.hpp>
00014 #include <boost/multi_index/hashed_index.hpp>
00015 #include <boost/multi_index/ordered_index.hpp>
00016 #include <boost/multi_index/random_access_index.hpp>
00017 #include <boost/multi_index/composite_key.hpp>
00018
00019
00020
00021
00022
00023 namespace TrigConf {
00024
00025 class HLTChainList;
00026 class CTPConfig;
00027 class HLTPrescaleSet;
00028 class DiffStruct;
00029
00030 std::ostream & operator<<(std::ostream &, const TrigConf::HLTChainList &);
00031
00032
00033 struct name{};
00034 struct name_hash{};
00035 struct counter{};
00036
00037 typedef boost::multi_index::multi_index_container<HLTChain*, boost::multi_index::indexed_by<
00038 boost::multi_index::ordered_unique< boost::multi_index::identity<HLTChain> >,
00039 boost::multi_index::ordered_unique< boost::multi_index::tag<counter>,
00040 boost::multi_index::composite_key<
00041 HLTChain*,
00042 boost::multi_index::const_mem_fun<HLTChain,int,&HLTChain::chain_counter>,
00043 boost::multi_index::const_mem_fun<HLTChain,HLTLevel,&HLTChain::level_enum>
00044 >
00045 >,
00046 boost::multi_index::ordered_unique< boost::multi_index::tag<name>, boost::multi_index::const_mem_fun<HLTChain, const std::string&, &HLTChain::chain_name> >,
00047 boost::multi_index::hashed_unique< boost::multi_index::tag<name_hash>, boost::multi_index::const_mem_fun<HLTChain,const std::string&, &HLTChain::chain_name> >,
00048 boost::multi_index::random_access<>
00049 >
00050 > HLTChainContainer;
00051
00052
00054 class HLTChainList : public HLTChainContainer {
00055 public:
00056
00058 HLTChainList();
00059
00064 HLTChainList( const std::vector<HLTChain*>& chainList );
00065
00067 ~HLTChainList();
00068
00073 bool addHLTChain(HLTChain* ch);
00074
00078 HLTChain* chain( const std::string& chainname ) const;
00079
00084 HLTChain* chain( unsigned int counter, HLTLevel level ) const;
00085
00087
00088
00090 void print(const std::string& indent="", unsigned int detail=1) const;
00091
00092 DiffStruct* compareTo(const HLTChainList* o) const;
00093
00095 void applyPrescaleSet(const HLTPrescaleSet* pss);
00096
00098 HLTPrescaleSet* extractPrescaleSet() const;
00099
00100 void setL2LowerChainCounter(const CTPConfig* ctpcfg);
00101
00102 void setEFLowerChainCounter();
00103
00104
00105 void clear();
00106
00107 friend std::ostream & operator<<(std::ostream & o, const TrigConf::HLTChainList & c);
00108 };
00109
00110 }
00111
00112 #endif
00113