ATLAS Offline Software
Classes | Functions
RegSelModule.h File Reference
#include "Identifier/IdentifierHash.h"
#include "RegSelLUT/ZRObject.h"
#include <iostream>
#include <cmath>
#include <stdint.h>
Include dependency graph for RegSelModule.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  RegSelModule
 

Functions

std::ostream & operator<< (std::ostream &s, const RegSelModule &m)
 
bool getModule (std::istream &s, RegSelModule &m)
 

Function Documentation

◆ getModule()

bool getModule ( std::istream &  s,
RegSelModule m 
)

copy z limits to max radius values just in case

read in extra z limits if required

Definition at line 110 of file RegSelModule.cxx.

111 {
112  char s[128], s1[128], s2[128];
113 
114  int layer;
115  int detector;
116 
117  double rMin, rMax;
118  double zMin, zMax;
119  double z2Min, z2Max;
120  double phiMin, phiMax;
121 
122  uint32_t robid;
123  // IdentifierHash hash;
124  unsigned int hashint;
125 
126  ss >> s >> s >> std::dec >> layer
127  >> s >> s >> std::dec >> detector
128  >> s >> s >> rMin >> s >> rMax
129  >> s >> s >> phiMin >> s >> phiMax
130  >> s >> s >> zMin >> s >> zMax;
131 
133  z2Min = zMin;
134  z2Max = zMax;
135 
136  ss >> s1 >> s2;
137 
139  if ( std::string(s2)=="z2=" ) {
140  ss >> z2Min >> s >> z2Max;
141  ss >> s >> s;
142  }
143 
144  ss >> std::hex >> robid
145  >> s >> s >> std::hex >> hashint >> std::dec >> s;
146 
147  if ( ss.fail() ) return false;
148 
149  // std::cout << "s.fail() " << s.fail() << std::endl;
150 
151  phiMin *= M_PI/180;
152  phiMax *= M_PI/180;
153 
154  RegSelModule tm( zMin, zMax,
155  z2Min, z2Max,
156  rMin, rMax,
157  phiMin, phiMax,
158  layer,
159  detector,
160  robid,
161  IdentifierHash(hashint));
162 
163  m=tm;
164 
165  return true;
166 }

◆ operator<<()

std::ostream& operator<< ( std::ostream &  s,
const RegSelModule m 
)

Definition at line 95 of file RegSelModule.cxx.

96 {
97  s << "[ lyr= " << m.layer()
98  << " ,\tdet= " << m.detector()
99  << " ,\tr= " << m.rMin() << " - " << m.rMax()
100  << " ,\tphi= " << m.phiMin()*180/M_PI << " - " << m.phiMax()*180/M_PI
101  << " ,\tz= " << m.zMin() << " - " << m.zMax();
102  if ( m.zMin()!=m.z2Min() || m.zMax()!=m.z2Max() ) s << " ,\tz2= " << m.z2Min() << " - " << m.z2Max();
103  s << " ,\trob= 0x" << std::hex << m.robID()
104  << " ,\thash= 0x" << std::hex << m.hashID() << std::dec << ( m.enabled() ? " ]" : " (disabled)]");
105  return s;
106 }
RegSelModule
Definition: RegSelModule.h:38
ReadCellNoiseFromCoolCompare.s1
s1
Definition: ReadCellNoiseFromCoolCompare.py:378
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TRTCalib_cfilter.detector
detector
Definition: TRTCalib_cfilter.py:241
M_PI
#define M_PI
Definition: ActiveFraction.h:11
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
ReadCellNoiseFromCoolCompare.s2
s2
Definition: ReadCellNoiseFromCoolCompare.py:379
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25