CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FUShmOutputModule.h
Go to the documentation of this file.
1 #ifndef _FUShmOutputModule_h
2 #define _FUShmOutputModule_h
3 
4 /*
5  Description:
6  Header file shared memory to be used with FUShmOutputModule.
7  See CMS EvF Storage Manager wiki page for further notes.
8 
9  $Id: FUShmOutputModule.h,v 1.6 2011/01/19 13:19:02 meschi Exp $
10 */
11 
13 
16 
18 
19 #include <iostream>
20 
21 // Data structure to be shared by all output modules for event serialization
23 {
25  shmBuffer_(0)
26  { }
27 
29  if(!shmBuffer_) {
31  return shmBuffer_;
32  } else {
33  return shmBuffer_;
34  }
35  }
36  void detachShmBuffer() {
37  if(!shmBuffer_) {
38  // no shared memory was attached to!
39  } else {
40  shmdt(shmBuffer_);
41  shmBuffer_ = 0;
42  }
43  }
44 
46 };
47 
48 namespace edm
49 {
52  {
53  public:
54 
57 
58  void doOutputHeader(InitMsgBuilder const& initMessage);
59  void doOutputEvent(EventMsgBuilder const& eventMessage);
60  unsigned int getCounts(){
61  return count_;
62  }
63  void start();
64  void stop();
65  // No parameters.
67 
68  private:
69 
71  std::string name_;
72  unsigned int count_;
73 
74  static bool fuIdsInitialized_;
76 
77  };
78 }
79 
80 #endif
FUShmOutputModule(edm::ParameterSet const &ps)
static FUShmBuffer * getShmBuffer()
Definition: FUShmBuffer.cc:915
evf::FUShmBuffer * shmBuffer_
void doOutputHeader(InitMsgBuilder const &initMessage)
evf::FUShmBuffer * getShmBuffer()
unsigned int uint32
Definition: MsgTools.h:13
void doOutputEvent(EventMsgBuilder const &eventMessage)
static void fillDescription(ParameterSetDescription &)
evf::FUShmBuffer * shmBuffer_