17#ifndef O2_TPCDISTRIBUTESACSPEC_H
18#define O2_TPCDISTRIBUTESACSPEC_H
41 : mTimeFrames{timeframes}, mOutLanes{outlanes}
44 mDataDescrOut.reserve(mOutLanes);
45 for (
int i = 0;
i < mOutLanes; ++
i) {
52 const auto& sacPoint = pc.inputs().get<std::vector<o2::tpc::sac::DataPoint>>(
"sac");
53 for (
const auto&
val : sacPoint) {
55 const auto sac =
val.currents[
stack];
56 mSACs[
stack].emplace_back(sac);
60 if (mCCDBTimeStamp == 0 && !sacPoint.empty()) {
61 const auto reftime = pc.inputs().get<
double>(
"reftime");
66 if (mProcessedTFs == mTimeFrames) {
69 mCurrentOutLane = ++mCurrentOutLane % mOutLanes;
71 for (
auto& sac : mSACs) {
87 const std::string
name = fmt::format(
"SACVEC{}", lane).data();
94 const unsigned int mTimeFrames{};
95 const unsigned int mOutLanes{};
97 std::array<std::vector<int32_t>, o2::tpc::GEMSTACKS> mSACs{};
98 unsigned int mCurrentOutLane{0};
100 std::vector<header::DataDescription> mDataDescrOut{};
104 LOGP(info,
"Sending SACs on lane: {} for {} TFs", mCurrentOutLane, mProcessedTFs);
106 for (
unsigned int i = 0;
i < o2::tpc::GEMSTACKS; ++
i) {
114 std::vector<InputSpec> inputSpecs;
115 inputSpecs.emplace_back(
InputSpec{
"sac", gDataOriginTPC,
"DECODEDSAC", 0, Lifetime::Sporadic});
116 inputSpecs.emplace_back(
InputSpec{
"reftime", gDataOriginTPC,
"REFTIMESAC", 0, Lifetime::Sporadic});
118 std::vector<OutputSpec> outputSpecs;
119 for (
unsigned int lane = 0; lane < outlanes; ++lane) {
125 "tpc-distribute-sac",
128 AlgorithmSpec{adaptFromTask<TPCDistributeSACSpec>(timeframes, outlanes)}};
header::DataDescription description
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
Decoding of integrated analogue currents.
void snapshot(const Output &spec, T const &object)
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
TPCDistributeSACSpec(const unsigned int timeframes, const unsigned int outlanes)
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
static header::DataDescription getDataDescriptionSACVec(const int lane)
return data description for aggregated SACs for given lane
void run(o2::framework::ProcessingContext &pc) final
static constexpr header::DataDescription getDataDescriptionSACCCDB()
static constexpr double SampleDistanceTimeMS
Time distance in MS between samples.
GLuint const GLchar * name
constexpr o2::header::DataOrigin gDataOriginTPC
Defining ITS Vertex explicitly as messageable.
Global TPC definitions and constants.
DataProcessorSpec getTPCDistributeSACSpec(const unsigned int timeframes, const unsigned int outlanes)