00001 #ifndef TrigConf_HLTFrame
00002 #define TrigConf_HLTFrame
00003
00004 #include <fstream>
00005 #include <map>
00006 #include <string>
00007 #include <iosfwd>
00008 #include <vector>
00009
00010 #include "TrigConfL1Data/TrigConfData.h"
00011
00012 #include "TrigConfHLTData/HLTChainList.h"
00013 #include "TrigConfHLTData/HLTSequenceList.h"
00014 #include "TrigConfHLTData/HLTPrescaleSetCollection.h"
00015
00016 namespace TrigConf {
00017
00018 class HLTFrame;
00019 class HLTChain;
00020 class HLTPrescaleSet;
00021 class DiffStruct;
00022
00023 std::ostream & operator<<(std::ostream &, const HLTFrame &);
00024
00029 class HLTFrame : public TrigConfData {
00030 public:
00032 HLTFrame();
00033
00035 ~HLTFrame();
00036
00037 void clear();
00038
00039 HLTChainList& theHLTChainList() { return m_HLTChainList; }
00040 HLTSequenceList& theHLTSequenceList() { return m_HLTSequenceList; }
00041 HLTPrescaleSetCollection& thePrescaleSetCollection() { return m_hltPrescaleSets; }
00042 HLTPrescaleSet* thePrescaleSet(unsigned int lbn=0) { return m_hltPrescaleSets.thePrescaleSet(lbn); }
00043
00044 const HLTChainList& chains() const { return m_HLTChainList; }
00045 const HLTChainList& getHLTChainList() const { return m_HLTChainList; }
00046 const HLTSequenceList& sequences() const { return m_HLTSequenceList; }
00047 const HLTSequenceList& getHLTSequenceList() const { return m_HLTSequenceList; }
00048 const HLTPrescaleSetCollection& getPrescaleSetCollection() const { return m_hltPrescaleSets; }
00049 const HLTPrescaleSet* getPrescaleSet() const { return m_hltPrescaleSets.prescaleSet(); }
00050 const HLTPrescaleSet* getPrescaleSet(unsigned int lbn) const { return m_hltPrescaleSets.prescaleSet(lbn); }
00051 bool mergedHLT() const { return m_setMergedHLT; }
00052 const std::string& configSource() const { return m_ConfigSrc; }
00053
00054
00056 void setMergedHLT(bool merged=true) { m_setMergedHLT = merged; }
00057 void setConfigSource(const std::string& src) { m_ConfigSrc = src; }
00058
00059
00061 void print(const std::string& indent="", unsigned int detail=1) const;
00062
00063 void writeXML(const std::string& filename) const;
00064 void writeXML(std::ofstream & xmlfile) const;
00065
00066 bool equals(const HLTFrame* other, const std::string& filename) const;
00067 DiffStruct* compareTo(const HLTFrame* o) const;
00068
00069
00070
00071 std::vector<TrigConf::HLTChain*> chainsV() const;
00072 std::vector<TrigConf::HLTSequence*> sequencesV() const;
00073 std::string __str__() const;
00074
00075 private:
00076
00077 HLTChainList m_HLTChainList;
00078 HLTSequenceList m_HLTSequenceList;
00079 HLTPrescaleSetCollection m_hltPrescaleSets;
00080 bool m_setMergedHLT {false};
00081 std::string m_ConfigSrc {""};
00082
00084 std::map<std::string, unsigned int> m_str2idMap;
00085
00086 friend std::ostream & operator<<(std::ostream &, const TrigConf::HLTFrame &);
00087 };
00088
00089 }
00090
00091 #endif