Project
Loading...
Searching...
No Matches
PadWord.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#ifndef ALICEO2_FOCAL_PADWORD_H
13#define ALICEO2_FOCAL_PADWORD_H
14
15#include <iosfwd>
16#include <gsl/span>
17#include <cstdint>
18
19namespace o2::focal
20{
21
23 union {
24 struct {
30 }; // ASIC Header word
31 struct {
35 }; // ASIC channel word
37 };
38};
39
57
58struct ASICHeader : public PadASICWord {
60 {
61 mData = 0;
62 }
64 {
65 mData = word;
66 }
67 ASICHeader(uint32_t header, uint32_t wadd, uint32_t, uint32_t bcID, uint32_t fourbit, uint32_t trailer)
68 {
69 mTrailer = trailer;
70 mWADD = wadd;
71 mBCID = bcID;
72 mFourbit = fourbit;
74 }
75 uint32_t getTrailer() const { return mTrailer; }
76 uint32_t getWadd() const { return mWADD; }
77 uint32_t getBCID() const { return mBCID; }
78 uint32_t getFourbit() const { return mFourbit; }
79 uint32_t getHeader() const { return mHeader; }
80};
81
82struct ASICChannel : public PadASICWord {
84 {
85 mData = 0;
86 }
88 {
89 mData = 0;
90 }
92 {
93 mADC = adc;
94 mTOA = toa;
95 mTOT = tot;
96 }
97 uint32_t getADC() const { return mADC; }
98 uint32_t getTOA() const { return mTOA; }
99 uint32_t getTOT() const { return mTOT; }
100};
101
103 union {
106 };
107
108 const TriggerWord& getTriggerData() const { return reinterpret_cast<const TriggerWord&>(mTriggerWords[0]); }
109 const TriggerWord& getTriggerPadding() const { return reinterpret_cast<const TriggerWord&>(mTriggerWords[1]); }
110
111 template <typename T>
112 gsl::span<const T> getASICData() const
113 {
114 return gsl::span<const T>(reinterpret_cast<const T*>(mASICWords), 2);
115 }
116};
117
118std::ostream& operator<<(std::ostream& stream, const ASICChannel& channel);
119std::ostream& operator<<(std::ostream& stream, const ASICHeader& header);
120std::ostream& operator<<(std::ostream& stream, const TriggerWord& trigger);
121
122} // namespace o2::focal
123
124#endif // ALICEO2_FOCAL_PADWORD_H
std::vector< std::string > header
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
GLuint GLuint stream
Definition glcorearb.h:1806
std::ostream & operator<<(std::ostream &in, const IndexExceptionEvent &error)
ASICChannel(uint32_t word)
Definition PadWord.h:87
uint32_t getADC() const
Definition PadWord.h:97
uint32_t getTOT() const
Definition PadWord.h:99
uint32_t getTOA() const
Definition PadWord.h:98
ASICChannel(uint32_t adc, uint32_t toa, uint32_t tot)
Definition PadWord.h:91
uint32_t getFourbit() const
Definition PadWord.h:78
uint32_t getTrailer() const
Definition PadWord.h:75
ASICHeader(uint32_t word)
Definition PadWord.h:63
uint32_t getWadd() const
Definition PadWord.h:76
uint32_t getBCID() const
Definition PadWord.h:77
uint32_t getHeader() const
Definition PadWord.h:79
ASICHeader(uint32_t header, uint32_t wadd, uint32_t, uint32_t bcID, uint32_t fourbit, uint32_t trailer)
Definition PadWord.h:67
gsl::span< const T > getASICData() const
Definition PadWord.h:112
const TriggerWord & getTriggerData() const
Definition PadWord.h:108
uint64_t mTriggerWords[2]
Definition PadWord.h:104
const TriggerWord & getTriggerPadding() const
Definition PadWord.h:109
uint32_t mASICWords[4]
Definition PadWord.h:105
ArrayADC adc