Skip to content

Commit 19b5df1

Browse files
authored
Merge 897cc11 into sapling-pr-archive-ktf
2 parents 2c64c54 + 897cc11 commit 19b5df1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1373
-49
lines changed

DataFormats/Detectors/GlobalTracking/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ o2_add_library(
3636
O2::DataFormatsCPV
3737
O2::DataFormatsPHOS
3838
O2::DataFormatsEMCAL
39-
O2::GPUDataTypeHeaders
39+
O2::GPUDataTypes
4040
$<$<BOOL:${ENABLE_UPGRADES}>:O2::ITS3Reconstruction>
4141
PRIVATE_LINK_LIBRARIES
4242
O2::Framework)

Detectors/Base/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ o2_add_library(DetectorsBase
4242
O2::SimulationDataFormat
4343
O2::SimConfig
4444
O2::CCDB
45-
O2::GPUDataTypeHeaders
45+
O2::GPUDataTypes
4646
MC::VMC
4747
TBB::tbb
4848
)

Detectors/TPC/base/include/TPCBase/CDBTypes.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ enum class CDBType {
3434
CalLaserTracks, ///< Laser track calibration data
3535
CalVDriftTgl, ///< ITS-TPC difTgl vdrift calibration
3636
CalTimeGain, ///< Gain variation over time
37+
CalTimeGainMC, ///< Gain variation over time for MC
3738
CalGas, ///< DCS gas measurements
3839
CalTemperature, ///< DCS temperature measurements
3940
CalHV, ///< DCS HV measurements
@@ -98,6 +99,7 @@ const std::unordered_map<CDBType, const std::string> CDBTypeMap{
9899
{CDBType::CalPadGainResidual, "TPC/Calib/PadGainResidual"},
99100
{CDBType::CalLaserTracks, "TPC/Calib/LaserTracks"},
100101
{CDBType::CalTimeGain, "TPC/Calib/TimeGain"},
102+
{CDBType::CalTimeGainMC, "TPC/Calib/TimeGainMC"},
101103
{CDBType::CalGas, "TPC/Calib/Gas"},
102104
{CDBType::CalTemperature, "TPC/Calib/Temperature"},
103105
{CDBType::CalHV, "TPC/Calib/HV"},

Detectors/TPC/base/include/TPCBase/ParameterGEM.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@ struct ParameterGEM : public o2::conf::ConfigurableParamHelper<ParameterGEM> {
6262
O2ParamDef(ParameterGEM, "TPCGEMParam");
6363
};
6464
} // namespace tpc
65+
66+
namespace framework
67+
{
68+
template <typename T>
69+
struct is_messageable;
70+
template <>
71+
struct is_messageable<o2::tpc::ParameterGEM> : std::true_type {
72+
};
73+
} // namespace framework
74+
6575
} // namespace o2
6676

6777
#endif // ALICEO2_TPC_ParameterGEM_H_

Detectors/TPC/base/include/TPCBase/ParameterGas.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ struct ParameterGas : public o2::conf::ConfigurableParamHelper<ParameterGas> {
4747
};
4848

4949
} // namespace tpc
50+
51+
namespace framework
52+
{
53+
template <typename T>
54+
struct is_messageable;
55+
template <>
56+
struct is_messageable<o2::tpc::ParameterGas> : std::true_type {
57+
};
58+
} // namespace framework
59+
5060
} // namespace o2
5161

5262
#endif // ALICEO2_TPC_ParameterGas_H_

Detectors/TPC/workflow/include/TPCWorkflow/RecoWorkflow.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ framework::WorkflowSpec getWorkflow(CompletionPolicyData* policyData,
8686
bool askDISTSTF = true,
8787
bool selIR = false,
8888
bool filteredInp = false,
89-
int deadMapSources = -1);
89+
int deadMapSources = -1,
90+
bool useMCTimeGain = false);
9091

9192
void cleanupCallback();
9293

Detectors/TPC/workflow/src/RecoWorkflow.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const std::unordered_map<std::string, OutputType> OutputMap{
100100

101101
framework::WorkflowSpec getWorkflow(CompletionPolicyData* policyData, std::vector<int> const& tpcSectors, unsigned long tpcSectorMask, std::vector<int> const& laneConfiguration,
102102
const o2::tpc::CorrectionMapsLoaderGloOpts& sclOpts, bool propagateMC, unsigned nLanes, std::string const& cfgInput, std::string const& cfgOutput, bool disableRootInput,
103-
int caClusterer, int zsOnTheFly, bool askDISTSTF, bool selIR, bool filteredInp, int deadMapSources)
103+
int caClusterer, int zsOnTheFly, bool askDISTSTF, bool selIR, bool filteredInp, int deadMapSources, bool useMCTimeGain)
104104
{
105105
InputType inputType;
106106
try {
@@ -473,6 +473,7 @@ framework::WorkflowSpec getWorkflow(CompletionPolicyData* policyData, std::vecto
473473
cfg.askDISTSTF = askDISTSTF;
474474
cfg.tpcTriggerHandling = isEnabled(OutputType::TPCTriggers) || cfg.caClusterer;
475475
cfg.tpcDeadMapSources = deadMapSources;
476+
cfg.tpcUseMCTimeGain = useMCTimeGain;
476477

477478
Inputs ggInputs;
478479
auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(false, true, false, true, true, o2::base::GRPGeomRequest::Aligned, ggInputs, true);

Detectors/TPC/workflow/src/tpc-reco-workflow.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
7272
{"filtered-input", VariantType::Bool, false, {"Filtered tracks, clusters input, prefix dataDescriptors with F"}},
7373
{"select-ir-frames", VariantType::Bool, false, {"Subscribe and filter according to external IR Frames"}},
7474
{"tpc-deadMap-sources", VariantType::Int, -1, {"Sources to consider for TPC dead channel map creation; -1=all, 0=deactivated"}},
75+
{"tpc-mc-time-gain", VariantType::Bool, false, {"use time gain calibration for MC (true) or for data (false)"}},
7576
};
7677
o2::tpc::CorrectionMapsLoader::addGlobalOptions(options);
7778
o2::raw::HBFUtilsInitializer::addConfigOption(options);
@@ -185,7 +186,8 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
185186
!cfgc.options().get<bool>("ignore-dist-stf"), //
186187
cfgc.options().get<bool>("select-ir-frames"),
187188
cfgc.options().get<bool>("filtered-input"),
188-
cfgc.options().get<int>("tpc-deadMap-sources"));
189+
cfgc.options().get<int>("tpc-deadMap-sources"),
190+
cfgc.options().get<bool>("tpc-mc-time-gain"));
189191

190192
// configure dpl timer to inject correct firstTForbit: start from the 1st orbit of TF containing 1st sampled orbit
191193
o2::raw::HBFUtilsInitializer hbfIni(cfgc, wf);

Detectors/TRD/workflow/io/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ o2_add_library(TRDWorkflowIO
2323
src/TRDCalibWriterSpec.cxx
2424
src/TRDPHReaderSpec.cxx
2525
include/TRDWorkflowIO/KrClusterWriterSpec.h
26-
PUBLIC_LINK_LIBRARIES O2::DataFormatsTRD O2::SimulationDataFormat O2::DPLUtils O2::GPUDataTypeHeaders O2::DataFormatsTPC)
26+
PUBLIC_LINK_LIBRARIES O2::DataFormatsTRD O2::SimulationDataFormat O2::DPLUtils O2::GPUDataTypes O2::DataFormatsTPC)
2727

2828

2929
o2_add_executable(digit-reader-workflow

Framework/Core/include/Framework/RootArrowFilesystem.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ class TTreeFileSystem : public VirtualRootFileSystemBase
8787
{
8888
return std::dynamic_pointer_cast<VirtualRootFileSystemBase>(shared_from_this());
8989
};
90+
91+
arrow::Result<std::shared_ptr<arrow::io::OutputStream>> OpenOutputStream(
92+
const std::string& path,
93+
const std::shared_ptr<const arrow::KeyValueMetadata>& metadata) override;
94+
9095
virtual TTree* GetTree(arrow::dataset::FileSource source) = 0;
9196
};
9297

@@ -128,6 +133,10 @@ class TFileFileSystem : public VirtualRootFileSystemBase
128133

129134
std::shared_ptr<VirtualRootFileSystemBase> GetSubFilesystem(arrow::dataset::FileSource source) override;
130135

136+
arrow::Result<std::shared_ptr<arrow::io::OutputStream>> OpenOutputStream(
137+
const std::string& path,
138+
const std::shared_ptr<const arrow::KeyValueMetadata>& metadata) override;
139+
131140
// We can go back to the TFile in case this is needed.
132141
TDirectoryFile* GetFile()
133142
{
@@ -218,6 +227,29 @@ class TTreeFileFormat : public arrow::dataset::FileFormat
218227
const std::shared_ptr<arrow::dataset::FileFragment>& fragment) const override;
219228
};
220229

230+
// An arrow outputstream which allows to write to a ttree
231+
class TTreeOutputStream : public arrow::io::OutputStream
232+
{
233+
public:
234+
TTreeOutputStream(TTree* t);
235+
236+
arrow::Status Close() override;
237+
238+
arrow::Result<int64_t> Tell() const override;
239+
240+
arrow::Status Write(const void* data, int64_t nbytes) override;
241+
242+
bool closed() const override;
243+
244+
TTree* GetTree()
245+
{
246+
return mTree;
247+
}
248+
249+
private:
250+
TTree* mTree;
251+
};
252+
221253
} // namespace o2::framework
222254

223255
#endif // O2_FRAMEWORK_ROOT_ARROW_FILESYSTEM_H_

0 commit comments

Comments
 (0)