--- chewbacca/event/EventCounter.h 2010/02/11 09:02:15 1.5 +++ chewbacca/event/EventCounter.h 2015/01/19 12:34:17 1.6 @@ -1,6 +1,6 @@ /** @file * $Source: /afs/ba.infn.it/user/pamela/src/CVS/chewbacca/event/EventCounter.h,v $ - * $Id: EventCounter.h,v 1.4 2009/08/04 13:58:16 mocchiut Exp $ + * $Id: EventCounter.h,v 1.5 2010/02/11 09:02:15 mocchiut Exp $ * $Author: mocchiut $ * * Header file for the EventCounter class. @@ -26,9 +26,9 @@ // Int_t fN; // Int_t *count; //! TString name; //! - void Clear(Option_t *t="") { t="";}; + void Clear(Option_t *t="") { name.Clear(); name.Resize(0); count=0;}; mapval* GetMapVal(){return this;}; - ClassDef(mapval, 0); + ClassDef(mapval, 1); }; class mappa: public TObject { @@ -39,6 +39,7 @@ public: mappa(); + ~mappa(){this->Clear();}; void Clear(Option_t *t=""); void Delete(Option_t *t=""); // @@ -48,7 +49,7 @@ mapval* Get(Int_t i){ return ((mapval*)val->At(i));}; Bool_t end(){ return fend;}; void Set(); - ClassDef(mappa, 1); + ClassDef(mappa, 2); }; @@ -112,6 +113,7 @@ public: EventCounter(int = 0); + ~EventCounter(){this->Clear();}; /** Get the run number for the last read event of this type. */ int getPscu() const { return Pscu; }; /** Get the run number for the last read event of this type. */ @@ -121,7 +123,8 @@ int GetRunNumber(void) const { return RunNumber; } void Increment(pamela::PacketType const *) throw (NotExistingCounterException); void PrintCounters(); - ClassDef(EventCounter, 9) + void Clear(Option_t *t=""){CMap.Clear();}; + ClassDef(EventCounter, 10) }; }