Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74733
b: "refs/heads/CMSSW_7_1_X"
c: 0951081
h: "refs/heads/CMSSW_7_1_X"
i:
  74731: 815a1f3
v: v3
  • Loading branch information
Lassi Tuura committed Oct 5, 2009
1 parent 1542ffa commit 0fba79e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 62 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e
"refs/heads/CMSSW_7_1_X": c54e4ddeb5f3d71568fb1299257cf17c2b7dbea2
"refs/heads/CMSSW_7_1_X": 0951081a7b5afd2a0f68f95f0b304968a35aeebd
25 changes: 11 additions & 14 deletions trunk/DQMServices/Core/interface/DQMOldReceiver.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef DQMSERVICES_CORE_DQM_CONNECTOR_H
# define DQMSERVICES_CORE_DQM_CONNECTOR_H
# define DQM_DEPRECATED __attribute__((deprecated))

# include <string>

class DQMNet;
class DQMStore;
class DQMOldReceiver
{
Expand All @@ -28,38 +28,35 @@ class DQMOldReceiver
sources or collectors); if flag=true, client will accept downstream connections
*/

DQMOldReceiver(void);
DQMOldReceiver(void) DQM_DEPRECATED;

/// Connect with monitoring server (DQM Collector) at <hostname> and <port_no>
/// using <client_name>;
DQMOldReceiver(const std::string &hostname, int port,
const std::string &client_name,
int unusedReconnectDelaySecs = -1,
bool unusedActAsServer = false);
bool unusedActAsServer = false) DQM_DEPRECATED;

~DQMOldReceiver(void);
~DQMOldReceiver(void) DQM_DEPRECATED;

/// get pointer to back-end interface
DQMStore *getStore(void)
DQMStore *getStore(void) DQM_DEPRECATED
{ return store_; }
DQMStore *getBEInterface(void) DQM_DEPRECATED
{ return store_; }
DQMStore *getBEInterface(void)
{ return getStore(); }

/** this is the "main" loop where we receive monitoring or
send subscription requests;
if client acts as server, method runQTests is also sending monitoring &
test results to clients downstream;
returns success flag */
bool update(void);
bool doMonitoring(void);
int getNumUpdates(void) const { return numUpdates_; }
bool update(void) DQM_DEPRECATED;
bool doMonitoring(void) DQM_DEPRECATED;
int getNumUpdates(void) const DQM_DEPRECATED { return 0; }

private:
/// use to get hold of structure with monitoring elements that class owns
DQMStore *store_;
/// client pointer
DQMNet *net_;
int numUpdates_;
};
} DQM_DEPRECATED;

#endif // DQMSERVICES_CORE_DQM_CONNECTOR_H
56 changes: 9 additions & 47 deletions trunk/DQMServices/Core/src/DQMOldReceiver.cc
Original file line number Diff line number Diff line change
@@ -1,66 +1,28 @@
#include "DQMServices/Core/interface/DQMOldReceiver.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/DQMNet.h"
#include <iostream>
#include "DQMServices/Core/src/DQMError.h"

// Connect with monitoring server (DQM Collector) at <hostname> and <port_no>
// using <client_name>; if flag=true, will accept downstream connections
DQMOldReceiver::DQMOldReceiver(const std::string &hostname, int port,
const std::string &clientName,
int unusedReconnectDelaySecs,
bool unusedActAsServer)
: store_ (DQMStore::instance()),
net_ (new DQMBasicNet (clientName)),
numUpdates_ (0)
{
net_->requestFullUpdates(true);
}
DQMOldReceiver::DQMOldReceiver(const std::string &, int, const std::string &, int, bool)
: store_ (DQMStore::instance())
{}

/* Use the default constructor for running in standalone mode (ie. without
sources or collectors); if flag=true, client will accept downstream connections
*/
DQMOldReceiver::DQMOldReceiver(void)
: store_ (DQMStore::instance()),
net_ (0),
numUpdates_ (0)
: store_ (DQMStore::instance())
{}

DQMOldReceiver::~DQMOldReceiver(void)
{
delete net_;
}
{}

// this is the "main" loop where we receive monitoring/send subscription requests;
// if client acts as server, method runQTests is also sending monitoring &
// test results to clients downstream;
// returns success flag
bool
DQMOldReceiver::update(void)
{
std::cout
<< " In DQMOldReceiver::update:\n"
<< " This method will be deprecated soon, please replace mui->update() by:\n"
<< " bool ret = mui->doMonitoring();\n"
<< " bei->runQTests();\n";

// retrieval of monitoring, sending of subscription requests/cancellations,
// calculation of "collate"-type Monitoring Elements;
bool ret = doMonitoring();

// Run quality tests (and determine updated contents);
// Method is overloaded if client acts as server to other clients downstream
store_->runQTests();

return ret;
raiseDQMError("DQMOldReceiver", "DQMOldReceiver::update() is obsolete");
return true;
}

// retrieval of monitoring, sending of subscription requests/cancellations,
// returns success flag
bool
DQMOldReceiver::doMonitoring(void)
{
store_->reset();
numUpdates_ += (net_ ? net_->receive(store_) : 0);
// FIXME: Invoke callbacks?
raiseDQMError("DQMOldReceiver", "DQMOldReceiver::doMonitoring() is obsolete");
return true;
}

0 comments on commit 0fba79e

Please sign in to comment.