CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FUResourceBroker.h
Go to the documentation of this file.
1 //
3 // FUResourceBroker
4 // ----------------
5 //
6 // 10/20/2006 Philipp Schieferdecker <philipp.schieferdecker@cern.ch>
7 // 20/01/2012 Andrei Spataru <aspataru@cern.ch>
9 
10 #ifndef FURESOURCEBROKER_H
11 #define FURESOURCEBROKER_H 1
12 
18 
19 #include "xdaq/Application.h"
20 #include "xdaq/NamespaceURI.h"
21 #include "xdata/InfoSpace.h"
22 #include "xdata/String.h"
23 #include "xdata/Boolean.h"
24 #include "xdata/UnsignedInteger32.h"
25 #include "xdata/Double.h"
26 
27 #include "interface/shared/frl_header.h"
28 #include "interface/shared/fed_header.h"
29 #include "interface/shared/fed_trailer.h"
30 
31 #include <vector>
32 #include <string>
33 #include <semaphore.h>
34 #include <sys/time.h>
35 
36 namespace evf {
37 
38 class BUProxy;
39 class SMProxy;
40 class EvffedFillerRB;
41 
49 class FUResourceBroker: public xdaq::Application, public xdata::ActionListener {
50 
51 public:
52  //
53  // xdaq instantiator macro
54  //
56 
57  //
58  // construction/destruction
59  //
60  FUResourceBroker(xdaq::ApplicationStub *s);
61  virtual ~FUResourceBroker();
62 
63  //
64  // public member functions
65  //
66 
70  xoap::MessageReference handleFSMSoapMessage(xoap::MessageReference msg)
72 
76  void I2O_FU_TAKE_Callback(toolbox::mem::Reference *bufRef);
77 
81  void I2O_FU_DATA_DISCARD_Callback(toolbox::mem::Reference *bufRef);
82 
86  void I2O_FU_DQM_DISCARD_Callback(toolbox::mem::Reference *bufRef);
87 
91  void I2O_EVM_LUMISECTION_Callback(toolbox::mem::Reference *bufRef);
92 
93  // Hyper DAQ web page(s) [see Utilities/WebGUI]
96  void customWebPage(xgi::Input *in, xgi::Output *out)
98 
102  void actionPerformed(xdata::Event& e);
103 
104  unsigned int instanceNumber() const {
105  return instance_.value_;
106  }
107 
108 public:
109  static const int CRC_ERROR_SHIFT = 0x0;
110  static const int DATA_ERROR_SHIFT = 0x1;
111  static const int LOST_ERROR_SHIFT = 0x2;
112  static const int TIMEOUT_NOEVENT_ERROR_SHIFT = 0x3;
113  static const int TIMEOUT_EVENT_ERROR_SHIFT = 0x4;
114  static const int SENT_ERREVENT_ERROR_SHIFT = 0x5;
115 
116 private:
117  //
118  // private member functions
119  //
120  void exportParameters();
122  bool waitForStateChange(std::string name, int timeoutMicroSec);
123 
124 private:
125  //
126  // member data
127  //
128  // Event scheduler, owned by FUResourceBroker
130 
131  // Shared Resources
133 
134  // Finite state machine
136 
137  // monitored parameters
138  xdata::String url_;
139  xdata::String class_;
140  xdata::UnsignedInteger32 instance_;
141 };
142 
143 } // namespace evf
144 
145 
146 #endif
static const int SENT_ERREVENT_ERROR_SHIFT
#define Input(cl)
Definition: vmac.h:189
FUResourceBroker(xdaq::ApplicationStub *s)
void I2O_FU_TAKE_Callback(toolbox::mem::Reference *bufRef)
boost::shared_ptr< SharedResources > SharedResourcesPtr_t
void customWebPage(xgi::Input *in, xgi::Output *out)
bool waitForStateChange(std::string name, int timeoutMicroSec)
static const int LOST_ERROR_SHIFT
void I2O_FU_DATA_DISCARD_Callback(toolbox::mem::Reference *bufRef)
unsigned int instanceNumber() const
void I2O_FU_DQM_DISCARD_Callback(toolbox::mem::Reference *bufRef)
rb_statemachine::SharedResourcesPtr_t res_
rb_statemachine::SMEventScheduler * eventScheduler_
xoap::MessageReference handleFSMSoapMessage(xoap::MessageReference msg)
rb_statemachine::RBStateMachinePtr fsm_
static const int TIMEOUT_EVENT_ERROR_SHIFT
tuple out
Definition: dbtoconf.py:99
void actionPerformed(xdata::Event &e)
boost::shared_ptr< RBStateMachine > RBStateMachinePtr
static const int CRC_ERROR_SHIFT
static const int TIMEOUT_NOEVENT_ERROR_SHIFT
#define Output(cl)
Definition: vmac.h:193
void I2O_EVM_LUMISECTION_Callback(toolbox::mem::Reference *bufRef)
static const int DATA_ERROR_SHIFT
xdata::UnsignedInteger32 instance_
void webPageRequest(xgi::Input *in, xgi::Output *out)