59 std::map<edm::EventNumber_t, long long>
_offsets;
76 : _l1abccollectionToken(
79 _forceNoOffset(iConfig.getUntrackedParameter<
bool>(
"forceNoOffset",
false)),
80 _forceSCAL(iConfig.getParameter<
bool>(
"forceSCAL")),
85 edm::LogWarning(
"NoOffsetComputation") <<
"Orbit and BX offset will NOT be computed: Be careful!";
87 produces<EventWithHistory>();
105 if (
iEvent.run() < 110878) {
119 long long orbitoffset = 0;
124 if (
tcdsRecord->getL1aHistoryEntry(0).getIndex() == 0) {
125 orbitoffset = (
long long)
tcdsRecord->getOrbitNr() - (
long long)
iEvent.orbitNumber();
131 for (L1AcceptBunchCrossingCollection::const_iterator l1abc = pIn->begin(); l1abc != pIn->end(); ++l1abc) {
132 if (l1abc->l1AcceptOffset() == 0) {
133 orbitoffset = (
long long)l1abc->orbitNumber() - (
long long)
iEvent.orbitNumber();
134 bxoffset = l1abc->bunchCrossing() -
iEvent.bunchCrossing();
146 long long absbxoffset = orbitoffset * 3564 + bxoffset;
156 <<
"Absolute BX offset changed from " <<
_curroffset <<
" to " << absbxoffset <<
" at orbit " 157 <<
iEvent.orbitNumber() <<
" and BX " <<
iEvent.bunchCrossing();
161 for (L1AcceptBunchCrossingCollection::const_iterator l1abc = pIn->begin(); l1abc != pIn->end(); ++l1abc) {
179 edm::LogInfo(
"AbsoluteBXOffsetReset") <<
"Absolute BX offset map reset";
185 edm::LogInfo(
"AbsoluteBXOffsetSummary") <<
"Absolute BX offset summary:";
Log< level::Info, true > LogVerbatim
edm::EDGetTokenT< TCDSRecord > _tcdsRecordToken
~EventWithHistoryProducerFromL1ABC() override
T const * product() const
unsigned long long EventNumber_t
edm::EventNumber_t _curroffevent
const bool _forceNoOffset
EventWithHistoryProducerFromL1ABC(const edm::ParameterSet &)
Class to contain information from TCDS FED.
std::map< edm::EventNumber_t, long long > _offsets
void endRun(const edm::Run &, const edm::EventSetup &) override
void beginRun(const edm::Run &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
std::vector< L1AcceptBunchCrossing > L1AcceptBunchCrossingCollection
Log< level::Info, false > LogInfo
void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< L1AcceptBunchCrossingCollection > _l1abccollectionToken
Log< level::Warning, false > LogWarning