Belle II Software  release-05-01-25
DeSerializerPXD.h
1 //+
2 // File : DeSerializerPXD.h
3 // Description : Module to receive PXD Data from external socket and store it as RawPXD in Data Store
4 // This is meant for lab use (standalone testing, debugging) without an event builder.
5 
6 // Author : Bjoern Spruck / Klemens Lautenbach
7 // Date : 13 - Aug - 2013
8 //-
9 
10 #ifndef DESERIALIZERPXD_H
11 #define DESERIALIZERPXD_H
12 
13 #include <string>
14 #include <vector>
15 
16 #include <framework/core/Module.h>
17 #include <framework/datastore/StoreObjPtr.h>
18 #include <framework/datastore/StoreArray.h>
19 
20 #include <daq/dataflow/EvtSocket.h>
21 
22 #include <framework/dataobjects/EventMetaData.h>
23 #include <rawdata/dataobjects/RawPXD.h>
24 
25 namespace Belle2 {
33  class DeSerializerPXDModule : public Module {
34 
35  // Public functions
36  public:
37 
40  virtual ~DeSerializerPXDModule();
41 
43  virtual void initialize();
44 
46  virtual void beginRun();
47  virtual void event();
48  virtual void endRun();
49  virtual void terminate();
50 
51  // Data members
52  private:
53 
54  // DataStore interface
55  StoreArray<RawPXD> rawpxdary;
56 
57  // Parallel processing parameters
58 
59  // Event Meta Data
60  StoreObjPtr<EventMetaData> m_eventMetaDataPtr;
61 
64 
66  std::vector<int> m_ports;
67 
69  std::vector<std::string> m_hosts;
70 
72  std::vector<EvtSocketSend*> m_recvs;
73 
76 
78  int m_nEvents;
79 
81  int* m_buffer;
82 
83  // For monitoring
84  // int events_processed;
85 
86  };
87 
89 } // end namespace Belle2
90 
91 #endif // DESERIALIZERPXD_H
Belle2::DeSerializerPXDModule::m_num_connections
int m_num_connections
Definition: DeSerializerPXD.h:63
Belle2::DeSerializerPXDModule::m_nEvents
int m_nEvents
No. of rcvd events.
Definition: DeSerializerPXD.h:78
Belle2::DeSerializerPXDModule::DeSerializerPXDModule
DeSerializerPXDModule()
Constructor / Destructor.
Definition: DeSerializerPXD.cc:25
Belle2::DeSerializerPXDModule::m_recvs
std::vector< EvtSocketSend * > m_recvs
Receiver Sockets.
Definition: DeSerializerPXD.h:72
Belle2::DeSerializerPXDModule::m_hosts
std::vector< std::string > m_hosts
Sender Names.
Definition: DeSerializerPXD.h:69
Belle2::DeSerializerPXDModule::m_compressionLevel
int m_compressionLevel
Compression Level.
Definition: DeSerializerPXD.h:75
Belle2::DeSerializerPXDModule::endRun
virtual void endRun()
This method is called if the current run ends.
Definition: DeSerializerPXD.cc:108
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2::DeSerializerPXDModule::m_ports
std::vector< int > m_ports
Receiver Port.
Definition: DeSerializerPXD.h:66
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::DeSerializerPXDModule::event
virtual void event()
This method is the core of the module.
Definition: DeSerializerPXD.cc:74
Belle2::DeSerializerPXDModule::beginRun
virtual void beginRun()
Module functions to be called from event process.
Definition: DeSerializerPXD.cc:69
Belle2::DeSerializerPXDModule::m_buffer
int * m_buffer
buffer
Definition: DeSerializerPXD.h:81
Belle2::DeSerializerPXDModule
A class definition of an input module for Sequential ROOT I/O.
Definition: DeSerializerPXD.h:33
Belle2::DeSerializerPXDModule::terminate
virtual void terminate()
This method is called at the end of the event processing.
Definition: DeSerializerPXD.cc:116
Belle2::StoreArray
Accessor to arrays stored in the data store.
Definition: ECLMatchingPerformanceExpertModule.h:33
Belle2::DeSerializerPXDModule::initialize
virtual void initialize()
Module functions to be called from main process.
Definition: DeSerializerPXD.cc:47