HepLock


HepLock maintains a list of objects, and on demand, locks and unlocks them. The locks are turned on/off immediately. When an object is added, it is immediately locked if the lock is on. When an object is removed, it is first unlocked (if needed). When the HepLock object is deleted (or goes out of scope), its members are first unlocked (if needed).

Author

Paul Rensing

See also

HepChooser, HepCombiner, HepLockable

Declaration

#include "CLHEP/Combination/Lock.h"

class HepLock

Public Member Functions

Constructor
inline HepLock()
Constructor
inline HepLock(HepLockable *p)
Constructor
inline HepLock(HepLockable &p)
Destructor
inline ~HepLock()
add
void add(HepLockable *p)
inline void add(HepLockable &p)
Add the object.
remove
void remove(HepLockable *p)
inline void remove(HepLockable &p)
Remove the object.
lock
void lock()
unlock
void unlock()

Example

CLHEP/test/testComb.cc


29 September 1997
EVC