Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 4 DataFormats/Detectors/ZDC/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# submit itself to any jurisdiction.

o2_add_library(DataFormatsZDC
SOURCES src/ChannelData.cxx src/BCData.cxx src/RecEvent.cxx
SOURCES src/ChannelData.cxx src/BCData.cxx src/RecEvent.cxx src/RawEventData.cxx
src/OrbitRawData.cxx src/OrbitRecData.cxx
PUBLIC_LINK_LIBRARIES O2::CommonConstants O2::CommonDataFormat
O2::ZDCBase ROOT::MathCore FairRoot::Base
Expand All @@ -18,4 +18,4 @@ o2_add_library(DataFormatsZDC
o2_target_root_dictionary(DataFormatsZDC
HEADERS include/DataFormatsZDC/BCData.h include/DataFormatsZDC/ChannelData.h
include/DataFormatsZDC/RecEvent.h include/DataFormatsZDC/OrbitRawData.h
include/DataFormatsZDC/OrbitRecData.h)
include/DataFormatsZDC/OrbitRecData.h include/DataFormatsZDC/RawEventData.h)
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ namespace zdc
constexpr unsigned short Id_w0 = 0x0;
constexpr unsigned short Id_w1 = 0x1;
constexpr unsigned short Id_w2 = 0x2;
constexpr unsigned short Id_wn = 0x3;
constexpr int NWPerGBTW = 4;

struct __attribute__((__packed__)) ChannelDataV0 {
Expand Down Expand Up @@ -79,11 +80,14 @@ struct __attribute__((__packed__)) ChannelDataV0 {
unsigned empty_5 : 32;
};

union EventChData {
UInt_t w[NWPerBc][NWPerGBTW];
struct ChannelDataV0 f;
void reset();
};

struct EventData {
union {
UInt_t w[NWPerBc][NWPerGBTW];
struct ChannelDataV0 f;
} data[NModules][NChPerModule] = {0};
EventChData data[NModules][NChPerModule] = {0};
void print() const;
void reset();
ClassDefNV(EventData, 1);
Expand Down
7 changes: 7 additions & 0 deletions 7 DataFormats/Detectors/ZDC/src/RawEventData.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ using namespace o2::zdc;

//ClassImp(EventData);

//______________________________________________________________________________
void EventChData::reset()
{
static constexpr int payloadSize = NWPerGBTW * sizeof(UInt_t);
memset((void*)&w[0][0], 0, payloadSize);
}

//______________________________________________________________________________
void EventData::print() const
{
Expand Down
1 change: 1 addition & 0 deletions 1 Detectors/ZDC/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
add_subdirectory(base)
add_subdirectory(simulation)
add_subdirectory(macro)
add_subdirectory(raw)
6 changes: 6 additions & 0 deletions 6 Detectors/ZDC/base/src/ModuleConfig.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

using namespace o2::zdc;

//______________________________________________________________________________
void Module::printCh() const
{
printf("Module %d [ChID/FEEID R:T ]", id);
Expand All @@ -23,6 +24,7 @@ void Module::printCh() const
printf("\n");
}

//______________________________________________________________________________
void Module::printTrig() const
{
printf("Trigger conf %d: ", id);
Expand All @@ -37,6 +39,7 @@ void Module::printTrig() const
printf("\n");
}

//______________________________________________________________________________
void Module::print() const
{
printCh();
Expand All @@ -58,13 +61,15 @@ void ModuleConfig::print() const
}
}

//______________________________________________________________________________
void ModuleConfig::check() const
{
for (const auto& md : modules) {
md.check();
}
}

//______________________________________________________________________________
void Module::check() const
{
// make sure that the channel has <= 2 triggers
Expand All @@ -78,6 +83,7 @@ void Module::check() const
}
}

//______________________________________________________________________________
void Module::setChannel(int slot, int8_t chID, int16_t fID, bool read, bool trig, int tF, int tL, int tS, int tT)
{
if (slot < 0 || slot >= MaxChannels || chID < 0 || chID > NChannels) {
Expand Down
31 changes: 31 additions & 0 deletions 31 Detectors/ZDC/raw/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright CERN and copyright holders of ALICE O2. This software is distributed
# under the terms of the GNU General Public License v3 (GPL Version 3), copied
# verbatim in the file "COPYING".
#
# See http://alice-o2.web.cern.ch/license for full licensing information.
#
# In applying this license CERN does not waive the privileges and immunities
# granted to it by virtue of its status as an Intergovernmental Organization or
# submit itself to any jurisdiction.

o2_add_library(ZDCRaw
SOURCES src/DumpRaw.cxx src/raw-parser.cxx
PUBLIC_LINK_LIBRARIES O2::SimulationDataFormat O2::ZDCBase O2::ZDCSimulation
O2::DataFormatsZDC O2::CCDB O2::SimConfig O2::DPLUtils
O2::DetectorsRaw O2::Headers)


o2_target_root_dictionary(ZDCRaw
HEADERS include/ZDCRaw/DumpRaw.h)

o2_add_executable(raw-parser
COMPONENT_NAME zdc
SOURCES src/raw-parser.cxx
PUBLIC_LINK_LIBRARIES O2::Framework
O2::DPLUtils
O2::ZDCSimulation
O2::ZDCRaw
O2::DetectorsRaw
O2::DetectorsCommonDataFormats
O2::CommonUtils)

40 changes: 40 additions & 0 deletions 40 Detectors/ZDC/raw/include/ZDCRaw/DumpRaw.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#include <TH1.h>
#include <TH2.h>
#include "ZDCBase/Constants.h"
#include "ZDCSimulation/ZDCSimParam.h"
#include "DataFormatsZDC/RawEventData.h"
#ifndef ALICEO2_ZDC_DUMPRAW_H_
#define ALICEO2_ZDC_DUMPRAW_H_
namespace o2
{
namespace zdc
{
class DumpRaw
{
public:
DumpRaw() = default;
void init();
int process(const EventData& ev);
int process(const EventChData& ch);
int processWord(const UInt_t* word);
int getHPos(uint32_t board, uint32_t ch);
void write();
void setVerbosity(int v)
{
mVerbosity = v;
}
int getVerbosity() const { return mVerbosity; }

private:
void setStat(TH1* h);
int mVerbosity = 1;
TH1* mBaseline[NDigiChannels] = {0};
TH1* mCounts[NDigiChannels] = {0};
TH2* mSignal[NDigiChannels] = {0};
TH2* mBunch[NDigiChannels] = {0};
EventChData mCh;
};
} // namespace zdc
} // namespace o2

#endif
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.