Belle II Software  release-08-01-10
ERecoRunControlCallback.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #include "daq/expreco/ERecoRunControlCallback.h"
9 
10 #include "daq/expreco/ERecoMasterCallback.h"
11 
12 #include <daq/slc/nsm/NSMCommunicator.h>
13 
14 using namespace Belle2;
15 
16 ERecoRunControlCallback::ERecoRunControlCallback(ERecoMasterCallback* callback)
17  : m_callback(callback)
18 {
19  callback->setCallback(this);
20  allocData(getNode().getName() + "_STATUS", "erunitinfo", 3);
21 }
22 
23 void ERecoRunControlCallback::initialize(const DBObject&)
24 {
25  allocData(getNode().getName() + "_STATUS", "erunitinfo", 3);
26 }
27 
28 bool ERecoRunControlCallback::perform(NSMCommunicator& com)
29 {
30  NSMCommand cmd(com.getMessage().getRequestName());
31  m_callback->perform(com);
32  if (cmd == NSMCommand::VGET || cmd == NSMCommand::VSET) {
33  return RCCallback::perform(com);
34  }
35  return true;
36 }
37 
TString getName(const TObject *obj)
human-readable name (e.g.
Definition: ObjectInfo.cc:45
Abstract base class for different kinds of events.