00001 #ifndef TrigConf_HLTSequence
00002 #define TrigConf_HLTSequence
00003
00004 #include "TrigConfL1Data/TrigConfData.h"
00005
00006 #include <iosfwd>
00007 #include <fstream>
00008 #include <string>
00009 #include <vector>
00010
00011 namespace TrigConf {
00012
00013 class HLTSequence;
00014 class HLTTriggerElement;
00015 class DiffStruct;
00016 std::ostream & operator<<(std::ostream &, const HLTSequence &);
00017
00024 class HLTSequence : public TrigConfData {
00025 public:
00026
00028 HLTSequence();
00029
00036 HLTSequence( const std::vector<HLTTriggerElement*>& inputTEs,
00037 HLTTriggerElement* outputTE,
00038 const std::vector<std::string>& algorithms);
00039
00041 ~HLTSequence();
00042
00043
00044 std::vector<HLTTriggerElement*>& inputTEs() { return m_inputTEs; }
00045 HLTTriggerElement* outputTE() { return m_outputTE; }
00046 std::vector<std::string>& algorithms() { return m_algorithms; }
00047 HLTTriggerElement* topoStartTE() { return m_topoStartTE;}
00048
00049 const std::vector<HLTTriggerElement*>& inputTEs() const { return m_inputTEs; }
00050 const HLTTriggerElement* outputTE() const { return m_outputTE; }
00051 const std::vector<std::string>& algorithms() const { return m_algorithms; }
00052 const HLTTriggerElement* topoStartTE() const { return m_topoStartTE; }
00053 unsigned int hashId() const;
00054
00055 void set_inputTEs ( std::vector<HLTTriggerElement*>& inputTEs ) { m_inputTEs = inputTEs; }
00056 void set_outputTE ( HLTTriggerElement* outputTE );
00057 void set_algorithms ( std::vector<std::string>& algorithms ) { m_algorithms = algorithms; }
00058 void set_topoStartTE( HLTTriggerElement* te ) { m_topoStartTE = te; }
00059
00061 void print(const std::string& indent="", unsigned int detail=1) const;
00062 void writeXML(std::ofstream & xmlfile);
00063
00064 std::string concise() const;
00065
00066 void setL2(bool on=true) const { set(); if(on) m_level |= 0x1; else m_level &= 0x6; }
00067 void setEF(bool on=true) const { set(); if(on) m_level |= 0x2; else m_level &= 0x5; }
00068 void setHLT(bool on=true) const { set(); if(on) m_level = 0x4; else m_level &= 0x3; }
00069
00070 void reset() const { m_level = 0x8; }
00071 bool inL2() const { return (m_level&0x1) != 0; }
00072 bool inEF() const { return (m_level&0x2) != 0; }
00073 bool inHLT() const { return (m_level&0x4) != 0; }
00074 bool isSet() const { return (m_level&0x8) == 0; }
00075
00076 bool operator<(const HLTSequence& s) const {
00077 return name() < s.name();
00078 }
00079
00080 DiffStruct* compareTo(const HLTSequence* o) const;
00081
00082
00083 std::string __str__() const;
00084
00085 private:
00086
00087 std::vector<HLTTriggerElement*> m_inputTEs;
00088 HLTTriggerElement* m_outputTE { nullptr };
00089 std::vector<std::string> m_algorithms;
00090 HLTTriggerElement* m_topoStartTE { nullptr };
00091
00092
00093 mutable unsigned int m_level { 0 };
00094
00095 void set() const { m_level &= 0x7; }
00096
00097 friend std::ostream & operator<<(std::ostream &, const HLTSequence &);
00098
00099 };
00100
00101 }
00102
00103 #endif