29 serializer_(selections),
30 maxEventSize_(ps.getUntrackedParameter<
int>(
"max_event_size")),
31 useCompression_(ps.getUntrackedParameter<
bool>(
"use_compression")),
32 compressionLevel_(ps.getUntrackedParameter<
int>(
"compression_level")),
33 lumiSectionInterval_(ps.getUntrackedParameter<
int>(
"lumiSection_interval")),
34 serializeDataBuffer_(),
38 hltTriggerSelections_(),
44 struct timezone dummyTZ;
45 gettimeofday(&now, &dummyTZ);
46 timeInSecSinceUTC =
static_cast<double>(now.tv_sec) + (static_cast<double>(now.tv_usec) / 1000000.0);
81 unsigned int new_size = src_size + 50000;
102 l1_names.push_back(
"t1");
103 l1_names.push_back(
"t10");
104 l1_names.push_back(
"t2");
107 uLong crc = crc32(0
L, Z_NULL, 0);
108 Bytef
const* buf = (Bytef
const*)(moduleLabel.data());
109 crc = crc32(crc, buf, moduleLabel.length());
127 std::copy(src, src + src_size, init_message->dataAddress());
128 init_message->setDataLength(src_size);
134 std::vector<unsigned char>& hltbits)
const {
137 std::vector<unsigned char> vHltState;
139 if (triggerResults.
isValid()) {
141 vHltState.push_back(((triggerResults->at(
i)).state()));
151 if (!vHltState.empty()) {
152 unsigned int packInOneByte = 4;
153 unsigned int sizeOfPackage = 1 + ((vHltState.size() - 1) / packInOneByte);
155 hltbits.resize(sizeOfPackage);
156 std::fill(hltbits.begin(), hltbits.end(), 0);
159 unsigned int whichByte =
i / packInOneByte;
160 unsigned int indxWithinByte =
i % packInOneByte;
161 hltbits[whichByte] = hltbits[whichByte] | (vHltState[
i] << (indxWithinByte * 2));
179 std::vector<bool> l1bit = {
true,
true,
false};
182 std::vector<unsigned char> hltbits;
190 struct timezone dummyTZ;
191 gettimeofday(&now, &dummyTZ);
193 static_cast<double>(now.tv_sec) + (static_cast<double>(now.tv_usec) / 1000000.0) -
timeInSecSinceUTC;
204 unsigned int new_size = src_size + 50000;
233 msg->setEventLength(src_size);
242 ->setComment(
"Starting size in bytes of the serialized event buffer.");
244 ->setComment(
"If True, compression will be used to write streamer file.");
245 desc.
addUntracked<
int>(
"compression_level", 1)->setComment(
"ROOT compression level to use.");
248 "If 0, use lumi section number from event.\n" 249 "If not 0, the interval in seconds between fake lumi sections.");
EventNumber_t event() const
EventID const & id() const
std::vector< BranchIDList > BranchIDLists
value_type compactForm() const
Strings hltTriggerSelections_
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
EventSelector::Strings Strings
StreamerOutputModuleCommon(ParameterSet const &ps, SelectedProducts const *selections)
std::vector< std::pair< BranchDescription const *, EDGetToken > > SelectedProducts
unsigned int currentSpaceUsed() const
static void fillDescription(ParameterSetDescription &desc)
static std::vector< std::string > getEventSelectionVString(edm::ParameterSet const &pset)
unsigned char const * bufferPointer() const
int serializeRegistry(SerializeDataBuffer &data_buffer, const BranchIDLists &branchIDLists, ThinnedAssociationsHelper const &thinnedAssociationsHelper)
SerializeDataBuffer serializeDataBuffer_
std::unique_ptr< InitMsgBuilder > serializeRegistry(BranchIDLists const &branchLists, ThinnedAssociationsHelper const &helper, std::string const &processName, std::string const &moduleLabel, ParameterSetID const &toplevel)
std::string getReleaseVersion()
void setHltMask(EventForOutput const &e, Handle< TriggerResults > const &triggerResults, std::vector< unsigned char > &hltbits) const
static std::string const triggerResults("TriggerResults")
StreamSerializer serializer_
uint32_t adler32_chksum() const
~StreamerOutputModuleCommon()
int serializeEvent(EventForOutput const &event, ParameterSetID const &selectorConfig, bool use_compression, int compression_level, SerializeDataBuffer &data_buffer) const
std::vector< std::string > const & getAllTriggerNames()
LuminosityBlockNumber_t luminosityBlock() const
unsigned int currentEventSize() const
std::unique_ptr< EventMsgBuilder > serializeEvent(EventForOutput const &e, Handle< TriggerResults > const &triggerResults, ParameterSetID const &selectorCfg)