56 std::map<edm::EventNumber_t, long long>
_offsets;
80 edm::LogWarning(
"NoOffsetComputation") <<
"Orbit and BX offset will NOT be computed: Be careful!";
82 produces<EventWithHistory>();
100 if (iEvent.
run() < 110878) {
110 long long orbitoffset = 0;
113 for (L1AcceptBunchCrossingCollection::const_iterator l1abc = pIn->begin(); l1abc != pIn->end(); ++l1abc) {
114 if (l1abc->l1AcceptOffset() == 0) {
115 orbitoffset = (
long long)l1abc->orbitNumber() - (
long long)iEvent.
orbitNumber();
121 std::unique_ptr<EventWithHistory> pOut(
new EventWithHistory(iEvent, *pIn, orbitoffset, bxoffset));
126 long long absbxoffset = orbitoffset * 3564 + bxoffset;
136 <<
"Absolute BX offset changed from " <<
_curroffset <<
" to " << absbxoffset <<
" at orbit " 138 for (L1AcceptBunchCrossingCollection::const_iterator l1abc = pIn->begin(); l1abc != pIn->end(); ++l1abc) {
155 edm::LogInfo(
"AbsoluteBXOffsetReset") <<
"Absolute BX offset map reset";
161 edm::LogInfo(
"AbsoluteBXOffsetSummary") <<
"Absolute BX offset summary:";
EventNumber_t event() const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
~EventWithHistoryProducerFromL1ABC() override
int bunchCrossing() const
unsigned long long EventNumber_t
edm::EventNumber_t _curroffevent
const bool _forceNoOffset
EventWithHistoryProducerFromL1ABC(const edm::ParameterSet &)
std::map< edm::EventNumber_t, long long > _offsets
#define DEFINE_FWK_MODULE(type)
void endRun(const edm::Run &, const edm::EventSetup &) override
void beginRun(const edm::Run &, const edm::EventSetup &) override
std::vector< L1AcceptBunchCrossing > L1AcceptBunchCrossingCollection
void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< L1AcceptBunchCrossingCollection > _l1abccollectionToken