Skip to content

Commit 02b2924

Browse files
committed
Definition of MID CTF
1 parent 3151795 commit 02b2924

File tree

4 files changed

+82
-3
lines changed

4 files changed

+82
-3
lines changed

DataFormats/Detectors/MUON/MID/CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@
99
# submit itself to any jurisdiction.
1010

1111
o2_add_library(DataFormatsMID
12-
SOURCES src/ColumnData.cxx src/Track.cxx
13-
PUBLIC_LINK_LIBRARIES Boost::serialization O2::MathUtils
12+
SOURCES src/ColumnData.cxx
13+
src/Track.cxx
14+
src/CTF.cxx
15+
PUBLIC_LINK_LIBRARIES Boost::serialization O2::MathUtils
16+
O2::CommonDataFormat
17+
O2::DetectorsCommonDataFormats
1418
O2::ReconstructionDataFormats)
1519

1620
o2_target_root_dictionary(DataFormatsMID
1721
HEADERS include/DataFormatsMID/Cluster2D.h
1822
include/DataFormatsMID/Cluster3D.h
1923
include/DataFormatsMID/ColumnData.h
2024
include/DataFormatsMID/ROFRecord.h
21-
include/DataFormatsMID/Track.h)
25+
include/DataFormatsMID/Track.h
26+
include/DataFormatsMID/CTF.h)
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// Copyright CERN and copyright holders of ALICE O2. This software is
2+
// distributed under the terms of the GNU General Public License v3 (GPL
3+
// Version 3), copied verbatim in the file "COPYING".
4+
//
5+
// See http://alice-o2.web.cern.ch/license for full licensing information.
6+
//
7+
// In applying this license CERN does not waive the privileges and immunities
8+
// granted to it by virtue of its status as an Intergovernmental Organization
9+
// or submit itself to any jurisdiction.
10+
11+
/// \file CTF.h
12+
/// \author ruben.shahoyan@cern.ch
13+
/// \brief Definitions for MID CTF data
14+
15+
#ifndef O2_MID_CTF_H
16+
#define O2_MID_CTF_H
17+
18+
#include <vector>
19+
#include <Rtypes.h>
20+
#include "DetectorsCommonDataFormats/EncodedBlocks.h"
21+
#include "DataFormatsMID/ROFRecord.h"
22+
#include "DataFormatsMID/ColumnData.h"
23+
24+
namespace o2
25+
{
26+
namespace mid
27+
{
28+
29+
/// Header for a single CTF
30+
struct CTFHeader {
31+
uint32_t nROFs = 0; /// number of ROFrames in TF
32+
uint32_t nColumns = 0; /// number of referred columns in TF
33+
uint32_t firstOrbit = 0; /// 1st orbit of TF
34+
uint16_t firstBC = 0; /// 1st BC of TF
35+
36+
ClassDefNV(CTFHeader, 1);
37+
};
38+
39+
/// wrapper for the Entropy-encoded clusters of the TF
40+
struct CTF : public o2::ctf::EncodedBlocks<CTFHeader, 7, uint32_t> {
41+
42+
static constexpr size_t N = getNBlocks();
43+
enum Slots { BLC_bcIncROF,
44+
BLC_orbitIncROF,
45+
BLC_entriesROF,
46+
BLC_evtypeROF,
47+
BLC_pattern,
48+
BLC_deId,
49+
BLC_colId };
50+
ClassDefNV(CTF, 1);
51+
};
52+
53+
} // namespace mid
54+
} // namespace o2
55+
56+
#endif
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright CERN and copyright holders of ALICE O2. This software is
2+
// distributed under the terms of the GNU General Public License v3 (GPL
3+
// Version 3), copied verbatim in the file "COPYING".
4+
//
5+
// See http://alice-o2.web.cern.ch/license for full licensing information.
6+
//
7+
// In applying this license CERN does not waive the privileges and immunities
8+
// granted to it by virtue of its status as an Intergovernmental Organization
9+
// or submit itself to any jurisdiction.
10+
11+
#include <stdexcept>
12+
#include <cstring>
13+
#include "DataFormatsMID/CTF.h"
14+
15+
using namespace o2::mid;

DataFormats/Detectors/MUON/MID/src/DataFormatsMIDLinkDef.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,7 @@
2222
#pragma link C++ class std::vector < o2::mid::ROFRecord > +;
2323
#pragma link C++ struct o2::mid::Track + ;
2424

25+
#pragma link C++ struct o2::mid::CTFHeader + ;
26+
#pragma link C++ struct o2::mid::CTF + ;
27+
#pragma link C++ class o2::ctf::EncodedBlocks < o2::mid::CTFHeader, 7, uint32_t> + ;
2528
#endif

0 commit comments

Comments
 (0)