CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Typedefs | Functions
stor::detail Namespace Reference

Classes

class  ChainData
 
class  DQMEventMsgData
 
class  EndLumiSectMsgData
 
class  ErrorEventMsgData
 
class  EventMsgData
 
class  hasMemoryUsed
 
class  InitMsgData
 

Typedefs

typedef size_t MemoryType
 

Functions

template<typename T >
MemoryType memoryUsage (const std::pair< T, size_t > &t)
 
template<typename T >
boost::enable_if
< hasMemoryUsed< T >
, MemoryType >::type 
memoryUsage (const T &t)
 
template<typename T >
boost::disable_if
< hasMemoryUsed< T >
, MemoryType >::type 
memoryUsage (const T &t)
 

Detailed Description

Class template ConcurrentQueue provides a FIFO that can be used to communicate data between multiple producer and consumer threads in an application.

The template policy EnqPolicy determines the behavior of the enqNowait function. In all cases, this function will return promptly (that is, it will not wait for a full queue to become not-full). However, what is done in the case of the queue being full depends on the policy chosen:

FailIfFull: a std::exeption is thrown if the queue is full.

KeepNewest: the head of the FIFO is popped (and destroyed), and the new item is added to the FIFO. The function returns the number of popped (dropped) element.

RejectNewest: the new item is not put onto the FIFO. The function returns the dropped event count (1) if the item cannot be added.

Author:
mommsen
Revision:
1.13
Date:
2011/04/07 09:28:22

List of one or multiple I2O messages representing event fragments.

It wraps several toolbox::mem::Reference chained together and assures that the corresponding release methods are called when the last instance of I2OChain goes out of scope.

Author:
mommsen
Revision:
1.16
Date:
2012/04/20 10:48:18

Typedef Documentation

typedef size_t stor::detail::MemoryType

Definition at line 52 of file ConcurrentQueue.h.

Function Documentation

template<typename T >
MemoryType stor::detail::memoryUsage ( const std::pair< T, size_t > &  t)

Definition at line 79 of file ConcurrentQueue.h.

References usage().

Referenced by stor::FailIfFull< T >::doEnq(), stor::KeepNewest< T >::doEnq(), stor::RejectNewest< T >::doEnq(), stor::ConcurrentQueue< T, EnqPolicy >::enqWait(), stor::ConcurrentQueue< T, EnqPolicy >::insertIfPossible(), and stor::ConcurrentQueue< T, EnqPolicy >::removeHead().

80  {
81  MemoryType usage(0UL);
82  try
83  {
84  usage = t.first.memoryUsed();
85  }
86  catch(...)
87  {}
88  return usage;
89  }
void usage()
Definition: array2xmlEB.cc:14
template<typename T >
boost::enable_if<hasMemoryUsed<T>, MemoryType>::type stor::detail::memoryUsage ( const T t)

Definition at line 93 of file ConcurrentQueue.h.

References usage().

94  {
95  MemoryType usage(0UL);
96  try
97  {
98  usage = t.memoryUsed();
99  }
100  catch(...)
101  {}
102  return usage;
103  }
void usage()
Definition: array2xmlEB.cc:14
template<typename T >
boost::disable_if<hasMemoryUsed<T>, MemoryType>::type stor::detail::memoryUsage ( const T t)

Definition at line 107 of file ConcurrentQueue.h.

108  { return sizeof(T); }
long double T