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

Diff of /chewbacca/event/EventCounter.cpp

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

revision 1.1 by mocchiut, Tue Sep 23 07:19:51 2008 UTC revision 1.2 by mocchiut, Fri Jul 24 13:53:49 2009 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Source: /repository/event/EventCounter.cpp,v $   * $Source: /afs/ba.infn.it/user/pamela/src/CVS/chewbacca/event/EventCounter.cpp,v $
3   * $Id: EventCounter.cpp,v 1.2 2008-02-07 18:17:23 messineo Exp $   * $Id: EventCounter.cpp,v 1.1.1.1 2008/09/23 07:19:51 mocchiut Exp $
4   * $Author: messineo $   * $Author: mocchiut $
5   *   *
6   * Implementation of the EventCounter class.   * Implementation of the EventCounter class.
7   */   */
# Line 31  EventCounter::EventCounter(int run): Line 31  EventCounter::EventCounter(int run):
31    CalibTrkBoth(0),    CalibTrkBoth(0),
32    CalibTrk1(0),    CalibTrk1(0),
33    CalibTrk2(0),    CalibTrk2(0),
34      CalibCal(0),
35    CalibTof(0),    CalibTof(0),
36    CalibS4(0),    CalibS4(0),
37    CalibCalPed(0),    CalibCalPed(0),
38    Calib1_Ac1(0),    Calib1_Ac1(0),
   Calib2_Ac1(0),  
39    Calib1_Ac2(0),    Calib1_Ac2(0),
40      Calib2_Ac1(0),
41    Calib2_Ac2(0),    Calib2_Ac2(0),
   CalibCal(0),  
42    RunHeader(0),    RunHeader(0),
43    RunTrailer(0),    RunTrailer(0),
44    CalibHeader(0),    CalibHeader(0),
# Line 139  void EventCounter::Increment(PacketType Line 139  void EventCounter::Increment(PacketType
139    } else {    } else {
140    
141      oss.str("");      oss.str("");
142      oss << "\n No counter of type  " << type->GetName().c_str();      //    oss << "\n No counter of type  " << type->GetName().c_str();
143        oss << "\n No counter of type  " << type->GetName();
144      //std::cout<<oss.str()<<std::endl; //marco      //std::cout<<oss.str()<<std::endl; //marco
145    
146      throw NotExistingCounterException(oss.str().c_str());      throw NotExistingCounterException(oss.str().c_str());
# Line 160  int EventCounter::Get(PacketType const * Line 161  int EventCounter::Get(PacketType const *
161      const int *counter = p->second;      const int *counter = p->second;
162      return *counter;      return *counter;
163    } else {    } else {
164      throw NotExistingCounterException(type->GetName().c_str());      //    throw NotExistingCounterException(type->GetName().c_str());
165        throw NotExistingCounterException(type->GetName());
166      return -1;      return -1;
167    }    }
168  }  }
# Line 177  int EventCounter::Next(PacketType const Line 179  int EventCounter::Next(PacketType const
179      const int *counter = p->second;      const int *counter = p->second;
180      return *counter + 1;      return *counter + 1;
181    } else {    } else {
182      throw NotExistingCounterException(type->GetName().c_str());      //    throw NotExistingCounterException(type->GetName().c_str());
183        throw NotExistingCounterException(type->GetName());
184      return -1;      return -1;
185    }    }
186  }  }
# Line 197  void EventCounter::PrintCounters() const Line 200  void EventCounter::PrintCounters() const
200    //logger->info(oss.str().c_str());    //logger->info(oss.str().c_str());
201    }    }
202  }  }
203            
204    ClassImp(EventCounter)  

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.23