Belle II Software  release-08-01-10
Cond.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #ifndef _Belle2_Cond_hh
9 #define _Belle2_Cond_hh
10 
11 #include "daq/slc/system/Mutex.h"
12 
13 namespace Belle2 {
19  class Cond {
20 
21  public:
22  Cond();
23  Cond(const Cond& cond);
24  ~Cond() {};
25 
26  public:
27  bool init();
28  bool signal();
29  bool broadcast();
30  bool wait(Mutex& mutex);
31  bool wait(Mutex& mutex, const unsigned int sec,
32  const unsigned int msec = 0);
33  bool destroy();
34 
35  private:
36  pthread_cond_t m_cond_t;
37 
38  };
40 };
41 #endif
Abstract base class for different kinds of events.