CMS 3D CMS Logo

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)

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:
eulisse
Revision:
1.15
Date:
2013/01/07 11:16:27

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)
template<typename T >
boost::disable_if< hasMemoryUsed< T >, MemoryType >::type stor::detail::memoryUsage ( const T t)

Definition at line 93 of file ConcurrentQueue.h.

References usage().

    {
      MemoryType usage(0UL);
      try
      {
        usage = t.memoryUsed();
      }
      catch(...)
      {}
      return usage;
    }