ATLAS Offline Software
Functions
L1Topo/L1TopoInterfaces/Root/Decision.cxx File Reference
#include "L1TopoInterfaces/Decision.h"
#include "L1TopoCommon/Exception.h"
Include dependency graph for L1Topo/L1TopoInterfaces/Root/Decision.cxx:

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &o, const TCS::Decision &dec)
 

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  o,
const TCS::Decision dec 
)

Definition at line 23 of file L1Topo/L1TopoInterfaces/Root/Decision.cxx.

24  {
25  unsigned int bit = dec.nBits();
26  if(dec.nBits()==1) {
27  o << "decision (1 bit, position " << dec.firstBit() << "): ";
28  } else {
29  o << "decision (" << dec.nBits() << " bits, position " << dec.firstBit() << " - " << dec.lastBit() << "): ";
30  }
31  while(bit!=0) {
32  o << (dec.bit(--bit)?1:0);
33  }
34  o << "(overflow "<<dec.overflow()<<")";
35  return o;
36 }
TCS::Decision::overflow
bool overflow() const
Definition: L1Topo/L1TopoInterfaces/L1TopoInterfaces/Decision.h:45
TCS::Decision::lastBit
unsigned int lastBit() const
Definition: L1Topo/L1TopoInterfaces/L1TopoInterfaces/Decision.h:43
TCS::Decision::nBits
unsigned int nBits() const
Definition: L1Topo/L1TopoInterfaces/L1TopoInterfaces/Decision.h:44
TCS::Decision::firstBit
unsigned int firstBit() const
Definition: L1Topo/L1TopoInterfaces/L1TopoInterfaces/Decision.h:42
TCS::Decision::bit
bool bit(unsigned int index) const
Definition: L1Topo/L1TopoInterfaces/L1TopoInterfaces/Decision.h:40