// $Id$ /************************************************************ * The Data Acquisition Backbone Core (DABC) * ************************************************************ * Copyright (C) 2009 - * * GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * * Planckstr. 1, 64291 Darmstadt, Germany * * Contact: http://dabc.gsi.de * ************************************************************ * This software can be used under the GPL license * * agreements as stated in LICENSE.txt file * * which is part of the distribution. * ************************************************************/ #include "dabc/eventsapi.h" // ====================================================================================== unsigned dabc::EventsIterator::NumEvents(const Buffer& buf) { if (!Assign(buf)) return 0; unsigned cnt = 0; while (NextEvent()) cnt++; Close(); return cnt; }