TriggerTable.cc
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00023 #include "TriggerTable.h"
00024 #include <string>
00025 #include <sstream>
00026
00027 using namespace std;
00028
00029 Define_Module(TriggerTable);
00030
00031 int TriggerTable::numInitStages() const
00032 {
00033 return 6;
00034 }
00035
00036 void TriggerTable::initialize(int stage)
00037 {
00038 if (stage != 5) return;
00039
00040 I3 *i3 = check_and_cast<I3*>(getParentModule()->getSubmodule("i3"));
00041 triggerTable = &i3->getTriggerTable();
00042 WATCH_MAP(*triggerTable);
00043 getDisplayString().setTagArg("t", 0, "0 identifiers,\n0 triggers");
00044 }
00045
00046
00047 void TriggerTable::updateDisplayString()
00048 {
00049 ostringstream os;
00050 int numTriggers = 0;
00051
00052 os << triggerTable->size() << " identifiers,\n";
00053
00054 I3TriggerTable::iterator it;
00055 for (it = triggerTable->begin(); it != triggerTable->end(); it++) {
00056 numTriggers += it->second.size();
00057 }
00058
00059 os << numTriggers << " triggers";
00060
00061 getDisplayString().setTagArg("t", 0, os.str().c_str());
00062 }