Project
Loading...
Searching...
No Matches
HmpidDecodeRawFile.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
18
19#ifndef COMMON_HMPIDDECODERAWFILE_H_
20#define COMMON_HMPIDDECODERAWFILE_H_
21
22#include <ctype.h>
23#include <stdio.h>
24#include <stdlib.h>
25#include <unistd.h>
26#include <string.h>
27#include <unistd.h>
28
30
31#define MAXFILENAMEBUFFER 512
32#define MAXRAWFILEBUFFER RAWBLOCKDIMENSION_W * 4 + 8
33
34namespace o2
35{
36namespace hmpid
37{
38
40{
41 public:
42 HmpidDecodeRawFile(int* EqIds, int* CruIds, int* LinkIds, int numOfEquipments);
43 HmpidDecodeRawFile(int numOfEquipments);
45
46 bool setUpStream(void* InpuFileName, long Size);
47
48 private:
49 bool getBlockFromStream(uint32_t** streamPtr, uint32_t Size);
50 bool getHeaderFromStream(uint32_t** streamPtr);
51 bool getWordFromStream(uint32_t* word);
52 int fileExists(char* filewithpath);
53 void setPad(HmpidEquipment* eq, int col, int dil, int ch, uint16_t charge);
54
55 private:
56 FILE* fh;
57 char mInputFile[MAXFILENAMEBUFFER];
58 uint32_t mFileBuffer[MAXRAWFILEBUFFER];
59};
60
61} // namespace hmpid
62} // namespace o2
63#endif /* COMMON_HMPIDDECODERAWFILE_H_ */
int16_t charge
Definition RawEventData.h:5
#define MAXRAWFILEBUFFER
#define MAXFILENAMEBUFFER
Base Class to decode HMPID Raw Data stream.
uint32_t col
Definition RawData.h:4
bool setUpStream(void *InpuFileName, long Size)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...