ATLAS Offline Software
EventType_p1.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef EVENTTPCNV_EVENTTYPE_P1_H
6 #define EVENTTPCNV_EVENTTYPE_P1_H
7 /*
8  * @file EventType_p1.h
9  *
10  * @brief This class provides persistent representation for EventType class
11  * @author Marcin.Nowak@cern.ch
12  */
13 
14 #include <vector>
15 #include <string>
16 
17 class EventType_p1 {
18 public:
19 
20  typedef unsigned int number_type;
21  typedef std::vector<bool> BitMask;
22  typedef BitMask::const_iterator BitMaskIterator;
23 
24  EventType_p1();
25  bool operator< (const EventType_p1& rhs) const;
26 
28  std::string m_user_type;
30 };
31 
33 inline
35  : m_mc_event_weight(0)
36 {}
37 
38 inline
39 bool EventType_p1::operator<(const EventType_p1& rhs) const
40 {
41  if (this->m_bit_mask.size() != rhs.m_bit_mask.size()) {
42  return(this->m_bit_mask.size() < rhs.m_bit_mask.size());
43  }
44  for (BitMaskIterator i = this->m_bit_mask.begin(), j = rhs.m_bit_mask.begin();
45  i != this->m_bit_mask.end(); ++i, ++j) {
46  if (*i != *j) {
47  return(*i < *j);
48  }
49  }
50  return(this->m_user_type < rhs.m_user_type);
51 }
52 #endif
EventType_p1::number_type
unsigned int number_type
Definition: EventType_p1.h:20
EventType_p1::operator<
bool operator<(const EventType_p1 &rhs) const
Definition: EventType_p1.h:39
EventType_p1::m_mc_event_weight
number_type m_mc_event_weight
Definition: EventType_p1.h:29
EventType_p1::BitMask
std::vector< bool > BitMask
Definition: EventType_p1.h:21
EventType_p1::EventType_p1
EventType_p1()
inlines
Definition: EventType_p1.h:34
EventType_p1::m_user_type
std::string m_user_type
Definition: EventType_p1.h:28
lumiFormat.i
int i
Definition: lumiFormat.py:92
EventType_p1::BitMaskIterator
BitMask::const_iterator BitMaskIterator
Definition: EventType_p1.h:22
EventType_p1::m_bit_mask
BitMask m_bit_mask
Definition: EventType_p1.h:27
EventType_p1
Definition: EventType_p1.h:17