36 selections_(selections),
48 FDEBUG(6) <<
"StreamSerializer::serializeRegistry" << std::endl;
51 FDEBUG(9) <<
"Product List: " << std::endl;
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();
136 selectionIDs.push_back(selectorConfig);
164 int bres = data_buffer.
rootbuf_.WriteObjectAny(&se,
tc_);
168 throw cms::Exception(
"StreamTranslation",
"Event serialization failed")
169 <<
"StreamSerializer failed to serialize event: "
170 << eventPrincipal.
id();
177 throw cms::Exception(
"StreamTranslation",
"Event serialization truncated")
178 <<
"StreamSerializer module attempted to serialize an event\n"
179 <<
"that is to big for the allocated buffers: "
180 << eventPrincipal.
id();
185 throw cms::Exception(
"StreamTranslation",
"Event serialization failed")
186 <<
"StreamSerializer module got an unknown error code\n"
187 <<
" while attempting to serialize event: "
188 << eventPrincipal.
id();
195 data_buffer.
ptr_ = (
unsigned char*)data_buffer.
rootbuf_.Buffer();
197 if(data_buffer.
ptr_ != data_.ptr_) {
198 std::cerr <<
"ROOT reset the buffer!!!!\n";
199 data_.ptr_ = data_buffer.
ptr_;
209 if(use_compression) {
210 unsigned int dest_size =
231 unsigned int inputSize,
232 std::vector<unsigned char> &outputBuffer,
233 int compressionLevel) {
234 unsigned int resultSize = 0;
237 unsigned long dest_size = (
unsigned long)(
double(inputSize)*
239 if(outputBuffer.size() < dest_size) outputBuffer.resize(dest_size);
242 int ret = compress2(&outputBuffer[0], &dest_size, inputBuffer,
243 inputSize, compressionLevel);
248 resultSize = dest_size;
250 FDEBUG(1) <<
" original size = " << inputSize
251 <<
" final size = " << dest_size
252 <<
" ratio = " << double(dest_size)/double(inputSize)
256 FDEBUG(9) <<
"Compression Return value: " << ret
257 <<
" Okay = " << Z_OK << std::endl;
259 std::cerr <<
"Compression Return value: " << ret <<
" Okay = " << Z_OK << std::endl;
WrapperBase const * wrapper() const
EventSelectionIDVector const & eventSelectionIDs() const
std::vector< BranchIDList > BranchIDLists
EventID const & id() const
ProductProvenance const * productProvenance() const
int serializeEvent(EventPrincipal const &eventPrincipal, ParameterSetID const &selectorConfig, bool use_compression, int compression_level, SerializeDataBuffer &data_buffer, ModuleCallingContext const *mcc)
BranchListIndexes const & branchListIndexes() const
TClass * getTClass(const std::type_info &ti)
static unsigned int compressBuffer(unsigned char *inputBuffer, unsigned int inputSize, std::vector< unsigned char > &outputBuffer, int compressionLevel)
ProcessHistory const & processHistory() const
std::vector< EventSelectionID > EventSelectionIDVector
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
BranchID const & branchID() 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)
OutputHandle getForOutput(BranchID const &bid, bool getProd, ModuleCallingContext const *mcc) const
SelectedProducts const * selections_
ParentageID const & parentageID() const
std::vector< BranchDescription const * > SelectedProducts
static ParentageRegistry * instance()
EventAuxiliary const & aux() const
void fillMap(regmap_type &fillme) const
static Registry * instance()
StreamSerializer(SelectedProducts const *selections)