--- chewbacca/event/EventCounter.cpp 2008/09/23 07:19:51 1.1 +++ chewbacca/event/EventCounter.cpp 2009/07/29 15:47:19 1.3 @@ -1,7 +1,7 @@ /** @file - * $Source: /repository/event/EventCounter.cpp,v $ - * $Id: EventCounter.cpp,v 1.2 2008-02-07 18:17:23 messineo Exp $ - * $Author: messineo $ + * $Source: /afs/ba.infn.it/user/pamela/src/CVS/chewbacca/event/EventCounter.cpp,v $ + * $Id: EventCounter.cpp,v 1.2 2009/07/24 13:53:49 mocchiut Exp $ + * $Author: mocchiut $ * * Implementation of the EventCounter class. */ @@ -23,6 +23,7 @@ */ EventCounter::EventCounter(int run): // New Packets. + RunNumber(run), Pscu(0), PhysEndRun(0), CalibCalPulse1(0), @@ -31,14 +32,14 @@ CalibTrkBoth(0), CalibTrk1(0), CalibTrk2(0), + CalibCal(0), CalibTof(0), CalibS4(0), CalibCalPed(0), Calib1_Ac1(0), - Calib2_Ac1(0), Calib1_Ac2(0), + Calib2_Ac1(0), Calib2_Ac2(0), - CalibCal(0), RunHeader(0), RunTrailer(0), CalibHeader(0), @@ -69,8 +70,7 @@ S4Alarm(0), Ac2Alarm(0), TsbT(0), - TsbB(0), - RunNumber(run) { + TsbB(0) { CMap.insert(CounterMap::value_type(PacketType::Pscu, &Pscu)); CMap.insert(CounterMap::value_type(PacketType::PhysEndRun, &PhysEndRun)); CMap.insert(CounterMap::value_type(PacketType::CalibCalPulse1, &CalibCalPulse1)); @@ -139,7 +139,8 @@ } else { oss.str(""); - oss << "\n No counter of type " << type->GetName().c_str(); + // oss << "\n No counter of type " << type->GetName().c_str(); + oss << "\n No counter of type " << type->GetName(); //std::cout<second; return *counter; } else { - throw NotExistingCounterException(type->GetName().c_str()); + // throw NotExistingCounterException(type->GetName().c_str()); + throw NotExistingCounterException(type->GetName()); return -1; } } @@ -177,7 +179,8 @@ const int *counter = p->second; return *counter + 1; } else { - throw NotExistingCounterException(type->GetName().c_str()); + // throw NotExistingCounterException(type->GetName().c_str()); + throw NotExistingCounterException(type->GetName()); return -1; } } @@ -197,4 +200,5 @@ //logger->info(oss.str().c_str()); } } - + +ClassImp(EventCounter)