otsdaq  v2_05_02_indev
ARTDAQFEDataManagerSupervisor.cc
1 #include "otsdaq/CoreSupervisors/ARTDAQFEDataManagerSupervisor.h"
2 
3 #include "otsdaq/ARTDAQDataManager/ARTDAQDataManager.h"
4 #include "otsdaq/ConfigurationInterface/ConfigurationManager.h"
5 #include "otsdaq/DataManager/DataManagerSingleton.h"
6 #include "otsdaq/FECore/FEVInterfacesManager.h"
7 
8 using namespace ots;
9 
10 XDAQ_INSTANTIATOR_IMPL(ARTDAQFEDataManagerSupervisor)
11 
12 //==============================================================================
13 // The intention is that the artdaq Board Reader would be a consumer
14 // extracting data that the front-end places in the buffer.
15 ARTDAQFEDataManagerSupervisor::ARTDAQFEDataManagerSupervisor(xdaq::ApplicationStub* s) : FEDataManagerSupervisor(s, true /*artdaq Data Manager*/)
16 {
17  // __SUP_COUT__ << "Constructor." << std::endl;
18  //
19  // //WARNING THE ORDER IS IMPORTANT SINCE THE FIRST STATE MACHINE ELEMENT
20  // // WILL BE CALLED FIRST DURING TRANSITION!!!!!
21  //
22  // //the FE Interfaces Manager is added first, and then the Data Manager
23  // // So on FSM transitions, front-ends will transition first.
24  //
25  // //FEVInterfacesManager gets added in FESupervisor constructor
26  // __SUP_COUTV__(CoreSupervisorBase::theStateMachineImplementation_.size());
27  //
35  // __SUP_COUT__ << "Adding Data Manager now...!" << __E__;
36  // CoreSupervisorBase::theStateMachineImplementation_.push_back(
37  // DataManagerSingleton::getInstance<ARTDAQDataManager>(
38  // CorePropertySupervisorBase::getContextTreeNode(),
39  // CorePropertySupervisorBase::supervisorConfigurationPath_,
40  // CorePropertySupervisorBase::supervisorApplicationUID_
41  // )
42  // );
43  //
44  // extractDataManager();
45 
46  __SUP_COUT__ << "Constructed." << __E__;
47 } // end constructor()
48 
49 //==============================================================================
50 ARTDAQFEDataManagerSupervisor::~ARTDAQFEDataManagerSupervisor(void)
51 {
52  // __SUP_COUT__ << "Destroying..." << std::endl;
53  //
54  // //theStateMachineImplementation_ is reset and the object it points to deleted in
55  //~CoreSupervisorBase()
56  // //This destructor must happen before the CoreSupervisor destructor
57  //
58  // DataManagerSingleton::deleteInstance(CoreSupervisorBase::supervisorApplicationUID_);
59  // theStateMachineImplementation_.pop_back();
60 
61  __SUP_COUT__ << "Destructed." << __E__;
62 } // end destructor()