CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BUFUInterface.h
Go to the documentation of this file.
1 /*
2  * BUFUInterface.h
3  *
4  * Created on: Aug 16, 2011
5  * Author: aspataru
6  */
7 
8 #ifndef BUFUINTERFACE_H_
9 #define BUFUINTERFACE_H_
10 
11 #include "BaseBU.h"
12 #include "BaseFU.h"
13 #include "xdaq/Application.h"
14 
15 namespace evf {
16 
18 
19 public:
21 
23  static BUFUInterface* instance();
30 
32  bool registerBU(BaseBU* bu, Logger log);
34  bool registerFU(BaseFU* fu, Logger log);
35 
39  void allocate(const UIntVec_t& fuResourceIds,
40  xdaq::ApplicationDescriptor* fuAppDesc);
42  void discard(UInt_t buResourceId);
44  void take(xdaq::ApplicationDescriptor* fuAppDesc,
45  toolbox::mem::Reference* bufRef);
46 
47 private:
50 
52  BUFUInterface();
53 
54  /*
55  * private functions
56  */
58  inline bool directConnection() const {
59  return buConn_ && fuConn_;
60  }
61 
62  /*
63  * private fields
64  */
73 
74 };
75 }
76 
77 #endif /* BUFUINTERFACE_H_ */
bool registerFU(BaseFU *fu, Logger log)
register the FU to the interface
BUFUInterface()
private constructor
bool buConn_
flags for BU, FU connection
Definition: BUFUInterface.h:72
BaseFU * fu_
pointer to connected ResourceBroker(FU), using BaseFU interface
Definition: BUFUInterface.h:68
bool registerBU(BaseBU *bu, Logger log)
register the BU to the interface
void allocate(const UIntVec_t &fuResourceIds, xdaq::ApplicationDescriptor *fuAppDesc)
Logger buLogger_
loggers
Definition: BUFUInterface.h:70
unsigned int UInt_t
Definition: FUTypes.h:12
BaseBU * bu_
pointer to connected BU, using BaseBU interface
Definition: BUFUInterface.h:66
static BUFUInterface * instance_
pointer to unique instance
Definition: BUFUInterface.h:49
bool directConnection() const
checks if both BU and FU are connected to the interface
Definition: BUFUInterface.h:58
void take(xdaq::ApplicationDescriptor *fuAppDesc, toolbox::mem::Reference *bufRef)
BU->FU TAKE.
static BUFUInterface * forceNewInstance()
void discard(UInt_t buResourceId)
FU->BU DISCARD.
static BUFUInterface * instance()
returns a pointer to a singleton instance of the interface
std::vector< UInt_t > UIntVec_t
Definition: FUTypes.h:15