Project
Loading...
Searching...
No Matches
DigitizerTest.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 DETECTORS_ZDC_DIGITIZER_TEST_H_
13#define DETECTORS_ZDC_DIGITIZER_TEST_H_
14
23#include <vector>
24#include <array>
25#include <deque>
26#include <bitset>
27
31
32namespace o2
33{
34namespace zdc
35{
36
37class SimCondition;
38
40{
41 public:
42 DigitizerTest() = default;
43 ~DigitizerTest() = default;
44 void setCCDBServer(const std::string& s) { mCCDBServer = s; }
45 void setMask(uint32_t ich, uint32_t mask);
46 void init();
48 double add(int ic, float myAmp, const o2::InteractionRecord irpk,
49 float myShift, bool hasJitter = true);
50 const std::vector<o2::zdc::OrbitData>& getZDCOrbitData() const { return zdcOrbitData; }
51 const std::vector<o2::zdc::BCData>& getZDCBCData() const { return zdcBCData; }
52 const std::vector<o2::zdc::ChannelData>& getZDCChannelData() const { return zdcChData; }
53 void digitize();
54 void clear();
55
56 private:
57 // TODO: these should be common with Digitizer.h
58 static constexpr int BCCacheMin = -1, BCCacheMax = 5, NBC2Cache = 1 + BCCacheMax - BCCacheMin;
59 std::string mCCDBServer = "";
60 SimCondition* mSimCondition = nullptr;
61 ModuleConfig* mModuleConfig = nullptr;
62 uint32_t mMask[NChannels] = {0};
63 std::deque<Digitizer::BCCache> mCache; // cached BCs data
64 BCData& getCreateBCData(const o2::InteractionRecord& ir);
65 Digitizer::BCCache* getBCCache(const o2::InteractionRecord& ir);
66 std::vector<o2::zdc::OrbitData> zdcOrbitData;
67 std::vector<o2::zdc::BCData> zdcBCData;
68 std::vector<o2::zdc::ChannelData> zdcChData;
69};
70
71} // namespace zdc
72} // namespace o2
73
74#endif /* DETECTORS_ZDC_DIGITIZER_TEST_H_ */
Class to describe fired triggered and/or stored channels for the BC and to refer to channel data.
Class to describe pedestal data accumulated over the orbit.
Container class to store NTimeBinsPerBC ADC values of single ZDC channel.
double add(int ic, float myAmp, const o2::InteractionRecord irpk, float myShift, bool hasJitter=true)
const std::vector< o2::zdc::OrbitData > & getZDCOrbitData() const
void setCCDBServer(const std::string &s)
const std::vector< o2::zdc::ChannelData > & getZDCChannelData() const
o2::zdc::Digitizer::BCCache & getCreateBCCache(const o2::InteractionRecord &ir)
void setMask(uint32_t ich, uint32_t mask)
const std::vector< o2::zdc::BCData > & getZDCBCData() const
GLint GLuint mask
Definition glcorearb.h:291
struct o2::upgrades_utils::@463 zdc
structure to keep FT0 information
constexpr int NChannels
Definition Constants.h:65
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
o2::InteractionRecord ir(0, 0)