ATLAS Offline Software
Public Member Functions | Public Attributes | Friends | List of all members
CoWTools::CoWRecord Class Reference

#include <CoWRecord.h>

Collaboration diagram for CoWTools::CoWRecord:

Public Member Functions

 CoWRecord (bool summary=true)
 
void parseRecord (std::istream &in)
 
CoWRecord operator- () const
 
 operator bool () const
 
CoWRecordoperator+= (const CoWRecord &rhs)
 
CoWRecordoperator-= (const CoWRecord &rhs)
 

Public Attributes

unsigned long addrStart
 
unsigned long addrEnd
 
short perms
 
unsigned long long offset
 
unsigned long inode
 
CoWRecordStats m_ms
 
unsigned int dmin
 
unsigned int dmaj
 

Friends

CoWRecord operator- (CoWRecord lhs, const CoWRecord &rhs)
 
CoWRecord operator+ (CoWRecord lhs, const CoWRecord &rhs)
 

Detailed Description

Definition at line 12 of file CoWRecord.h.

Constructor & Destructor Documentation

◆ CoWRecord()

CoWTools::CoWRecord::CoWRecord ( bool  summary = true)
inline

Definition at line 14 of file CoWRecord.h.

14  :
15  addrStart(0),
16  addrEnd(0),
17  perms(0),
18  offset(0),
19  inode(0),
20  m_ms(summary),
21  dmin(0),
22  dmaj(0)
23  {}

Member Function Documentation

◆ operator bool()

CoWTools::CoWRecord::operator bool ( ) const
inlineexplicit

Definition at line 40 of file CoWRecord.h.

40  {
41  auto vals=m_ms.getValueArray();
42  for(int i=0;i<11;i++){
43  if(vals[i])return true;
44  }
45  return false;
46  }

◆ operator+=()

CoWRecord& CoWTools::CoWRecord::operator+= ( const CoWRecord rhs)
inline

Definition at line 52 of file CoWRecord.h.

52  {
53  perms|=rhs.perms;
54  m_ms+=rhs.m_ms;
55  return *this;
56  }

◆ operator-()

CoWRecord CoWTools::CoWRecord::operator- ( ) const
inline

Definition at line 35 of file CoWRecord.h.

35  {
36  CoWRecord m(*this);
37  m.m_ms=-m_ms;
38  return m;
39  }

◆ operator-=()

CoWRecord& CoWTools::CoWRecord::operator-= ( const CoWRecord rhs)
inline

Definition at line 58 of file CoWRecord.h.

58  {
59  perms^=rhs.perms;
60  m_ms-=rhs.m_ms;
61  return *this;
62  }

◆ parseRecord()

void CoWTools::CoWRecord::parseRecord ( std::istream &  in)

Definition at line 8 of file CoWRecord.cxx.

8  {
9  std::string line;
10  std::getline(in,line);
11  int len=0;
12  char pbuff[5]={"----"};
13  //int dmin,dmaj;
14  sscanf(line.c_str(),"%08lx-%08lx %4s %08llx %02x:%02x %80lu %n",
15  &addrStart,
16  &addrEnd,
17  pbuff,
18  &offset,
19  &dmaj,
20  &dmin,
21  &inode,
22  &len);
23  //std::cout<<"MR len= "<<len<<" lineLen="<<line.size()<<", "<<line<<std::endl;
24  for(int i=0;i<3;i++){
25  perms|=((pbuff[i]!='-')<<(4-i));
26  }
27  perms |= (pbuff[3]=='p');
28  m_ms.parseRecord(in);
29 }

Friends And Related Function Documentation

◆ operator+

CoWRecord operator+ ( CoWRecord  lhs,
const CoWRecord rhs 
)
friend

Definition at line 48 of file CoWRecord.h.

48  {
49  return lhs+=rhs;
50  }

◆ operator-

CoWRecord operator- ( CoWRecord  lhs,
const CoWRecord rhs 
)
friend

Definition at line 32 of file CoWRecord.h.

32  {
33  return lhs-=rhs;
34  }

Member Data Documentation

◆ addrEnd

unsigned long CoWTools::CoWRecord::addrEnd

Definition at line 24 of file CoWRecord.h.

◆ addrStart

unsigned long CoWTools::CoWRecord::addrStart

Definition at line 24 of file CoWRecord.h.

◆ dmaj

unsigned int CoWTools::CoWRecord::dmaj

Definition at line 29 of file CoWRecord.h.

◆ dmin

unsigned int CoWTools::CoWRecord::dmin

Definition at line 29 of file CoWRecord.h.

◆ inode

unsigned long CoWTools::CoWRecord::inode

Definition at line 27 of file CoWRecord.h.

◆ m_ms

CoWRecordStats CoWTools::CoWRecord::m_ms

Definition at line 28 of file CoWRecord.h.

◆ offset

unsigned long long CoWTools::CoWRecord::offset

Definition at line 26 of file CoWRecord.h.

◆ perms

short CoWTools::CoWRecord::perms

Definition at line 25 of file CoWRecord.h.


The documentation for this class was generated from the following files:
CoWTools::CoWRecordStats::getValueArray
long long * getValueArray()
Definition: CoWRecordStats.h:94
checkFileSG.line
line
Definition: checkFileSG.py:75
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
CoWTools::CoWRecord::offset
unsigned long long offset
Definition: CoWRecord.h:26
CoWTools::CoWRecord::addrEnd
unsigned long addrEnd
Definition: CoWRecord.h:24
CoWTools::CoWRecord::addrStart
unsigned long addrStart
Definition: CoWRecord.h:24
lumiFormat.i
int i
Definition: lumiFormat.py:85
CoWTools::CoWRecord::CoWRecord
CoWRecord(bool summary=true)
Definition: CoWRecord.h:14
CoWTools::CoWRecordStats::parseRecord
void parseRecord(std::istream &in)
Definition: CoWRecordStats.cxx:40
CoWTools::CoWRecord::perms
short perms
Definition: CoWRecord.h:25
CoWTools::CoWRecord::dmaj
unsigned int dmaj
Definition: CoWRecord.h:29
CoWTools::CoWRecord::dmin
unsigned int dmin
Definition: CoWRecord.h:29
CoWTools::CoWRecord::m_ms
CoWRecordStats m_ms
Definition: CoWRecord.h:28
CoWTools::CoWRecord::inode
unsigned long inode
Definition: CoWRecord.h:27
inode
Definition: listroot.cxx:155
PlotCalibFromCool.vals
vals
Definition: PlotCalibFromCool.py:474
SCT_Monitoring::summary
@ summary
Definition: SCT_MonitoringNumbers.h:65