Project
Loading...
Searching...
No Matches
ClustersReaderSpec.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 DETECTORS_HMPID_WORKFLOW_INCLUDE_HMPIDWORKFLOW_CLUSTERSREADERSPEC_H_
20
#define DETECTORS_HMPID_WORKFLOW_INCLUDE_HMPIDWORKFLOW_CLUSTERSREADERSPEC_H_
21
22
// ROOT
23
#include <TFile.h>
24
#include <TTree.h>
25
26
#include "
Framework/DataProcessorSpec.h
"
27
#include "
Framework/Task.h
"
28
#include "
Framework/WorkflowSpec.h
"
29
30
#include "
HMPIDBase/Common.h
"
31
#include "
HMPIDBase/Geo.h
"
32
#include "
HMPIDReconstruction/Clusterer.h
"
33
#include "
DataFormatsHMP/Cluster.h
"
34
#include "
DataFormatsHMP/Trigger.h
"
35
36
namespace
o2
37
{
38
namespace
hmpid
39
{
40
41
class
ClusterReaderTask
:
public
framework::Task
42
{
43
public
:
44
ClusterReaderTask
() =
default
;
45
// : mReadFile(readFile) {}
46
~ClusterReaderTask
()
override
=
default
;
47
48
void
init
(
framework::InitContext
& ic)
final
;
49
50
void
run
(
framework::ProcessingContext
& pc)
final
;
51
// void endOfStream(framework::EndOfStreamContext& ec) override;
52
53
private
:
54
bool
mReadFile =
false
;
55
void
initFileIn(
const
std::string&
filename
);
56
57
long
mClustersReceived;
58
ExecutionTimer
mExTimer;
59
60
std::unique_ptr<TFile> mFile;
// root file with Clusters
61
std::unique_ptr<TTree> mTree;
// tree inside the file
62
std::vector<o2::hmpid::Trigger> mClusterTriggersFromFile, *mClusterTriggersFromFilePtr = &mClusterTriggersFromFile;
63
std::vector<o2::hmpid::Cluster> mClustersFromFile, *mClustersFromFilePtr = &mClustersFromFile;
64
65
unsigned
long
mNumberOfEntries = 0;
// number of entries from TTree
66
unsigned
long
mCurrentEntry = 0;
// index of current entry
67
68
// void strToFloatsSplit(std::string s, std::string delimiter, float* res, int maxElem = 7);
69
};
70
71
o2::framework::DataProcessorSpec
getClusterReaderSpec
();
72
73
}
// end namespace hmpid
74
}
// end namespace o2
75
76
#endif
Common.h
Cluster.h
Trigger.h
DataProcessorSpec.h
Geo.h
Clusterer.h
Definition of the HMPID cluster finder.
Task.h
WorkflowSpec.h
o2::framework::InitContext
Definition
InitContext.h:25
o2::framework::ProcessingContext
Definition
ProcessingContext.h:27
o2::framework::Task
Definition
Task.h:32
o2::hmpid::ClusterReaderTask
Definition
ClustersReaderSpec.h:42
o2::hmpid::ClusterReaderTask::~ClusterReaderTask
~ClusterReaderTask() override=default
o2::hmpid::ClusterReaderTask::init
void init(framework::InitContext &ic) final
Definition
ClustersReaderSpec.cxx:55
o2::hmpid::ClusterReaderTask::ClusterReaderTask
ClusterReaderTask()=default
o2::hmpid::ClusterReaderTask::run
void run(framework::ProcessingContext &pc) final
Definition
ClustersReaderSpec.cxx:67
o2::hmpid::ExecutionTimer
HMPID Derived class for the Time of Workflows.
Definition
Common.h:34
o2::hmpid::getClusterReaderSpec
o2::framework::DataProcessorSpec getClusterReaderSpec()
Definition
ClustersReaderSpec.cxx:133
o2
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Definition
BitstreamReader.h:24
filename
std::string filename()
Definition
o2FairMQHeaderSizeTest.cxx:55
o2::framework::DataProcessorSpec
Definition
DataProcessorSpec.h:41
Detectors
HMPID
workflow
include
HMPIDWorkflow
ClustersReaderSpec.h
Generated on Tue Feb 25 2025 23:16:18 for Project by
1.9.8