Gaudi Framework, version v23r6

Home   Generated: Wed Jan 30 2013
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EventCounter.cpp
Go to the documentation of this file.
1 //$Id: EventCounter.cpp,v 1.1 2004/07/12 13:39:20 mato Exp $
5 
10  Algorithm(name, pSvcLocator),
11  m_skip ( 0 ),
12  m_total( 0 )
13 {
14  declareProperty( "Frequency", m_frequency=1 );
15  m_frequency.verifier().setBounds( 0, 1000 );
16 }
17 
22 {
23 }
24 
27 {
28  MsgStream log(msgSvc(), name());
29  log << MSG::INFO << name( ) << ":EventCounter::initialize - Frequency: " << m_frequency << endmsg;
30  return StatusCode::SUCCESS;
31 }
32 
35 {
36  MsgStream log(msgSvc(), name());
37  m_total++;
38  int freq = m_frequency;
39  if ( freq > 0 ) {
40  m_skip++;
41  if ( m_skip >= freq ) {
42  log << MSG::INFO << name( ) << ":EventCounter::execute - seen events: " << m_total << endmsg;
43  m_skip = 0;
44  }
45  }
46  return StatusCode::SUCCESS;
47 }
48 
51 {
52  MsgStream log(msgSvc(), name());
53  log << MSG::INFO << name( ) << ":EventCounter::finalize - total events: " << m_total << endmsg;
54  return StatusCode::SUCCESS;
55 }

Generated at Wed Jan 30 2013 17:13:37 for Gaudi Framework, version v23r6 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004