Skip to content

Commit

Permalink
Merge pull request #6058 from wddgit/streamerCleanup
Browse files Browse the repository at this point in the history
Delete obsolete code in IOPool/Streamer
  • Loading branch information
cmsbuild committed Oct 29, 2014
2 parents 8716079 + c0c713a commit 2673db7
Show file tree
Hide file tree
Showing 47 changed files with 18 additions and 3,967 deletions.
2 changes: 1 addition & 1 deletion IOPool/Streamer/bin/CalcAdler32.cpp
@@ -1,5 +1,5 @@
#include "FWCore/Utilities/interface/Adler32Calculator.h"
#include "IOPool/Streamer/interface/StreamerFileIO.h"
#include "IOPool/Streamer/interface/MsgTools.h"

#include "boost/shared_array.hpp"

Expand Down
1 change: 1 addition & 0 deletions IOPool/Streamer/bin/DiagStreamerFile.cpp
Expand Up @@ -33,6 +33,7 @@
#include "zlib.h"

#include <iostream>
#include <map>
#include <memory>

bool compares_bad(EventMsgView const* eview1, EventMsgView const* eview2);
Expand Down
13 changes: 1 addition & 12 deletions IOPool/Streamer/interface/BufferArea.h
@@ -1,12 +1 @@
#ifndef IOPool_Streamer_BufferArea_h
#define IOPool_Streamer_BufferArea_h

// -*- C++ -*-

#include "IOPool/Streamer/interface/EventBuffer.h"

namespace edm {
EventBuffer* getEventBuffer(int event_size_max, int queue_depth_max);
}

#endif
#error obsolete header
99 changes: 1 addition & 98 deletions IOPool/Streamer/interface/ConsRegMessage.h
@@ -1,98 +1 @@
#ifndef IOPool_Streamer_ConsumerRegMessage_h
#define IOPool_Streamer_ConsumerRegMessage_h

/**
* These classes are used to build and view
* the registration requests and replies that are exchanged between
* individual event consumers and the event server.
*
* 15-Aug-2006 - KAB - Initial Implementation
*/

#include "IOPool/Streamer/interface/MsgTools.h"
#include "IOPool/Streamer/interface/MsgHeader.h"
#include <map>

// --------------- registration request builder ----------------

class ConsRegRequestBuilder
{
public:
ConsRegRequestBuilder(void* buf, uint32 bufSize,
std::string const& consumerName,
std::string const& requestParameterSet);

uint32 bufferSize() const { return bufSize_; }
uint8* startAddress() { return buf_; }
uint32 size() const;

private:
uint8* buf_;
uint32 bufSize_;
};

// --------------- registration request viewer -----------------

class ConsRegRequestView
{
public:
ConsRegRequestView(void* buf);

uint32 code() const { return head_.code(); }
uint32 size() const { return head_.size(); }
uint8* startAddress() { return buf_; }

std::string getConsumerName() { return consumerName_; }
std::string getRequestParameterSet() { return requestParameterSet_; }

private:
uint8* buf_;
HeaderView head_;
std::string consumerName_;
std::string requestParameterSet_;
};

// -------------- registration response builder ----------------

class ConsRegResponseBuilder
{
public:
ConsRegResponseBuilder(void* buf, uint32 bufSize,
uint32 status, uint32 consumerId);

uint32 bufferSize() const { return bufSize_; }
uint8* startAddress() { return buf_; }
uint32 size() const;

void setStreamSelectionTable(std::map<std::string, Strings> const& selTable);

enum STATUS_CODES { ES_NOT_READY = 0x10000 };

private:
uint8* buf_;
uint32 bufSize_;
};

// -------------- registration response viewer -----------------

class ConsRegResponseView
{
public:
ConsRegResponseView(void* buf);

uint32 code() const { return head_.code(); }
uint32 size() const { return head_.size(); }
uint8* startAddress() { return buf_; }

uint32 getStatus() { return status_; }
uint32 getConsumerId() { return consumerId_; }
std::map<std::string, Strings> getStreamSelectionTable();

private:
uint8* buf_;
HeaderView head_;
uint32 status_;
uint32 consumerId_;
};

#endif
#error obsolete header
129 changes: 1 addition & 128 deletions IOPool/Streamer/interface/DQMEventMessage.h
@@ -1,128 +1 @@
#ifndef IOPool_Streamer_DQMEventMessage_h
#define IOPool_Streamer_DQMEventMessage_h

/**
* The DQMEventMsgView class is used to view the DQM data messages that
* are exchanged between the filter units and the storage manager.
*
* 09-Feb-2007 - Initial Implementation
*/

/**
* DQM Event Message Format:
* - Code (1 byte)
* - Size (4 bytes)
* - Protocol Version (4 bytes)
* - Header Size (4 bytes)
* - Run Number (4 bytes)
* - Event Number at Update (4 bytes)
* - Time stamp (8 bytes)
* - Luminosity Section (4 bytes)
* - Update Number (4 bytes)
* - Compression Flag (4 bytes) | size of data before compression
* - Filter Unit Process ID (4 bytes)
* - Filter Unit Unique ID [GUID] (4 bytes)
* - Merge Count (4 bytes)
* - Release Tag Length (4 bytes)
* - Release Tag (varies)
* - Top-level Folder Name Length (4 bytes)
* - Top-level Folder Name (varies)
* - Number of Subfolders (4 bytes)
* - Number of Monitor Elements in Subfolder I (4 bytes) | Repeated
* - Subfolder I Name Length (4 bytes) | for each
* - Subfolder I Name (varies) | subfolder
* - DQM Event Data checksum (4 bytes)
* - Host name length (1 byte)
* - Host name (variable)
* - DQM Event Data Length (4 bytes)
* - DQM Event Data (varies)
*/

#include "IOPool/Streamer/interface/MsgTools.h"
#include "IOPool/Streamer/interface/MsgHeader.h"
#include <memory>
#include "TObject.h"
#include <map>

#include "DataFormats/Provenance/interface/Timestamp.h"


// ------------------ dqm event message ----------------

namespace DQMEvent
{
typedef std::map< std::string, std::vector<TObject *> >
TObjectTable;
}

struct DQMEventHeader
{
Header header_;
char_uint32 protocolVersion_;
char_uint32 headerSize_;
char_uint32 runNumber_;
char_uint32 eventNumber_;
char_uint64 timeStamp_;
char_uint32 lumiSection_;
char_uint32 updateNumber_;
char_uint32 compressionFlag_;
char_uint32 fuProcessId_;
char_uint32 fuGuid_;
char_uint32 mergeCount_;
};

class DQMEventMsgView
{
public:
DQMEventMsgView(void* buf);

uint32 code() const { return head_.code(); }
uint32 size() const { return head_.size(); }

uint8* startAddress() const { return buf_; }
uint8* eventAddress() const { return eventAddr_; }
uint32 eventLength() const { return eventLen_; }
uint32 adler32_chksum() const {return adler32_chksum_;}
std::string hostName() const;
uint32 hostName_len() const {return host_name_len_;}

uint32 protocolVersion() const;
uint32 headerSize() const;
uint32 runNumber() const;
uint32 eventNumberAtUpdate() const;
uint32 lumiSection() const;
uint32 updateNumber() const;
uint32 compressionFlag() const;
uint32 fuProcessId() const;
uint32 fuGuid() const;
uint32 mergeCount() const;

edm::Timestamp timeStamp() const;

std::string releaseTag() const { return releaseTag_; }
std::string topFolderName() const { return folderName_; }

uint32 subFolderCount() const { return subFolderCount_; }
std::shared_ptr< std::vector<std::string> > subFolderNames() const;

std::string subFolderName(uint32 const subFolderIndex) const;
uint32 meCount(std::string const& subFolderName) const;
uint32 meCount(uint32 const subFolderIndex) const;

private:
uint8* buf_;
HeaderView head_;
std::string releaseTag_;
std::string folderName_;
uint8* eventAddr_;
uint32 eventLen_;
uint32 adler32_chksum_;
uint8* host_name_start_;
uint32 host_name_len_;
uint32 subFolderCount_;
std::map<std::string, uint32> subFolderIndexTable_;
std::shared_ptr< std::vector<std::string> > nameListPtr_;
std::vector<uint32> meCountList_;
};

#endif
#error obsolete header
78 changes: 1 addition & 77 deletions IOPool/Streamer/interface/DQMEventMsgBuilder.h
@@ -1,77 +1 @@
#ifndef IOPool_Streamer_DQMEventMsgBuilder_h
#define IOPool_Streamer_DQMEventMsgBuilder_h

/**
* This class is used to build and view the DQM Event data
* that is exchanged between the filter units and the storage manager.
*
* 09-Feb-2007 - Initial Implementation
*/

/**
* DQM Event Message Format:
* - Code (1 byte)
* - Size (4 bytes)
* - Protocol Version (4 bytes)
* - Header Size (4 bytes)
* - Run Number (4 bytes)
* - Event Number at Update (4 bytes)
* - Luminosity Section (4 bytes)
* - Update Number (4 bytes)
* - Compression Flag (4 bytes) | size of data before compression
* - Filter Unit Process ID (4 bytes)
* - Filter Unit Unique ID [GUID] (4 bytes)
* - Merge Count (4 bytes)
* - Release Tag Length (4 bytes)
* - Release Tag (varies)
* - Top-level Folder Name Length (4 bytes)
* - Top-level Folder Name (varies)
* - Number of Subfolders (4 bytes)
* - Number of Monitor Elements in Subfolder I (4 bytes) | Repeated
* - Subfolder I Name Length (4 bytes) | for each
* - Subfolder I Name (varies) | subfolder
* - DQM Event Data checksum (4 bytes)
* - Host name length (1 byte)
* - Host name (variable)
* - DQM Event Data Length (4 bytes)
* - DQM Event Data (varies)
*/

#include "IOPool/Streamer/interface/MsgTools.h"
#include "IOPool/Streamer/interface/DQMEventMessage.h"

#include "DataFormats/Provenance/interface/Timestamp.h"


// ------------------ dqm event message builder ----------------

class DQMEventMsgBuilder
{
public:
DQMEventMsgBuilder(void* buf, uint32 bufSize, uint32 run, uint32 event,
edm::Timestamp timeStamp,
uint32 lumiSection, uint32 updateNumber,
uint32 adler32_chksum,
const char* host_name,
std::string const& releaseTag,
std::string const& topFolderName,
const DQMEvent::TObjectTable& monitorElementsBySubFolder);

uint32 bufferSize() const { return bufSize_; }
uint8* startAddress() const { return buf_; }
uint32 headerSize() const { return eventAddr_-buf_; }
void setCompressionFlag(uint32);
void setFUProcessId(uint32);
void setFUGuid(uint32);
void setMergeCount(uint32);
uint8* eventAddress() const { return eventAddr_; }
void setEventLength(uint32 len);
uint32 size() const;

private:
uint8* buf_;
uint32 bufSize_;
uint8* eventAddr_;
};

#endif
#error obsolete header
3 changes: 0 additions & 3 deletions IOPool/Streamer/interface/DumpTools.h
Expand Up @@ -8,7 +8,6 @@
#include "IOPool/Streamer/interface/MsgTools.h"
#include "IOPool/Streamer/interface/InitMessage.h"
#include "IOPool/Streamer/interface/EventMessage.h"
#include "IOPool/Streamer/interface/DQMEventMessage.h"
#include "IOPool/Streamer/interface/FRDEventMessage.h"

void dumpInitHeader(const InitMsgView* view);
Expand All @@ -21,8 +20,6 @@ void dumpEventHeader(const EventMsgView* eview);
void dumpEventView(const EventMsgView* eview);
void dumpEventIndex(const EventMsgView* eview);
void dumpEvent(uint8* buf);
void dumpDQMEventHeader(const DQMEventMsgView* dview);
void dumpDQMEventView(const DQMEventMsgView* dview);
void dumpFRDEventView(const FRDEventMsgView* fview);

#endif
Expand Down

0 comments on commit 2673db7

Please sign in to comment.