ATLAS Offline Software
Loading...
Searching...
No Matches
Decision.h File Reference
#include "L1TopoCommon/StatusCode.h"
#include <iostream>
#include <vector>
#include <stdint.h>
Include dependency graph for Decision.h:

Go to the source code of this file.

Classes

class  TCS::Decision

Namespaces

namespace  TCS

Functions

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

Function Documentation

◆ operator<<()

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

Definition at line 23 of file 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}
bool overflow() const
Definition Decision.h:45
unsigned int lastBit() const
Definition Decision.h:43
bool bit(unsigned int index) const
Definition Decision.h:40
unsigned int nBits() const
Definition Decision.h:44
unsigned int firstBit() const
Definition Decision.h:42