QApolloTriggerList.hh
00001
00008 #ifndef _Q_APOLLO_TRIGGER_LIST_H_
00009 #define _Q_APOLLO_TRIGGER_LIST_H_
00010
00011 #include <vector>
00012 #include "QCuore.hh"
00013 #include "QApolloTrigger.hh"
00014
00015 class QApolloTriggerList {
00016
00017 public:
00018
00019
00020 QApolloTriggerList();
00021
00022
00023 virtual ~QApolloTriggerList();
00024
00036 QApolloTrigger* Run();
00037
00039 void SelfAdjust();
00040
00042 bool isReady() const {return fReady;}
00043
00044
00045 void Dump(int) const;
00046
00057 void SetEnabled(bool enabled);
00058
00059 private:
00060
00061 void Add(QApolloTrigger* t) {fTriggers[t->Lg()].push_back( t );}
00062
00067 void EvalMinNumWords();
00068
00074 void EvalMinDelayWords();
00075
00077 void DeleteAll();
00078
00079 std::map<int, unsigned long> fNumWords;
00080 std::map<int, unsigned long> fDelayWords;
00081
00082 std::map< int, std::vector<QApolloTrigger*> > fTriggers;
00083
00084 bool fReady;
00085
00086 friend class QApolloTriggerFactory;
00087
00088 };
00089
00090 #endif