36 selections_(selections),
48 FDEBUG(6) <<
"StreamSerializer::serializeRegistry" << std::endl;
51 FDEBUG(9) <<
"Product List: " << std::endl;
56 FDEBUG(9) <<
"StreamOutput got product = " <<
selection.first->className()
72 int bres = data_buffer.
rootbuf_.WriteObjectAny((
char*)&sd, tc);
77 throw cms::Exception(
"StreamTranslation",
"Registry serialization failed")
78 <<
"StreamSerializer failed to serialize registry\n";
85 throw cms::Exception(
"StreamTranslation",
"Registry serialization truncated")
86 <<
"StreamSerializer module attempted to serialize\n" 87 <<
"a registry that is to big for the allocated buffers\n";
92 throw cms::Exception(
"StreamTranslation",
"Registry serialization failed")
93 <<
"StreamSerializer module got an unknown error code\n" 94 <<
" while attempting to serialize registry\n";
101 data_buffer.
ptr_ = (
unsigned char*)data_buffer.
rootbuf_.Buffer();
130 bool use_compression,
int compression_level,
134 selectionIDs.push_back(selectorConfig);
180 int bres = data_buffer.
rootbuf_.WriteObjectAny(&se,
tc_);
184 throw cms::Exception(
"StreamTranslation",
"Event serialization failed")
185 <<
"StreamSerializer failed to serialize event: " 193 throw cms::Exception(
"StreamTranslation",
"Event serialization truncated")
194 <<
"StreamSerializer module attempted to serialize an event\n" 195 <<
"that is to big for the allocated buffers: " 201 throw cms::Exception(
"StreamTranslation",
"Event serialization failed")
202 <<
"StreamSerializer module got an unknown error code\n" 203 <<
" while attempting to serialize event: " 211 data_buffer.
ptr_ = (
unsigned char*)data_buffer.
rootbuf_.Buffer();
213 if(data_buffer.
ptr_ != data_.ptr_) {
214 std::cerr <<
"ROOT reset the buffer!!!!\n";
215 data_.ptr_ = data_buffer.
ptr_;
225 if(use_compression) {
226 unsigned int dest_size =
247 unsigned int inputSize,
248 std::vector<unsigned char> &outputBuffer,
249 int compressionLevel) {
250 unsigned int resultSize = 0;
253 unsigned long dest_size = (
unsigned long)(
double(inputSize)*
255 if(outputBuffer.size() < dest_size) outputBuffer.resize(dest_size);
258 int ret = compress2(&outputBuffer[0], &dest_size, inputBuffer,
259 inputSize, compressionLevel);
264 resultSize = dest_size;
266 FDEBUG(1) <<
" original size = " << inputSize
267 <<
" final size = " << dest_size
268 <<
" ratio = " << double(dest_size)/double(inputSize)
272 FDEBUG(9) <<
"Compression Return value: " << ret
273 <<
" Okay = " << Z_OK << std::endl;
275 std::cerr <<
"Compression Return value: " << ret <<
" Okay = " << Z_OK << std::endl;
std::vector< BranchIDList > BranchIDLists
EventAuxiliary const & eventAuxiliary() const
edm::propagate_const< TClass * > tc_
ProductProvenance const * productProvenance() const
edm::propagate_const< unsigned char * > ptr_
static unsigned int compressBuffer(unsigned char *inputBuffer, unsigned int inputSize, std::vector< unsigned char > &outputBuffer, int compressionLevel)
std::vector< EventSelectionID > EventSelectionIDVector
std::vector< std::pair< BranchDescription const *, EDGetToken > > SelectedProducts
std::vector< BranchID > const & parents() const
std::vector< unsigned char > comp_buf_
Provenance const * provenance() const
unsigned int curr_event_size_
bool getMapped(key_type const &k, value_type &result) const
TypeID unwrappedTypeID() const
WrapperBase const * wrapper() const
unsigned char const * bufferPointer() const
int serializeRegistry(SerializeDataBuffer &data_buffer, const BranchIDLists &branchIDLists, ThinnedAssociationsHelper const &thinnedAssociationsHelper)
unsigned int curr_space_used_
void Adler32(char const *data, size_t len, uint32_t &a, uint32_t &b)
SelectedProducts const * selections_
TClass * getTClass(const std::type_info &ti)
ParentageID const & parentageID() const
int serializeEvent(EventForOutput const &event, ParameterSetID const &selectorConfig, bool use_compression, int compression_level, SerializeDataBuffer &data_buffer)
static ParentageRegistry * instance()
void fillMap(regmap_type &fillme) const
static Registry * instance()
StreamSerializer(SelectedProducts const *selections)