22#include <fmt/format.h>
23#include <fmt/chrono.h>
53using o2::constants::lhc::LHCMaxBunches;
55using o2::tpc::constants::LHCBCPERTIMEBIN;
71 mWriteDebug = ic.options().get<
bool>(
"write-debug");
72 mWriteDebugOnError = ic.options().get<
bool>(
"write-debug-on-error");
73 mWriteRawDataOnError = ic.options().get<
bool>(
"write-raw-data-on-error");
74 mRawDataType = ic.options().get<
int>(
"raw-data-type");
77 mDebugStreamFileName = ic.options().get<std::string>(
"debug-file-name").
data();
78 mRawOutputFileName = ic.options().get<std::string>(
"raw-file-name").
data();
80 mSwapLinks = ic.options().get<
bool>(
"swap-links");
82 auto pedestalFile = ic.options().get<std::string>(
"pedestal-url");
83 if (pedestalFile.length()) {
86 const auto tsPos = pedestalFile.find(
"@");
87 std::string pedestalURL = pedestalFile.substr(0, tsPos);
88 if (pedestalURL.find(
"ccdb") != std::string::npos) {
89 if (pedestalURL.find(
"-default") != std::string::npos) {
92 LOGP(info,
"Loading pedestals from ccdb: {}", pedestalURL);
93 cdb.setURL(pedestalURL);
94 if (cdb.isHostReachable()) {
95 if (tsPos != std::string::npos) {
96 timeStamp = std::stol(pedestalFile.substr(tsPos + 1));
97 LOGP(info,
"Using custom time stamp {}", timeStamp);
99 auto pedestalNoise = cdb.getForTimeStamp<std::unordered_map<std::string, CalPad>>(
"TPC/Calib/PedestalNoise", timeStamp);
101 if (!pedestalNoise) {
102 throw std::runtime_error(
"Couldn't retrieve PedestaNoise map");
104 mPedestal = std::make_unique<CalPad>(pedestalNoise->at(
"Pedestals"));
105 }
catch (
const std::exception&
e) {
106 LOGP(fatal,
"could not load pedestals from {} ({}), required for IDC processing", pedestalURL,
e.what());
109 LOGP(fatal,
"ccdb access to {} requested, but host is not reachable. Cannot load pedestals, required for IDC processing", pedestalURL);
112 LOGP(info,
"Loading pedestals from file: {}", pedestalURL);
114 if (calPads.size() != 1) {
115 LOGP(fatal,
"Pedestal could not be loaded from file {}, required for IDC processing", pedestalURL);
117 mPedestal.reset(calPads[0]);
121 LOGP(
error,
"No pedestal file set, IDCs will be without pedestal subtraction!");
134 if ((mWriteDebug || mWriteDebugOnError) && !mDebugStream) {
135 const auto debugFileName = fmt::format(fmt::runtime(mDebugStreamFileName), fmt::arg(
"run", runNumber));
136 LOGP(info,
"creating debug stream {}", debugFileName);
137 mDebugStream = std::make_unique<o2::utils::TreeStreamRedirector>(debugFileName.data(),
"recreate");
140 if (mWriteRawDataOnError && !mRawOutputFile.is_open()) {
141 std::string_view rawType = (mRawDataType < 2) ?
"tf" :
"raw";
142 if (mRawDataType == 4) {
145 const auto rawFileName = fmt::format(fmt::runtime(mRawOutputFileName), fmt::arg(
"run", runNumber), fmt::arg(
"raw_type", rawType));
146 LOGP(info,
"creating raw debug file {}", rawFileName);
147 mRawOutputFile.open(rawFileName, std::ios::binary);
154 bool hasErrors =
false;
156 CalPad* pedestals = mPedestal.get();
159 const auto* dh = DataRefUtils::getHeader<o2::header::DataHeader*>(
ref);
160 tfCounter = dh->tfCounter;
161 const auto subSpecification = dh->subSpecification;
165 const gsl::span<const char>
raw = pc.inputs().get<gsl::span<char>>(
ref);
168 size_t lastErrorCount = 0;
170 for (
auto it = parser.
begin(),
end = parser.
end(); it !=
end; ++it) {
171 const auto size = it.size();
185 if (!rdhPtr || rdhVersion < 6) {
186 throw std::runtime_error(fmt::format(
"could not get RDH from packet, or version {} < 6", rdhVersion).
data());
190 const auto feeId = (
FEEIDType)RDHUtils::getFEEID(*rdhPtr);
191 const auto link = rdh_utils::getLink(feeId);
192 const uint32_t cruID = rdh_utils::getCRU(feeId);
193 const auto endPoint = rdh_utils::getEndPoint(feeId);
194 const auto detField = RDHUtils::getDetectorField(*rdhPtr);
198 if ((detField != (
decltype(detField))RawDataType::IDC) || (
link != rdh_utils::IDCLinkID)) {
201 LOGP(
debug,
"IDC Processing firstTForbit {:9}, tfCounter {:5}, run {:6}, feeId {:6} ({:3}/{}/{:2})", dh->firstTForbit, dh->tfCounter, dh->runNumber, feeId, cruID, endPoint,
link);
203 if (std::find(mCRUs.begin(), mCRUs.end(), cruID) == mCRUs.end()) {
204 LOGP(
error,
"IDC CRU {:3} not configured in CRUs, skipping", cruID);
208 const CRU cru(cruID);
210 const auto& partInfo = mapper.getPartitionInfo(cru.
partition());
211 const int fecLinkOffsetCRU = (partInfo.getNumberOfFECs() + 1) / 2;
212 const int fecSectorOffset = partInfo.getSectorFECOffset();
215 int sampaOnFEC{}, channelOnSAMPA{};
216 auto& idcVec = mIDCvectors[cruID];
217 auto& infoVec = mIDCInfos[cruID];
220 auto data = it.data();
226 auto infoIt = std::find(infoVec.begin(), infoVec.end(),
orbit);
227 if (!infoVec.size()) {
228 infoVec.emplace_back(
orbit,
bc);
229 infoIt = infoVec.end() - 1;
230 }
else if (infoIt == infoVec.end()) {
231 auto& lastInfo = infoVec.back();
232 if ((
orbit - lastInfo.heartbeatOrbit) != mNOrbitsIDC) {
233 LOGP(
error,
"received packet with invalid jump in idc orbit ({} - {} == {} != {})",
orbit, lastInfo.heartbeatOrbit,
int(
orbit) -
int(lastInfo.heartbeatOrbit), mNOrbitsIDC);
236 infoVec.emplace_back(
orbit,
bc);
237 infoIt = infoVec.end() - 1;
241 auto& lastInfo = *infoIt;
242 if (lastInfo.wasEPseen(endPoint)) {
243 LOGP(
debug,
"Already received another data packet for CRU {}, ep {}, orbit {}, bc {}", cruID, endPoint,
orbit,
bc);
247 lastInfo.setEPseen(endPoint);
249 const size_t idcOffset = std::distance(infoVec.begin(), infoIt);
254 const float norm = 1. /
float(mTimeStampsPerIntegrationInterval);
256 const uint32_t iLink = mSwapLinks ? (idc::Links - iLinkTmp - 1) : iLinkTmp;
258 if (!idcs.hasLink(iLink)) {
262 const int fecInSector = iLinkTmp + endPoint * fecLinkOffsetCRU + fecSectorOffset;
264 for (
uint32_t iChannel = 0; iChannel < idc::Channels; ++iChannel) {
265 auto val = idcs.getChannelValueFloat(iLink, iChannel);
267 const GlobalPadNumber padInSector = mapper.globalPadNumber(fecInSector, sampaOnFEC, channelOnSAMPA);
269 val -= pedestals->
getValue(
sector, padInSector) * mTimeStampsPerIntegrationInterval;
273 const GlobalPadNumber vectorPosition = padInRegion + idcOffset * numberPads;
278 idcVec[vectorPosition] =
val;
282 }
catch (
const std::exception&
e) {
284 using namespace std::literals::chrono_literals;
285 static std::unordered_map<uint32_t, size_t> nErrorPerSubspec;
286 static std::chrono::time_point<std::chrono::steady_clock> lastReport = std::chrono::steady_clock::now();
287 const auto now = std::chrono::steady_clock::now();
288 static size_t reportedErrors = 0;
289 const size_t MAXERRORS = 10;
291 ++nErrorPerSubspec[subSpecification];
294 if (reportedErrors < MAXERRORS) {
296 std::string sleepInfo;
297 if (reportedErrors == MAXERRORS) {
298 sleepInfo = fmt::format(
", maximum error count ({}) reached, not reporting for the next {}", MAXERRORS,
sleepTime);
300 LOGP(alarm,
"EXCEPTIION in processRawData: {} -> skipping part:{}/{} of spec:{}/{}/{}, size:{}, error count for subspec: {}{}",
e.what(), dh->splitPayloadIndex, dh->splitPayloadParts,
301 dh->dataOrigin, dh->dataDescription, subSpecification, payloadSize, nErrorPerSubspec.at(subSpecification), sleepInfo);
312 hasErrors |= snapshotIDCs(pc.outputs(), tfCounter);
314 if (mWriteDebug || (mWriteDebugOnError && hasErrors)) {
315 writeDebugOutput(tfCounter);
318 if (mWriteRawDataOnError && hasErrors) {
319 writeRawData(pc.inputs());
328 LOGP(info,
"closeFiles");
332 auto&
stream = (*mDebugStream) <<
"idcs";
334 tree.SetAlias(
"sector",
"int(cru/10)");
335 mDebugStream->Close();
336 mDebugStream.reset(
nullptr);
337 mRawOutputFile.close();
349 LOGP(info,
"endOfStream");
358 IDCInfo(
const IDCInfo&) =
default;
366 bool operator==(
const IDCInfo& inf)
const {
return (inf.heartbeatOrbit == heartbeatOrbit) && (inf.heartbeatBC == heartbeatBC) && (inf.epSeen == epSeen); }
369 bool matches(
uint32_t orbit, int16_t
bc)
const {
return ((heartbeatOrbit ==
orbit) && (heartbeatBC ==
bc)); }
370 bool hasBothEPs()
const {
return epSeen == 3; }
373 const int mNOrbitsIDC{12};
374 const int mTimeStampsPerIntegrationInterval{(LHCMaxBunches * mNOrbitsIDC) / LHCBCPERTIMEBIN};
377 bool mSwapLinks{
false};
378 bool mWriteDebug{
false};
379 bool mWriteDebugOnError{
false};
380 bool mWriteRawDataOnError{
false};
381 std::vector<uint32_t> mCRUs;
382 std::unordered_map<uint32_t, std::vector<float>> mIDCvectors;
383 std::unordered_map<uint32_t, std::vector<IDCInfo>> mIDCInfos;
384 std::string mDebugStreamFileName;
385 std::unique_ptr<o2::utils::TreeStreamRedirector> mDebugStream;
386 std::unique_ptr<CalPad> mPedestal{};
387 std::ofstream mRawOutputFile;
388 std::string mRawOutputFileName;
393 LOGP(
debug,
"snapshotIDCs");
396 size_t packetsInTF = 0;
397 std::vector<IDCInfo>
const* infVecComp =
nullptr;
398 std::vector<uint64_t> orbitBCInfo;
399 bool hasErrors =
false;
401 for (
const auto& [cru, infVec] : mIDCInfos) {
402 packetsInTF = std::max(infVec.size(), packetsInTF);
405 for (
const auto& [cru, infVec] : mIDCInfos) {
407 for (
const auto& inf : infVec) {
408 if (!inf.hasBothEPs()) {
409 LOGP(warning,
"IDC CRU {:3}: data missing at ({:8}, {:4}) for one or both end points {:02b} in TF {}", cru, inf.heartbeatOrbit, inf.heartbeatBC, inf.epSeen, tfCounter);
415 infVecComp = &infVec;
416 std::for_each(infVec.begin(), infVec.end(), [&orbitBCInfo](
const auto& inf) { orbitBCInfo.emplace_back((uint64_t(inf.heartbeatOrbit) << 32) + uint64_t(inf.heartbeatBC)); });
420 if (packetsInTF != infVec.size()) {
421 LOGP(
error,
"IDC CRU {:3}: number of IDC packets {} does not match max over all CRUs {} in TF {}", cru, packetsInTF, infVec.size(), tfCounter);
425 if (!std::equal(infVecComp->begin(), infVecComp->end(), infVec.begin())) {
426 LOGP(warning,
"IDC CRU {:3}: mismatch in orbit numbers", cru);
432 for (
auto& [cru, idcVec] : mIDCvectors) {
435 LOGP(
debug,
"Sending IDCs for CRU {} of size {}", cru, idcVec.size());
446 for (
const auto cruID : mCRUs) {
447 const CRU cru(cruID);
449 auto& idcVec = mIDCvectors[cruID];
450 idcVec.resize(numberPads);
451 std::fill(idcVec.begin(), idcVec.end(), -1.f);
453 auto& infosCRU = mIDCInfos[cruID];
459 void writeDebugOutput(
uint32_t tfCounter)
463 mDebugStream->GetFile()->cd();
464 auto&
stream = (*mDebugStream) <<
"idcs";
466 static uint32_t firstOrbit = std::numeric_limits<uint32_t>::max();
468 for (
auto cru : mCRUs) {
469 if (mIDCInfos.find(cru) == mIDCInfos.end()) {
472 auto& infos = mIDCInfos[cru];
473 auto& idcVec = mIDCvectors[cru];
475 for (
int i = 0;
i < infos.size(); ++
i) {
476 auto&
info = infos[
i];
478 if (firstOrbit == std::numeric_limits<uint32_t>::max()) {
479 firstOrbit =
info.heartbeatOrbit;
483 std::vector<float> idcs(idcFirst, idcLast);
484 std::vector<short> cpad(idcs.size());
485 std::vector<short>
row(idcs.size());
486 for (
int ipad = 0; ipad < idcs.size(); ++ipad) {
488 row[ipad] = (short)padPos.getRow();
489 const short pads = (short)mapper.getNumberOfPadsInRowSector(
row[ipad]);
490 cpad[ipad] = (short)padPos.getPad() - pads / 2;
493 std::sort(idcSort.begin(), idcSort.end());
494 const auto idcSize = idcSort.size();
495 float median = idcSize % 2 ? idcSort[idcSize / 2] : (idcSort[idcSize / 2] + idcSort[idcSize / 2 - 1]) / 2.f;
497 auto itEnd = idcSort.end();
498 while (std::abs(*(itEnd - 1) - median) > 40) {
503 const auto nForMean = std::distance(idcSort.begin(), itEnd);
505 mean = std::accumulate(idcSort.begin(), itEnd, 0.f) /
float(nForMean);
511 <<
"epSeen=" <<
info.epSeen
513 <<
"firstOrbit=" << firstOrbit
514 <<
"orbit=" <<
info.heartbeatOrbit
515 <<
"bc=" <<
info.heartbeatBC
519 <<
"outliers=" << outliers
520 <<
"idc_mean=" <<
mean
521 <<
"idc_median=" <<
median
529 if (!mRawOutputFile.is_open()) {
537 auto dh = DataRefUtils::getHeader<header::DataHeader*>(
ref);
543 if (mRawDataType < 2) {
546 if (mRawDataType < 4) {
547 mRawOutputFile.write(
ref.payload,
ref.payloadSize);
550 if (mRawDataType == 4) {
551 const gsl::span<const char>
raw = inputs.
get<gsl::span<char>>(
ref);
554 for (
auto it = parser.begin(),
end = parser.end(); it !=
end; ++it) {
555 const auto size = it.size();
563 if (!rdhPtr || rdhVersion < 6) {
564 throw std::runtime_error(fmt::format(
"could not get RDH from packet, or version {} < 6", rdhVersion).
data());
568 const auto feeId = (
FEEIDType)RDHUtils::getFEEID(*rdhPtr);
569 const auto link = rdh_utils::getLink(feeId);
570 const auto detField = RDHUtils::getDetectorField(*rdhPtr);
573 if ((detField != (
decltype(detField))RawDataType::IDC) || (
link != rdh_utils::IDCLinkID)) {
578 mRawOutputFile.write((
const char*)it.raw(), RDHUtils::getMemorySize(rdhPtr));
591 std::vector<OutputSpec> outputs;
594 outputs.emplace_back(gDataOriginTPC,
"IDCVECTOR", subSpec, Lifetime::Timeframe);
595 outputs.emplace_back(gDataOriginTPC,
"IDCORBITS", subSpec, Lifetime::Timeframe);
599 fmt::format(
"tpc-idc-to-vector"),
604 {
"write-debug", VariantType::Bool,
false, {
"write a debug output tree"}},
605 {
"write-debug-on-error", VariantType::Bool,
false, {
"write a debug output tree in case errors occurred"}},
606 {
"debug-file-name", VariantType::String,
"/tmp/idc_vector_debug.{run}.root", {
"name of the debug output file"}},
607 {
"write-raw-data-on-error", VariantType::Bool,
false, {
"dump raw data in case errors occurred"}},
608 {
"raw-file-name", VariantType::String,
"/tmp/idc_debug.{run}.{raw_type}", {
"name of the raw output file"}},
609 {
"raw-data-type", VariantType::Int, 0, {
"Which raw data to dump: 0-full TPC with DH, 1-full TPC with DH skip empty, 2-full TPC no DH, 3-full TPC no DH skip empty, 4-IDC raw only"}},
610 {
"check-incomplete-hbf", VariantType::Bool,
false, {
"false: don't chck; true: check and report"}},
611 {
"pedestal-url", VariantType::String,
"ccdb-default", {
"ccdb-default: load from NameConf::getCCDBServer() OR ccdb url (must contain 'ccdb' OR pedestal file name"}},
612 {
"swap-links", VariantType::Bool,
false, {
"swap links to circumvent bug in FW"}},
unsigned short int uint16_t
o2::raw::RawFileWriter * raw
configStandalone Light OpenGL display display_light Apply smoothing to points Enable Z buffer Highlight links Highlight seeds Highlight sector tracks Highlight final tracks Show individual sector
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 e
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone Processing proc_rtc Replace constant variables static by constexpr expressions Compile RTC in deterministic with NO_FAST_MATH flags and GPUCA_DETERMINISTIC_MODE define Use RTC to optimize GPU code h configStandalone Processing proc_rtctech Use a file lock to serialize access to the cache folder Print launch bounds used for RTC code as debugging for exit after Allow RTC with slave GPUReconstruction instances with optConstexpr and optSpecialcode Maximum number of RTC cache files per backend in the cache the oldest are Prepend RTC compilation commands by this string Load a parameter object containing the launch bounds from a file h configStandalone Processing proc_param TPC Cluster Z Error Parameterization h configStandalone Processing settings for neural network proc_nn std::string Specify inference device(cpu(default), rocm, cuda)") AddOption(nnInferenceDeviceId
configStandalone Reconstruction rec_tpc float
char error[CURL_ERROR_SIZE]
Integrated digital currents data format definition.
Header to collect LHC related constants.
Definition of the Names Generator class.
Generic parser for consecutive raw pages.
static std::string getCCDBServer()
static BasicCCDBManager & instance()
size_t getNErrors() const
const_iterator begin() const
const_iterator end() const
static void setCheckIncompleteHBF(bool v)
unsigned char region() const
const Sector sector() const
unsigned char partition() const
const T getValue(const int sec, const int globalPadInSector) const
IDCToVectorDevice(const std::vector< uint32_t > &crus)
void stop() final
This is invoked on stop.
void run(o2::framework::ProcessingContext &pc) final
void init(o2::framework::InitContext &ic) final
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
rdh_utils::FEEIDType FEEIDType
static constexpr unsigned int LinksPerRegionPerEndpoint[NREGIONS][NENDPOINTS]
number of links per region per end point
static constexpr unsigned int GLOBALPADOFFSET[NREGIONS]
offset of number of pads for region
static Mapper & instance(const std::string mappingDir="")
static constexpr unsigned int NREGIONS
total number of regions in one sector
static constexpr void getSampaAndChannelOnFEC(const int cruID, const size_t rawFECChannel, int &sampaOnFEC, int &channelOnSAMPA)
static constexpr unsigned int PADSPERREGION[NREGIONS]
number of pads per CRU
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
constexpr o2::header::DataOrigin gDataOriginTPC
double mean(std::vector< double >::const_iterator first, std::vector< double >::const_iterator last)
long getCurrentTimestamp()
returns the timestamp in long corresponding to "now"
Defining ITS Vertex explicitly as messageable.
std::vector< InputSpec > select(char const *matcher="")
R median(std::vector< T > v)
bool operator==(const DsChannelId &a, const DsChannelId &b)
uint64_t getRunNumber(o2::framework::ProcessingContext &pc)
std::vector< CalPad * > readCalPads(const std::string_view fileName, const std::vector< std::string > &calPadNames)
Global TPC definitions and constants.
o2::framework::DataProcessorSpec getIDCToVectorSpec(const std::string inputSpec, std::vector< uint32_t > const &crus)
unsigned short GlobalPadNumber
global pad number
static o2::header::DataHeader::PayloadSizeType getPayloadSize(const DataRef &ref)
static constexpr int getVersion()
get numeric version of the RDH
std::unique_ptr< TTree > tree((TTree *) flIn.Get(std::string(o2::base::NameConf::CTFTREENAME).c_str()))