18 gettimeofday(&stv,
nullptr);
27 unpackOrbit(
rawData.get(), (
char*)event_->payload(), event_->eventSize());
29 uint32_t hdrEventID = event_->event();
34 aux.setProcessHistoryID(daqSource_->processHistoryID());
35 daqSource_->makeEventWrapper(eventPrincipal,
aux);
39 daqProvenanceHelpers_[0]->branchDescription(),
std::move(edp), daqProvenanceHelpers_[0]->dummyProvenance());
54 pos += 12 + (mAcount + mBcount) * 8;
59 uint32_t orbit = bl->
orbit;
63 bool excludeIntermediate =
true;
65 for (
size_t i = 0;
i < (mAcount + mBcount);
i++) {
76 if (excludeIntermediate &&
index == 0 && ietaext == 0)
103 *dummyLVec_, ipt,
ieta,
iphi, qual, chrg, chrg != 0, iso, -1, 0,
false, 0, 0, 0, 0, ietaext, iphiext);
107 std::cout <<
"end read ... " << o_test << std::endl << std::flush;
112 daqProvenanceHelpers_.clear();
113 daqProvenanceHelpers_.emplace_back(std::make_shared<const edm::DaqProvenanceHelper>(
115 return daqProvenanceHelpers_;
121 event_ = std::make_unique<FRDEventMsgView>(dataBlockAddr_);
122 if (event_->size() > dataBlockMax_) {
124 <<
" event id:" << event_->event() <<
" lumi:" << event_->lumi() <<
" run:" << event_->run()
125 <<
" of size:" << event_->size() <<
" bytes does not fit into a chunk of size:" << dataBlockMax_ <<
" bytes";
140 std::vector<std::string> additionalFiles;
143 auto fullname =
fullpath.filename();
146 std::regex regexz(
"_");
147 std::vector<std::string> nameTokens = {std::sregex_token_iterator(stem.begin(), stem.end(), regexz, -1),
148 std::sregex_token_iterator()};
150 if (nameTokens.size() < 3) {
152 << primaryName <<
" name doesn't start with run#_ls#_index#_*.ext syntax";
156 if (nameTokens.size() > 3 && nameTokens[3].rfind(
"secondary", 0) == 0)
157 return std::make_pair(
false, additionalFiles);
161 additionalFiles.push_back(
fullpath.parent_path().string() +
"/" + nameTokens[0] +
"_" + nameTokens[1] +
"_" +
162 nameTokens[2] +
"_secondary" +
ext);
165 return std::make_pair(
true, additionalFiles);
171 gettimeofday(&stv,
nullptr);
180 unpackMuonOrbit(
rawData.get(), (
char*)events_[0]->
payload(), events_[0]->eventSize());
186 rawDataSec->setBXRange(0, 4000);
188 unpackMuonOrbit(rawDataSec.get(), (
char*)events_[1]->
payload(), events_[1]->eventSize());
190 uint32_t hdrEventID = events_[0]->event();
195 aux.setProcessHistoryID(daqSource_->processHistoryID());
196 daqSource_->makeEventWrapper(eventPrincipal,
aux);
200 daqProvenanceHelpers_[0]->branchDescription(),
std::move(edp), daqProvenanceHelpers_[0]->dummyProvenance());
206 eventCached_ =
false;
221 pos += 12 + (mAcount + mBcount) * 8;
224 uint32_t
bx = bl->
bx;
230 bool excludeIntermediate =
true;
232 for (
size_t i = 0;
i < (mAcount + mBcount);
i++) {
243 if (excludeIntermediate &&
index == 0 && ietaext == 0)
270 *dummyLVec_, ipt,
ieta,
iphi, qual, chrg, chrg != 0, iso, -1, 0,
false, 0, 0, 0, 0, ietaext, iphiext);
278 daqProvenanceHelpers_.clear();
279 daqProvenanceHelpers_.emplace_back(std::make_shared<const edm::DaqProvenanceHelper>(
282 daqProvenanceHelpers_.emplace_back(std::make_shared<const edm::DaqProvenanceHelper>(
284 return daqProvenanceHelpers_;
288 blockCompleted_ =
false;
291 for (
unsigned int i = 0;
i < events_.size();
i++) {
293 dataBlockAddrs_[
i] += events_[
i]->size();
300 for (
int i = 0;
i < numFiles_;
i++) {
301 if (dataBlockAddrs_[
i] >= dataBlockMaxAddrs_[
i]) {
302 blockCompleted_ =
true;
305 events_.emplace_back(std::make_unique<FRDEventMsgView>(dataBlockAddrs_[
i]));
static constexpr uint32_t chrg
void readEvent(edm::EventPrincipal &eventPrincipal) override
static constexpr uint32_t index
bool nextEventView() override
static constexpr uint32_t etaexts
void unpackOrbit(BXVector< l1t::Muon > *muons, char *buf, size_t len)
bool checksumValid() override
static constexpr uint32_t etav
void readEvent(edm::EventPrincipal &eventPrincipal) override
static constexpr uint32_t iso
std::vector< std::shared_ptr< const edm::DaqProvenanceHelper > > & makeDaqProvenanceHelpers() override
static constexpr uint32_t qual
static constexpr uint32_t iso
void put(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp, ProductProvenance const &productProvenance) const
static constexpr uint32_t chrgv
void unpackMuonOrbit(BXVector< l1t::Muon > *muons, char *buf, size_t len)
static constexpr uint32_t index
static constexpr uint32_t phi
static constexpr uint32_t pt
std::pair< bool, std::vector< std::string > > defineAdditionalFiles(std::string const &primaryName, bool fileListMode) const override
static constexpr uint32_t chrgv
static constexpr uint32_t etaextv
static constexpr uint32_t phiext
unsigned long long TimeValue_t
static constexpr uint32_t eta
static constexpr uint32_t pt
static constexpr uint32_t chrg
static constexpr uint32_t etaext
std::string getChecksumError() const override
static constexpr uint32_t phiext
std::vector< std::shared_ptr< const edm::DaqProvenanceHelper > > & makeDaqProvenanceHelpers() override
static constexpr uint32_t etas
bool nextEventView() override
static constexpr uint32_t phi
bool checksumValid() override
std::string getChecksumError() const override
static constexpr uint32_t qual