ATLAS Offline Software
Classes | Public Member Functions | Private Attributes | List of all members
VP1EventFile Class Reference

#include <VP1EventFile.h>

Collaboration diagram for VP1EventFile:

Classes

class  Imp
 

Public Member Functions

int runNumber () const
 
unsigned long long eventNumber () const
 
unsigned rawTime () const
 
QDateTime time () const
 
const QString & fileName () const
 
const QString & md5Sum () const
 
bool isValid () const
 
QString print () const
 
 VP1EventFile ()
 
 ~VP1EventFile ()
 
bool operator< (const VP1EventFile &) const
 
bool operator== (const VP1EventFile &) const
 
bool operator!= (const VP1EventFile &) const
 
 VP1EventFile (const VP1EventFile &)
 
VP1EventFileoperator= (const VP1EventFile &)
 
 VP1EventFile (const QString &filename, const QString &md5sum, int runnumber, unsigned long long eventnumber, unsigned time, bool isvalid=true)
 
 VP1EventFile (const QString &, const QString &md5sum=0)
 

Private Attributes

Impm_d
 

Detailed Description

Definition at line 23 of file VP1EventFile.h.

Constructor & Destructor Documentation

◆ VP1EventFile() [1/4]

VP1EventFile::VP1EventFile ( )

Definition at line 39 of file VP1EventFile.cxx.

40  : m_d(new Imp)
41 {
42 }

◆ ~VP1EventFile()

VP1EventFile::~VP1EventFile ( )

Definition at line 104 of file VP1EventFile.cxx.

105 {
106  delete m_d;
107 }

◆ VP1EventFile() [2/4]

VP1EventFile::VP1EventFile ( const VP1EventFile other)

Definition at line 139 of file VP1EventFile.cxx.

140  : m_d(new Imp)
141 {
142  *this = other;
143 }

◆ VP1EventFile() [3/4]

VP1EventFile::VP1EventFile ( const QString &  filename,
const QString &  md5sum,
int  runnumber,
unsigned long long  eventnumber,
unsigned  time,
bool  isvalid = true 
)

Definition at line 97 of file VP1EventFile.cxx.

99  : m_d(new Imp(filename,md5sum,runnumber,eventnumber,time,isvalid))
100 {
101 }

◆ VP1EventFile() [4/4]

VP1EventFile::VP1EventFile ( const QString &  filename,
const QString &  md5sum = 0 
)

Definition at line 91 of file VP1EventFile.cxx.

93 {
94 }

Member Function Documentation

◆ eventNumber()

unsigned long long VP1EventFile::eventNumber ( ) const

Definition at line 182 of file VP1EventFile.cxx.

183 {
184  return m_d->eventNumber;
185 }

◆ fileName()

const QString & VP1EventFile::fileName ( ) const

Definition at line 164 of file VP1EventFile.cxx.

165 {
166  return m_d->fileName;
167 }

◆ isValid()

bool VP1EventFile::isValid ( ) const

Definition at line 158 of file VP1EventFile.cxx.

159 {
160  return m_d->valid;
161 }

◆ md5Sum()

const QString & VP1EventFile::md5Sum ( ) const

Definition at line 170 of file VP1EventFile.cxx.

171 {
172  return m_d->md5Sum;
173 }

◆ operator!=()

bool VP1EventFile::operator!= ( const VP1EventFile other) const

Definition at line 133 of file VP1EventFile.cxx.

134 {
135  return !(*this==other);
136 }

◆ operator<()

bool VP1EventFile::operator< ( const VP1EventFile other) const

Definition at line 110 of file VP1EventFile.cxx.

111 {
112  //newer (larger time, run and evt numbers) means "smaller".
113  if (m_d->rawTime!=other.m_d->rawTime) return m_d->rawTime>other.m_d->rawTime;
114  if (m_d->runNumber!=other.m_d->runNumber) return m_d->runNumber>other.m_d->runNumber;
115  if (m_d->eventNumber!=other.m_d->eventNumber) return m_d->eventNumber>other.m_d->eventNumber;
116  if (m_d->fileName!=other.m_d->fileName) return m_d->fileName<other.m_d->fileName;
117  if (m_d->valid!=other.m_d->valid) return m_d->valid;
118  return m_d->md5Sum<other.m_d->md5Sum;
119 }

◆ operator=()

VP1EventFile & VP1EventFile::operator= ( const VP1EventFile other)

Definition at line 146 of file VP1EventFile.cxx.

147 {
148  m_d->fileName = other.m_d->fileName;
149  m_d->md5Sum = other.m_d->md5Sum;
150  m_d->runNumber = other.m_d->runNumber;
151  m_d->eventNumber = other.m_d->eventNumber;
152  m_d->rawTime = other.m_d->rawTime;
153  m_d->valid = other.m_d->valid;
154  return *this;
155 }

◆ operator==()

bool VP1EventFile::operator== ( const VP1EventFile other) const

Definition at line 122 of file VP1EventFile.cxx.

123 {
124  return m_d->rawTime==other.m_d->rawTime
125  && m_d->eventNumber==other.m_d->eventNumber
126  && m_d->md5Sum==other.m_d->md5Sum
127  && m_d->fileName==other.m_d->fileName
128  && m_d->runNumber==other.m_d->runNumber
129  && m_d->valid==other.m_d->valid;
130 }

◆ print()

QString VP1EventFile::print ( ) const

Definition at line 200 of file VP1EventFile.cxx.

201 {
202  if (!isValid())
203  return "[invalid]";
204  return fileName()
205  +", run="+QString::number(runNumber())
206  +", evt="+QString::number(eventNumber())
207  +", time="+time().toString()
208  +", md5="+md5Sum();
209 }

◆ rawTime()

unsigned VP1EventFile::rawTime ( ) const

Definition at line 188 of file VP1EventFile.cxx.

189 {
190  return m_d->rawTime;
191 }

◆ runNumber()

int VP1EventFile::runNumber ( ) const

Definition at line 176 of file VP1EventFile.cxx.

177 {
178  return m_d->runNumber;
179 }

◆ time()

QDateTime VP1EventFile::time ( ) const

Definition at line 194 of file VP1EventFile.cxx.

195 {
196  return QDateTime::fromTime_t(m_d->rawTime);
197 }

Member Data Documentation

◆ m_d

Imp* VP1EventFile::m_d
private

Definition at line 52 of file VP1EventFile.h.


The documentation for this class was generated from the following files:
VP1EventFile::m_d
Imp * m_d
Definition: VP1EventFile.h:51
VP1EventFile::Imp::runNumber
int runNumber
Definition: VP1EventFile.cxx:30
VP1EventFile::time
QDateTime time() const
Definition: VP1EventFile.cxx:194
VP1EventFile::Imp::rawTime
unsigned rawTime
Definition: VP1EventFile.cxx:32
VP1EventFile::Imp::fileName
QString fileName
Definition: VP1EventFile.cxx:28
VP1EventFile::Imp::valid
bool valid
Definition: VP1EventFile.cxx:33
VP1EventFile::fileName
const QString & fileName() const
Definition: VP1EventFile.cxx:164
VP1EventFile::isValid
bool isValid() const
Definition: VP1EventFile.cxx:158
VP1EventFile::runNumber
int runNumber() const
Definition: VP1EventFile.cxx:176
DeMoScan.runnumber
runnumber
Definition: DeMoScan.py:266
VP1EventFile::eventNumber
unsigned long long eventNumber() const
Definition: VP1EventFile.cxx:182
python.selection.number
number
Definition: selection.py:20
VP1EventFile::Imp::initFromFilename
static Imp * initFromFilename(const QString &filename, const QString &md5sum)
Definition: VP1EventFile.cxx:45
VP1EventFile::md5Sum
const QString & md5Sum() const
Definition: VP1EventFile.cxx:170
VP1EventFile::Imp::eventNumber
unsigned long long eventNumber
Definition: VP1EventFile.cxx:31
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
VP1EventFile::Imp::md5Sum
QString md5Sum
Definition: VP1EventFile.cxx:29
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24