CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
WrapperNotifier.cc
Go to the documentation of this file.
1 // $Id: WrapperNotifier.cc,v 1.5 2011/03/07 15:31:32 mommsen Exp $
3 
5 
6 #include "xdata/InfoSpace.h"
7 
8 
9 using namespace stor;
10 
11 WrapperNotifier::WrapperNotifier( xdaq::Application* app ):
12  rcmsNotifier_(
13  xdaq2rc::RcmsStateNotifier(
14  app->getApplicationLogger(),
15  app->getApplicationDescriptor(),
16  app->getApplicationContext()
17  )
18  ),
19  app_( app )
20 {
21  xdata::InfoSpace *ispace = app->getApplicationInfoSpace();
22 
23  ispace->fireItemAvailable( "rcmsStateListener",
24  rcmsNotifier_.getRcmsStateListenerParameter() );
25  ispace->fireItemAvailable( "foundRcmsStateListener",
26  rcmsNotifier_.getFoundRcmsStateListenerParameter() );
27  rcmsNotifier_.findRcmsStateListener();
28  rcmsNotifier_.subscribeToChangesInRcmsStateListener( ispace );
29 }
30 
31 
32 void WrapperNotifier::reportNewState( const std::string& stateName )
33 {
34  rcmsNotifier_.stateChanged(
35  stateName,
36  std::string( "StorageManager is now " ) + stateName
37  );
38 }
39 
40 
void reportNewState(const std::string &stateName)
WrapperNotifier(xdaq::Application *app)
xdaq2rc::RcmsStateNotifier rcmsNotifier_