CMS 3D CMS Logo

DQMNet.cc File Reference

#include "DQMServices/Core/interface/DQMNet.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/MonitorElement.h"
#include "FWCore/Utilities/interface/EDMException.h"
#include "classlib/sysapi/InetSocket.h"
#include "classlib/iobase/Filename.h"
#include "classlib/utils/TimeInfo.h"
#include "classlib/utils/StringList.h"
#include "classlib/utils/StringFormat.h"
#include "classlib/utils/StringOps.h"
#include "classlib/utils/SystemError.h"
#include "classlib/utils/Regexp.h"
#include "DQMRootBuffer.h"
#include "TObjString.h"
#include "TObject.h"
#include "TProfile2D.h"
#include "TProfile.h"
#include "TH3F.h"
#include "TH2F.h"
#include "TH2S.h"
#include "TH1F.h"
#include "TH1S.h"
#include <unistd.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdint.h>
#include <iostream>
#include <cassert>

Go to the source code of this file.

Defines

#define MESSAGE_SIZE_LIMIT   (2*1024*1024)
#define SOCKET_BUF_SIZE   (8*1024*1024)
#define SOCKET_READ_GROWTH   (SOCKET_BUF_SIZE)
#define SOCKET_READ_SIZE   (SOCKET_BUF_SIZE/8)

Functions

static bool abortReconstructObject (DQMNet::Object &o)
static voidcommunicate (void *obj)
 A thread to communicate with the distributed memory cache peers.
static TObject * extractNextObject (DQMRootBuffer &buf)
static bool parseInt (const char *&p, const char *name, size_t len, int &value)
static const Regexp s_rxmeval ("<(.*)>(i|f|s|qr)=(.*)</\\1>")

Variables

static const Regexp s_rxmeqr ("^st\\.(\\d+)\\.(.*)$")


Define Documentation

#define MESSAGE_SIZE_LIMIT   (2*1024*1024)

Definition at line 31 of file DQMNet.cc.

Referenced by VisNet::onPeerData(), DQMNet::onPeerData(), and IgNet::onPeerData().

#define SOCKET_BUF_SIZE   (8*1024*1024)

Definition at line 32 of file DQMNet.cc.

Referenced by VisNet::run(), IgNet::run(), DQMNet::run(), DQMNet::startLocalServer(), VisNet::startLocalServer(), and IgNet::startLocalServer().

#define SOCKET_READ_GROWTH   (SOCKET_BUF_SIZE)

Definition at line 34 of file DQMNet.cc.

Referenced by VisNet::onPeerData(), DQMNet::onPeerData(), and IgNet::onPeerData().

#define SOCKET_READ_SIZE   (SOCKET_BUF_SIZE/8)

Definition at line 33 of file DQMNet.cc.

Referenced by VisNet::onPeerData(), DQMNet::onPeerData(), and IgNet::onPeerData().


Function Documentation

static bool abortReconstructObject ( DQMNet::Object o  )  [static]

Definition at line 207 of file DQMNet.cc.

References DQMNet::CoreObject::object, and DQMNet::CoreObject::qreports.

Referenced by DQMNet::reconstructObject().

00208 {
00209   o.qreports.clear();
00210   delete o.object;
00211   o.object = 0;
00212   return false;
00213 }

static void* communicate ( void obj  )  [static]

A thread to communicate with the distributed memory cache peers.

All this does is run the loop to respond to new connections. Much of the actual work is done when a new connection is received, and in pumping data around in response to actual requests.

Definition at line 1210 of file DQMNet.cc.

References sigfillset.

Referenced by IgNet::start(), DQMNet::start(), and VisNet::start().

01211 {
01212   sigset_t sigs;
01213   sigfillset (&sigs);
01214   pthread_sigmask (SIG_BLOCK, &sigs, 0);
01215   ((DQMNet *)obj)->run();
01216   return 0;
01217 }

static TObject* extractNextObject ( DQMRootBuffer buf  )  [static]

Definition at line 192 of file DQMNet.cc.

References c.

Referenced by DQMNet::extractScalarData(), and DQMNet::reconstructObject().

00193 {
00194   if (buf.Length() == buf.BufferSize())
00195     return 0;
00196 
00197   buf.InitMap();
00198   Int_t pos = buf.Length();
00199   TClass *c = buf.ReadClass();
00200   buf.SetBufferOffset(pos);
00201   buf.ResetMap();
00202   return c ? buf.ReadObject(c) : 0;
00203 }

static bool parseInt ( const char *&  p,
const char *  name,
size_t  len,
int value 
) [static]

Definition at line 47 of file DQMNet.cc.

Referenced by MuonAlignmentInputXML::getCSCnode(), MuonAlignmentInputXML::getDTnode(), and DQMNet::reconstructObject().

00048 {
00049   if (! strncmp(p, name, len))
00050   {
00051     value = strtol(p+len, (char **) &p, 10);
00052     return true;
00053   }
00054   return false;
00055 }

static const Regexp s_rxmeval (  )  [static]

Referenced by DQMStore::extract(), stor::DQMInstance::getSafeMEName(), DQMNet::reconstructObject(), and DQMNet::reinstateObject().


Variable Documentation

const Regexp s_rxmeqr("^st\\.(\\d+)\\.(.*)$") [static]

Referenced by DQMStore::extract(), and DQMNet::reconstructObject().


Generated on Tue Jun 9 17:52:46 2009 for CMSSW by  doxygen 1.5.4