14 :
TinyEvent(event, orbit, bx), _prevse() {}
17 :
TinyEvent(event, orbit, bx), _prevse() {}
23 for (std::vector<edm::EventAuxiliary>::const_reverse_iterator eaux = veaux.rbegin(); eaux != veaux.rend(); eaux++) {
24 if (eaux != veaux.rbegin()) {
32 const long long orbitoffset,
35 std::map<int, TinyEvent> tmpmap;
37 for (L1AcceptBunchCrossingCollection::const_iterator l1abc = l1abcc.begin(); l1abc != l1abcc.end(); ++l1abc) {
40 if (orbitoffset < (
long long)l1abc->orbitNumber()) {
41 unsigned int neworbit = l1abc->orbitNumber() - orbitoffset;
42 int newbx = l1abc->bunchCrossing() - bxoffset;
48 while (newbx > 3563) {
57 if (l1abc->eventType() != 0) {
59 tmpmap[l1abc->l1AcceptOffset()] = tmpse;
61 edm::LogWarning(
"L1AcceptBunchCrossingNoType") <<
"L1AcceptBunchCrossing with no type found: ";
62 for (L1AcceptBunchCrossingCollection::const_iterator debu = l1abcc.begin(); debu != l1abcc.end(); ++debu) {
68 <<
" Too large orbit offset " << orbitoffset <<
" " << l1abc->orbitNumber();
71 edm::LogInfo(
"L1AcceptBunchCrossingNegativeEvent") <<
"L1AcceptBunchCrossing with negative event: ";
72 for (L1AcceptBunchCrossingCollection::const_iterator debu = l1abcc.begin(); debu != l1abcc.end(); ++debu) {
78 if (tmpmap.find(0) != tmpmap.end()) {
85 while (tmpmap.find(counter) != tmpmap.end()) {
86 if (tmpmap[counter + 1].
deltaBX(tmpmap[counter]) > 0) {
87 _prevse.push_back(tmpmap[counter]);
91 <<
"L1AcceptBunchCrossing not in order: orbit " <<
event.orbitNumber() <<
" BX " <<
event.bunchCrossing()
92 <<
" orbit offset " << orbitoffset <<
" bx offset " << bxoffset <<
" :";
93 for (L1AcceptBunchCrossingCollection::const_iterator debu = l1abcc.begin(); debu != l1abcc.end(); ++debu) {
101 edm::LogWarning(
"L1AcceptBunchCrossingNoCollection") <<
" L1AcceptBunchCrossing with offset=0 not found "
102 <<
" likely L1ABCCollection is empty ";
108 const long long orbitoffset,
111 std::map<int, TinyEvent> tmpmap;
116 l1aHistory.push_back(infoForIndex0);
118 for (
auto l1a : l1aHistory) {
119 int l1AcceptOffset(l1a.getIndex());
123 if (orbitoffset < (
long long)l1a.getOrbitNr()) {
124 unsigned int neworbit = l1a.
getOrbitNr() - orbitoffset;
125 int newbx = l1a.getBXID() - bxoffset;
132 while (newbx > 3563) {
142 TinyEvent tmpse(evnumb, neworbit, newbx);
143 tmpmap[l1AcceptOffset] = tmpse;
145 edm::LogWarning(
"L1AcceptBunchCrossingNoType") <<
"L1AcceptBunchCrossing with no type found: ";
150 <<
" Too large orbit offset " << orbitoffset <<
" " << tcdsRecord.
getOrbitNr();
153 edm::LogInfo(
"L1AcceptBunchCrossingNegativeEvent") <<
"L1AcceptBunchCrossing with negative event: ";
159 if (tmpmap.find(0) != tmpmap.end()) {
166 while (tmpmap.find(counter) != tmpmap.end()) {
167 if (tmpmap[counter + 1].
deltaBX(tmpmap[counter]) > 0) {
168 _prevse.push_back(tmpmap[counter]);
172 <<
"L1AcceptBunchCrossing not in order: orbit " <<
event.orbitNumber() <<
" BX " <<
event.bunchCrossing()
173 <<
" orbit offset " << orbitoffset <<
" bx offset " << bxoffset <<
" :";
174 edm::LogPrint(
"L1AcceptBunchCrossingNotInOrder") << &tcdsRecord;
180 edm::LogWarning(
"L1AcceptBunchCrossingNoCollection") <<
" L1AcceptBunchCrossing with offset=0 not found "
181 <<
" likely TCDSRecord is empty ";
217 for (std::vector<TinyEvent>::const_iterator
ev = he._prevse.begin();
ev != he._prevse.end();
ev++) {
218 if (!
add(*
ev, idepth))
225 bool isfuture = (idepth < 0);
226 const unsigned int adepth =
abs(idepth);
277 if (ev2 < ev1 && ev1 <=
_prevse.size()) {
315 if (ev2 == ev1 && ev1 <=
_prevse.size()) {
321 if (ev2 < ev1 && ev1 <=
_prevse.size()) {
unsigned int depth() const
long long absoluteBXinCycle(const int bx0) const
Log< level::Info, true > LogVerbatim
EventNumber_t event() const
long long deltaBX() const
const unsigned int orbit() const
const TinyEvent * get(const unsigned int ev) const
uint64_t getOrbitNr() const
unsigned long long EventNumber_t
long long absoluteBXinCycle(const unsigned int ev1, const int bx0) const
Log< level::Error, false > LogError
Class to contain L1 accept history information from TCDS FED.
bool equal(const T &first, const T &second)
Class to contain information from TCDS FED.
std::vector< TinyEvent > _prevse
Abs< T >::type abs(const T &t)
std::vector< L1AcceptBunchCrossing > L1AcceptBunchCrossingCollection
Log< level::Warning, true > LogPrint
int add(const EventWithHistory &he, const int idepth)
TinyEvent & operator=(const TinyEvent &se)
Log< level::Info, false > LogInfo
long long absoluteBX() const
long long deltaBX(const TinyEvent &se) const
const edm::EventNumber_t event() const
int isNextOf(const TinyEvent &se) const
long long deltaBXinCycle(const unsigned int ev2, const unsigned int ev1, const int bx0) const
bool isFutureHistory() const
const L1aHistory & getFullL1aHistory() const
long long absoluteBX() const
static std::atomic< unsigned int > counter
edm::EventNumber_t _event
EventWithHistory & operator=(const EventWithHistory &he)
uint16_t getEventType() const
Log< level::Warning, false > LogWarning
int operator==(const TinyEvent &other) const
uint64_t getOrbitNr() const
int operator==(const EventWithHistory &other) const
tuple size
Write out results.
long long deltaBXinCycle(const TinyEvent &se, const int bx0) const