Project
Loading...
Searching...
No Matches
Digits2Raw.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
15// based on FV0
16
17#ifndef ALICEO2_FDD_DIGITS2RAW_H_
18#define ALICEO2_FDD_DIGITS2RAW_H_
19
28#include <fairlogger/Logger.h>
29#include <TStopwatch.h>
30#include <iostream>
31#include <string>
32#include <vector>
33#include <gsl/span>
34
35namespace o2
36{
37namespace fdd
38{
40{
41 public:
42 Digits2Raw() = default;
43 void readDigits(const std::string& outDir, const std::string& fileDigitsName);
45 gsl::span<const ChannelData> pmchannels,
46 const o2::fdd::LookUpTable& lut);
47
48 o2::raw::RawFileWriter& getWriter() { return mWriter; }
49 void setFilePerLink(bool v) { mOutputPerLink = v; }
50 bool getFilePerLink() const { return mOutputPerLink; }
51
52 int carryOverMethod(const header::RDHAny* rdh, const gsl::span<char> data,
53 const char* ptr, int maxSize, int splitID,
54 std::vector<char>& trailer, std::vector<char>& header) const;
55
56 private:
57 static constexpr uint32_t sTcmLink = 2;
58 static constexpr uint16_t sCruId = 0;
59 static constexpr uint32_t sEndPointId = sCruId;
60
61 void makeGBTHeader(EventHeader& eventHeader, int link, o2::InteractionRecord const& mIntRecord);
62 void fillSecondHalfWordAndAddData(int iChannelPerLink, int prevPmLink, const o2::InteractionRecord& ir);
63 RawEventData mRawEventData;
64 o2::fdd::Triggers mTriggers;
65 o2::raw::RawFileWriter mWriter{"FDD"};
66 bool mOutputPerLink = false;
68
69 ClassDefNV(Digits2Raw, 1);
70};
71
72} // namespace fdd
73} // namespace o2
74#endif
Container class to store values of single FDD channel.
Definition of the RAW Data Header.
Utility class to write detectors data to (multiple) raw data file(s) respecting CRU format.
TBranch * ptr
int carryOverMethod(const header::RDHAny *rdh, const gsl::span< char > data, const char *ptr, int maxSize, int splitID, std::vector< char > &trailer, std::vector< char > &header) const
void setFilePerLink(bool v)
Definition Digits2Raw.h:49
void convertDigits(o2::fdd::Digit bcdigits, gsl::span< const ChannelData > pmchannels, const o2::fdd::LookUpTable &lut)
o2::raw::RawFileWriter & getWriter()
Definition Digits2Raw.h:48
bool getFilePerLink() const
Definition Digits2Raw.h:50
void readDigits(const std::string &outDir, const std::string &fileDigitsName)
const GLdouble * v
Definition glcorearb.h:832
GLboolean * data
Definition glcorearb.h:298
struct o2::upgrades_utils::@459 fdd
Collision labels.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
o2::InteractionRecord ir(0, 0)