ATLAS Offline Software
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
RootSpy::logitem Struct Reference
Collaboration diagram for RootSpy::logitem:

Public Member Functions

 logitem (bool indirect)
 
void calchash ()
 
bool operator< (const logitem &o) const
 

Public Attributes

unsigned hash
 
unsigned ntrace
 
void * trace [ntracemax]
 
unsigned traceoffset
 
std::string name
 

Static Public Attributes

static const unsigned ntracemax =8
 

Detailed Description

Definition at line 108 of file rootspy.cxx.

Constructor & Destructor Documentation

◆ logitem()

RootSpy::logitem::logitem ( bool  indirect)
inlineexplicit

Definition at line 109 of file rootspy.cxx.

109 :hash(0),ntrace(0),trace(),traceoffset(indirect?1:0){}

Member Function Documentation

◆ calchash()

void RootSpy::logitem::calchash ( )
inline

Definition at line 116 of file rootspy.cxx.

116  {
117  hash=ntrace;
118  for(unsigned i=0;i<ntrace;++i)
119  hash += *((unsigned*)(trace[i]));
120  if (traceoffset) hash += 1;
121  return;//fixme
122  size_t l(name.length());
123  if (l>=sizeof(unsigned)) {
124  const size_t l2(l-l%sizeof(unsigned));
125  for (size_t i=0;i<l2;i+=sizeof(unsigned))
126  hash+=*((unsigned*)(&(name.at(0))));
127  hash+=*((unsigned*)(&(name.at(l-sizeof(unsigned)))));//last bytes
128  }
129  }

◆ operator<()

bool RootSpy::logitem::operator< ( const logitem o) const
inline

Definition at line 130 of file rootspy.cxx.

130  {
131  if (hash!=o.hash) return hash<o.hash;
132  if (ntrace!=o.ntrace) return ntrace<o.ntrace;
133  for(unsigned i=0;i<ntrace;++i)
134  if (trace[i]!=o.trace[i]) return trace[i]<o.trace[i];
135  //Not really necessary: same trace should have same offset:
136  if (traceoffset!=o.traceoffset) return traceoffset<o.traceoffset;
137  return name<o.name;
138  }

Member Data Documentation

◆ hash

unsigned RootSpy::logitem::hash

Definition at line 110 of file rootspy.cxx.

◆ name

std::string RootSpy::logitem::name

Definition at line 115 of file rootspy.cxx.

◆ ntrace

unsigned RootSpy::logitem::ntrace

Definition at line 112 of file rootspy.cxx.

◆ ntracemax

const unsigned RootSpy::logitem::ntracemax =8
static

Definition at line 111 of file rootspy.cxx.

◆ trace

void* RootSpy::logitem::trace[ntracemax]

Definition at line 113 of file rootspy.cxx.

◆ traceoffset

unsigned RootSpy::logitem::traceoffset

Definition at line 114 of file rootspy.cxx.


The documentation for this struct was generated from the following file:
RootSpy::logitem::trace
void * trace[ntracemax]
Definition: rootspy.cxx:113
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
xAOD::unsigned
unsigned
Definition: RingSetConf_v1.cxx:662
skel.l2
l2
Definition: skel.GENtoEVGEN.py:426
lumiFormat.i
int i
Definition: lumiFormat.py:92
RootSpy::logitem::ntrace
unsigned ntrace
Definition: rootspy.cxx:112
RootSpy::logitem::traceoffset
unsigned traceoffset
Definition: rootspy.cxx:114
RootSpy::logitem::name
std::string name
Definition: rootspy.cxx:115
RootSpy::logitem::hash
unsigned hash
Definition: rootspy.cxx:110