1 |
/** @file |
/** @file |
2 |
* $Source: /home/cvsmanager/yoda/event/EventCounter.cpp,v $ |
* $Source: /home/cvsmanager/yoda/event/EventCounter.cpp,v $ |
3 |
* $Id: EventCounter.cpp,v 2.6 2005/01/29 00:26:41 kusanagi Exp $ |
* $Id: EventCounter.cpp,v 4.1 2005/05/28 08:30:01 kusanagi Exp $ |
4 |
* $Author: kusanagi $ |
* $Author: kusanagi $ |
5 |
* |
* |
6 |
* Implementation of the EventCounter class. |
* Implementation of the EventCounter class. |
27 |
CalibCalPulse1(0), |
CalibCalPulse1(0), |
28 |
CalibCalPulse2(0), |
CalibCalPulse2(0), |
29 |
Physics(0), |
Physics(0), |
|
CalibTrkBoth(0), |
|
30 |
CalibTrk1(0), |
CalibTrk1(0), |
31 |
CalibTrk2(0), |
CalibTrk2(0), |
|
CalibTrd(0), |
|
32 |
CalibTof(0), |
CalibTof(0), |
33 |
CalibS4(0), |
CalibS4(0), |
34 |
CalibCalPed(0), |
CalibCalPed(0), |
67 |
TofAlarm(0), |
TofAlarm(0), |
68 |
S4Alarm(0), |
S4Alarm(0), |
69 |
TsbT(0), |
TsbT(0), |
70 |
TsbB(0), |
TsbB(0), |
71 |
RunNumber(run) { |
RunNumber(run) { |
72 |
CMap.insert(CounterMap::value_type(PacketType::Pscu, &Pscu)); |
CMap.insert(CounterMap::value_type(PacketType::Pscu, &Pscu)); |
73 |
CMap.insert(CounterMap::value_type(PacketType::PhysEndRun, &PhysEndRun)); |
CMap.insert(CounterMap::value_type(PacketType::PhysEndRun, &PhysEndRun)); |
74 |
CMap.insert(CounterMap::value_type(PacketType::CalibCalPulse1, &CalibCalPulse1)); |
CMap.insert(CounterMap::value_type(PacketType::CalibCalPulse1, &CalibCalPulse1)); |
75 |
CMap.insert(CounterMap::value_type(PacketType::CalibCalPulse2, &CalibCalPulse2)); |
CMap.insert(CounterMap::value_type(PacketType::CalibCalPulse2, &CalibCalPulse2)); |
76 |
CMap.insert(CounterMap::value_type(PacketType::Physics, &Physics)); |
CMap.insert(CounterMap::value_type(PacketType::Physics, &Physics)); |
|
CMap.insert(CounterMap::value_type(PacketType::CalibTrkBoth, &CalibTrkBoth)); |
|
77 |
CMap.insert(CounterMap::value_type(PacketType::CalibTrk1, &CalibTrk1)); |
CMap.insert(CounterMap::value_type(PacketType::CalibTrk1, &CalibTrk1)); |
78 |
CMap.insert(CounterMap::value_type(PacketType::CalibTrk2, &CalibTrk2)); |
CMap.insert(CounterMap::value_type(PacketType::CalibTrk2, &CalibTrk2)); |
|
CMap.insert(CounterMap::value_type(PacketType::CalibTrd, &CalibTrd)); |
|
79 |
CMap.insert(CounterMap::value_type(PacketType::CalibTof, &CalibTof)); |
CMap.insert(CounterMap::value_type(PacketType::CalibTof, &CalibTof)); |
80 |
CMap.insert(CounterMap::value_type(PacketType::CalibS4, &CalibS4)); |
CMap.insert(CounterMap::value_type(PacketType::CalibS4, &CalibS4)); |
81 |
CMap.insert(CounterMap::value_type(PacketType::CalibCalPed, &CalibCalPed)); |
CMap.insert(CounterMap::value_type(PacketType::CalibCalPed, &CalibCalPed)); |
127 |
(*counter)++; |
(*counter)++; |
128 |
oss.str(""); |
oss.str(""); |
129 |
oss << " Counter." << type->GetName() << " = " << (*counter); |
oss << " Counter." << type->GetName() << " = " << (*counter); |
130 |
logger->debug(oss.str().c_str()); |
logger->info(oss.str().c_str()); |
131 |
} else { |
} else { |
132 |
oss.str(""); |
oss.str(""); |
133 |
oss << "\n No counter of type " << type->GetName().c_str(); |
oss << "\n No counter of type " << type->GetName().c_str(); |
179 |
for(CounterMap::const_iterator p = CMap.begin(); p != CMap.end(); p++) { |
for(CounterMap::const_iterator p = CMap.begin(); p != CMap.end(); p++) { |
180 |
oss.str(""); |
oss.str(""); |
181 |
oss << " Counter." << (p->first)->GetName() << " \t \t " << (*p->second); |
oss << " Counter." << (p->first)->GetName() << " \t \t " << (*p->second); |
182 |
logger->warn(oss.str().c_str()); |
logger->info(oss.str().c_str()); |
183 |
} |
} |
184 |
} |
} |