37 selections_(selections),
49 FDEBUG(6) <<
"StreamSerializer::serializeRegistry" << std::endl;
52 FDEBUG(9) <<
"Product List: " << std::endl;
73 int bres = data_buffer.
rootbuf_.WriteObjectAny((
char*)&sd, tc);
78 throw cms::Exception(
"StreamTranslation",
"Registry serialization failed")
79 <<
"StreamSerializer failed to serialize registry\n";
86 throw cms::Exception(
"StreamTranslation",
"Registry serialization truncated")
87 <<
"StreamSerializer module attempted to serialize\n"
88 <<
"a registry that is to big for the allocated buffers\n";
93 throw cms::Exception(
"StreamTranslation",
"Registry serialization failed")
94 <<
"StreamSerializer module got an unknown error code\n"
95 <<
" while attempting to serialize registry\n";
102 data_buffer.
ptr_ = (
unsigned char*)data_buffer.
rootbuf_.Buffer();
137 selectionIDs.push_back(selectorConfig);
165 int bres = data_buffer.
rootbuf_.WriteObjectAny(&se,
tc_);
169 throw cms::Exception(
"StreamTranslation",
"Event serialization failed")
170 <<
"StreamSerializer failed to serialize event: "
171 << eventPrincipal.
id();
178 throw cms::Exception(
"StreamTranslation",
"Event serialization truncated")
179 <<
"StreamSerializer module attempted to serialize an event\n"
180 <<
"that is to big for the allocated buffers: "
181 << eventPrincipal.
id();
186 throw cms::Exception(
"StreamTranslation",
"Event serialization failed")
187 <<
"StreamSerializer module got an unknown error code\n"
188 <<
" while attempting to serialize event: "
189 << eventPrincipal.
id();
196 data_buffer.
ptr_ = (
unsigned char*)data_buffer.
rootbuf_.Buffer();
198 if(data_buffer.
ptr_ != data_.ptr_) {
199 std::cerr <<
"ROOT reset the buffer!!!!\n";
200 data_.ptr_ = data_buffer.
ptr_;
210 if(use_compression) {
211 unsigned int dest_size =
232 unsigned int inputSize,
233 std::vector<unsigned char> &outputBuffer,
234 int compressionLevel) {
235 unsigned int resultSize = 0;
238 unsigned long dest_size = (
unsigned long)(
double(inputSize)*
240 if(outputBuffer.size() < dest_size) outputBuffer.resize(dest_size);
243 int ret = compress2(&outputBuffer[0], &dest_size, inputBuffer,
244 inputSize, compressionLevel);
249 resultSize = dest_size;
251 FDEBUG(1) <<
" original size = " << inputSize
252 <<
" final size = " << dest_size
253 <<
" ratio = " << double(dest_size)/double(inputSize)
257 FDEBUG(9) <<
"Compression Return value: " << ret
258 <<
" Okay = " << Z_OK << std::endl;
260 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)