|
ATLAS Offline Software
|
#include <TileDQstatusTool.h>
Definition at line 28 of file TileDQstatusTool.h.
◆ TileDQstatusTool()
TileDQstatusTool::TileDQstatusTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Standard Gaudi tool constructor.
- Parameters
-
type | The name of the tool type. |
name | The tool name. |
parent | The tool's Gaudi parent. |
Definition at line 34 of file TileDQstatusTool.cxx.
◆ doBeamElem()
Process BeamElemContainer.
- Parameters
-
Definition at line 217 of file TileDQstatusTool.cxx.
220 if (!tileBeamElemContainer) {
221 return StatusCode::SUCCESS;
227 int frag = coll->identify();
229 if (dqstatus.
trigType() == 0 && coll->getLvl1Type() != 0) {
242 if (beamItr != lastBeam) {
243 std::vector < uint32_t > digits = (*beamItr)->get_digits();
245 if (digits.size() > 0) {
247 if (laserFlag & 0xFF00)
259 std::vector < uint32_t > digits = elem->get_digits();
263 if (digits.size() > 0) {
264 cispar[cha] = digits[0];
268 else if (cha == 15) {
269 int siz = 15 + digits.size();
272 for (
int i = 15;
i < siz; ++
i) {
273 cispar[
i] = digits[
i - 15];
276 switch (cispar[16]) {
279 int aux_ext = cispar[17];
280 cispar[17] = (aux_ext & 0x00ff);
281 cispar[18] = (aux_ext >> 8) & 0x00ff;
282 cispar[19] = (aux_ext >> 16) & 0x00ff;
283 cispar[20] = (aux_ext >> 24) & 0x00ff;
288 bool badpar = ((cispar[16] == cispar[17]) || (cispar[17] == cispar[18]));
289 int aux_ext = cispar[18];
290 cispar[18] = (aux_ext & 0x00ff) - 1;
291 cispar[19] = (aux_ext >> 8) & 0x00ff;
292 cispar[20] = (aux_ext >> 16) & 0x00ff;
294 if (badpar || (aux_ext>>24)!=0 || cispar[18]>5 || cispar[19]>15 || cispar[20]>63) {
295 ATH_MSG_WARNING(
"bad cispar[16,17,18]: " << cispar[16] <<
" " << cispar[17] <<
" " << aux_ext
296 <<
" drawer,tower,pmt: " << cispar[20] <<
" " << cispar[19] <<
" " << (
int)cispar[18]);
303 if (cispar[16] != cispar[17]) {
309 chargeCnv.i = cispar[17];
310 cispar[17] = chargeCnv.f;
330 if (beamItr != lastBeam) {
332 std::vector < uint32_t > digits = (*beamItr)->get_digits();
333 int cha =
std::min(32, (
int) digits.size());
336 m_laspar[cha] = digits[cha];
357 if (board >= m_coincTrig.size()) {
358 m_coincTrig.resize(board + 1);
365 for (; beamItr != lastBeam; ++beamItr) {
368 std::vector < uint32_t > digits = (*beamItr)->get_digits();
369 uint32_t amplitude = (digits.size() > 0) ? digits[0] : 0;
374 for (
int ibit = 0; ibit < 32; ++ibit) {
375 m_coincTrig[board].trig[
idx++] = (amplitude >> ibit) & 1;
377 }
else if (cha == 3) {
378 m_coincTrig[board].amp = amplitude;
390 return StatusCode::SUCCESS;
◆ initialize()
StatusCode TileDQstatusTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ makeStatus()
Make a new TileDQstatus object.
- Parameters
-
Definition at line 68 of file TileDQstatusTool.cxx.
75 dqstatus.
setRODBCID (ctx.eventID().bunch_crossing_id());
89 if (coll->size() > 0) {
90 int dsize = (*(coll->begin()))->NtimeSamples();
91 if (4 < dsize && dsize < 15) {
96 int frag = coll->identify();
98 int drawer = (frag & 0x3F);
100 std::vector < uint32_t >
data = coll->getFragChipHeaderWords();
102 for (
unsigned int dmu = 0; dmu <
dataSize; ++dmu) {
107 data = coll->getFragChipHeaderWordsHigh();
109 for (
unsigned int dmu = 0; dmu <
dataSize; ++dmu) {
123 ATH_MSG_DEBUG(
"RawChannelContainer didn't come from BS - don't check DQ flags");
128 int frag = coll->identify();
130 <<
" size=" << coll->size());
132 unsigned short existingDMUs = 0xFFFF;
135 existingDMUs = (frag == 0x30E || frag == 0x411) ? 0x3CFE : 0x3CFF;
138 unsigned short wrongBCID(0);
139 unsigned short fragBCID = coll->getFragBCID();
140 if (fragBCID & existingDMUs) {
142 int drawer = (frag & 0x3F);
147 if (badChannels->getChannelStatus(
channel_id).isWrongBCID()) {
153 wrongBCID = 0xFFFF & existingDMUs;
157 wrongBCID |= (1U << dmu);
161 fragBCID &= ~wrongBCID;
168 ATH_MSG_DEBUG(
"all DQ elements are empty - don't check DQ flags");
180 if (coll->size() > 0) {
181 int dsize = (*(coll->begin()))->NtimeSamples();
182 if (4 < dsize && dsize < 15) {
183 isCalib |= coll->isCalibMode();
195 CLHEP::HepRandomEngine* engine = wrapper->
getEngine (ctx);
198 const std::vector<std::vector<float>>& tripsProbs = badChannels->getTripsProbabilities();
201 const std::vector<float>& trips = tripsProbs.size() ? tripsProbs.at(
partition - 1) : defaultTripsProbs;
207 return StatusCode::SUCCESS;
◆ m_athRNGSvc
◆ m_badChannelsKey
Initial value:{this,
"TileBadChannels", "TileBadChannels", "Input Tile bad channel status"}
Name of TileBadChannels in condition store.
Definition at line 84 of file TileDQstatusTool.h.
◆ m_simulateTrips
Gaudi::Property<bool> TileDQstatusTool::m_simulateTrips {this, "SimulateTrips", false, "Simulate drawer trips (default=false)"} |
|
private |
◆ m_tileHWID
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
void setTrigType(int trigType)
void fillArrays(const TileRawChannelCollection *coll, const TileDigitsContainer *digitsCnt, int gain, unsigned short fragBCID)
parses DQ fragments and fill error arrays for event
char data[hepevt_bytes_allocation_ATLAS]
Const iterator class for DataVector/DataList.
void setBiGain(bool biGain)
sets flag of gain mode of run
void setFilled(bool filled)
sets flag that DQ status instance has been filled for this event
bool isBiGain() const
returns gain mode of run
#define ATH_MSG_VERBOSE(x)
@ u
Enums for curvilinear frames.
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
void setRODBCID(uint32_t BCID)
sets the ROD BCID stored and used in DQStatus
static const unsigned int MAX_DRAWER
Number of drawers in ROS 1-4.
int trigType() const
Trigger type.
bool nonZeroCounter() const
returns True if there are any errors in event
string tileDigitsContainer
static const unsigned int MAX_ROS
Number of ROSs
void setEmptyEvent(int partition, int drawer, int dmu, int gain, int isEmpty)
sets flag that DMU sent an empty event (0xFFFFFFFF)
A wrapper class for event-slot-local random engines.
HWIdentifier channel_id(int ros, int drawer, int channel) const
channel HWIdentifer
size_t dataSize(TDA::PayloadIterator start)
Size in bytes of the buffer that is needed to decode next fragment data content.
StatusCode initialize(bool used=true)
const uint32_t * cispar() const
CIS parameters.
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
void setAllGood()
mark all channels/ADC's as DQ good
#define ATH_MSG_WARNING(x)
void fillTrips(unsigned int partition, const std::vector< float > &trips, double *rndmVec, MsgStream &msg)
void setIncompleteDigits(bool incomplete)
static const unsigned int MAX_CHAN
Number of channels in drawer.
void setCalibMode(uint32_t calibMode)