/[PAMELA software]/yoda/event/EventCounter.cpp
ViewVC logotype

Diff of /yoda/event/EventCounter.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2.6 by kusanagi, Sat Jan 29 00:26:41 2005 UTC revision 3.0 by kusanagi, Fri Mar 4 15:54:11 2005 UTC
# Line 1  Line 1 
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.5 2005/01/11 14:58:20 kusanagi Exp $   * $Id: EventCounter.cpp,v 2.8 2005/03/03 10:23:30 kusanagi Exp $
4   * $Author: kusanagi $   * $Author: kusanagi $
5   *   *
6   * Implementation of the EventCounter class.   * Implementation of the EventCounter class.
# Line 68  EventCounter::EventCounter(int run): Line 68  EventCounter::EventCounter(int run):
68    TrgAlarm(0),    TrgAlarm(0),
69    TofAlarm(0),    TofAlarm(0),
70    S4Alarm(0),    S4Alarm(0),
71      TsbT(0),
72      TsbB(0),
73    RunNumber(run) {    RunNumber(run) {
74      CMap.insert(CounterMap::value_type(PacketType::Pscu,            &Pscu));      CMap.insert(CounterMap::value_type(PacketType::Pscu,            &Pscu));
75      CMap.insert(CounterMap::value_type(PacketType::PhysEndRun,      &PhysEndRun));      CMap.insert(CounterMap::value_type(PacketType::PhysEndRun,      &PhysEndRun));
# Line 114  EventCounter::EventCounter(int run): Line 116  EventCounter::EventCounter(int run):
116      CMap.insert(CounterMap::value_type(PacketType::TrgAlarm,        &TrgAlarm));      CMap.insert(CounterMap::value_type(PacketType::TrgAlarm,        &TrgAlarm));
117      CMap.insert(CounterMap::value_type(PacketType::TofAlarm,        &TofAlarm));      CMap.insert(CounterMap::value_type(PacketType::TofAlarm,        &TofAlarm));
118      CMap.insert(CounterMap::value_type(PacketType::S4Alarm,         &S4Alarm));      CMap.insert(CounterMap::value_type(PacketType::S4Alarm,         &S4Alarm));
119        CMap.insert(CounterMap::value_type(PacketType::TsbT,            &TsbT));
120        CMap.insert(CounterMap::value_type(PacketType::TsbB,            &TsbB));
121  }  }
122    
123  /**  /**
# Line 127  void EventCounter::Increment(PacketType Line 131  void EventCounter::Increment(PacketType
131      (*counter)++;      (*counter)++;
132      oss.str("");      oss.str("");
133      oss << " Counter." <<  type->GetName() << " = " <<  (*counter);      oss << " Counter." <<  type->GetName() << " = " <<  (*counter);
134      logger->debug(oss.str().c_str());      logger->info(oss.str().c_str());
135    } else {    } else {
136      oss.str("");      oss.str("");
137      oss << "\n No counter of type  " << type->GetName().c_str();      oss << "\n No counter of type  " << type->GetName().c_str();
# Line 179  void EventCounter::PrintCounters() const Line 183  void EventCounter::PrintCounters() const
183    for(CounterMap::const_iterator p = CMap.begin(); p != CMap.end(); p++) {    for(CounterMap::const_iterator p = CMap.begin(); p != CMap.end(); p++) {
184    oss.str("");    oss.str("");
185    oss <<  " Counter." <<  (p->first)->GetName()  <<   " \t \t " <<  (*p->second);    oss <<  " Counter." <<  (p->first)->GetName()  <<   " \t \t " <<  (*p->second);
186    logger->warn(oss.str().c_str());    logger->info(oss.str().c_str());
187    }    }
188  }  }

Legend:
Removed from v.2.6  
changed lines
  Added in v.3.0

  ViewVC Help
Powered by ViewVC 1.1.23