46 FDEBUG(6) <<
"StreamSerializer::serializeRegistry" << std::endl;
49 FDEBUG(9) <<
"Product List: " << std::endl;
53 FDEBUG(9) <<
"StreamOutput got product = " <<
selection.first->className() << std::endl;
68 int bres = data_buffer.
rootbuf_.WriteObjectAny((
char*)&sd, tc);
73 throw cms::Exception(
"StreamTranslation",
"Registry serialization failed")
74 <<
"StreamSerializer failed to serialize registry\n";
81 throw cms::Exception(
"StreamTranslation",
"Registry serialization truncated")
82 <<
"StreamSerializer module attempted to serialize\n" 83 <<
"a registry that is to big for the allocated buffers\n";
88 throw cms::Exception(
"StreamTranslation",
"Registry serialization failed")
89 <<
"StreamSerializer module got an unknown error code\n" 90 <<
" while attempting to serialize registry\n";
97 data_buffer.
ptr_ = (
unsigned char*)data_buffer.
rootbuf_.Buffer();
126 bool use_compression,
127 int compression_level,
130 selectionIDs.push_back(selectorConfig);
159 se.products().push_back(
171 int bres = data_buffer.
rootbuf_.WriteObjectAny(&se,
tc_);
175 throw cms::Exception(
"StreamTranslation",
"Event serialization failed")
176 <<
"StreamSerializer failed to serialize event: " <<
event.id();
183 throw cms::Exception(
"StreamTranslation",
"Event serialization truncated")
184 <<
"StreamSerializer module attempted to serialize an event\n" 185 <<
"that is to big for the allocated buffers: " <<
event.id();
190 throw cms::Exception(
"StreamTranslation",
"Event serialization failed")
191 <<
"StreamSerializer module got an unknown error code\n" 192 <<
" while attempting to serialize event: " <<
event.id();
199 data_buffer.
ptr_ = (
unsigned char*)data_buffer.
rootbuf_.Buffer();
201 if(data_buffer.
ptr_ != data_.ptr_) {
202 std::cerr <<
"ROOT reset the buffer!!!!\n";
203 data_.ptr_ = data_buffer.
ptr_;
213 if (use_compression) {
214 unsigned int dest_size =
216 if (dest_size != 0) {
234 unsigned int inputSize,
235 std::vector<unsigned char>& outputBuffer,
237 unsigned int resultSize = 0;
240 unsigned long dest_size = (
unsigned long)(
double(inputSize) * 1.002 + 1.0) + 12;
241 if (outputBuffer.size() < dest_size)
242 outputBuffer.resize(dest_size);
245 int ret = compress2(&outputBuffer[0], &dest_size, inputBuffer, inputSize, compressionLevel);
250 resultSize = dest_size;
252 FDEBUG(1) <<
" original size = " << inputSize <<
" final size = " << dest_size
253 <<
" ratio = " << double(dest_size) / double(inputSize) << std::endl;
256 FDEBUG(9) <<
"Compression Return value: " << ret <<
" Okay = " << Z_OK << std::endl;
258 std::cerr <<
"Compression Return value: " << ret <<
" Okay = " << Z_OK << std::endl;
WrapperBase const * wrapper() const (true)
std::vector< BranchIDList > BranchIDLists
EventAuxiliary const & eventAuxiliary() const
bool isValid() const (true)
edm::propagate_const< TClass * > tc_
Provenance const * provenance() const (true)
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_
unsigned int curr_event_size_
bool getMapped(key_type const &k, value_type &result) const
TypeID unwrappedTypeID() 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) const
static ParentageRegistry * instance()
void fillMap(regmap_type &fillme) const
static Registry * instance()
StreamSerializer(SelectedProducts const *selections)