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 void Init();
00043
00045 bool isReady() const {return fReady;}
00046
00047
00048 void Dump(int) const;
00049
00060 void SetEnabled(bool enabled);
00061
00062 private:
00063
00064 void Add(QApolloTrigger* t) {fTriggers[t->Lg()].push_back( t );}
00065
00070 void EvalMinNumWords();
00071
00077 void EvalMinDelayWords();
00078
00080 void DeleteAll();
00081
00082 std::map<int, unsigned long> fNumWords;
00083 std::map<int, unsigned long> fDelayWords;
00084
00085 std::map< int, std::vector<QApolloTrigger*> > fTriggers;
00086
00087 bool fReady;
00088 bool fFirstCall;
00089
00090 friend class QApolloTriggerFactory;
00091
00092 };
00093
00094 #endif