|
21 | 21 | #include "SimulationDataFormat/ConstMCTruthContainer.h" |
22 | 22 | #include "SimulationDataFormat/IOMCTruthContainerView.h" |
23 | 23 |
|
| 24 | +using namespace o2::framework; |
| 25 | + |
24 | 26 | namespace o2::iotof |
25 | 27 | { |
26 | 28 |
|
27 | 29 | TF3DigitReader::TF3DigitReader(o2::detectors::DetID id, bool useMC, bool useCalib) |
28 | 30 | { |
29 | | - assert(id == o2::detectors::DetID::TRK); |
| 31 | + assert(id == o2::detectors::DetID::TF3); |
30 | 32 | mDetNameLC = mDetName = id.getName(); |
31 | 33 | mDigTreeName = "o2sim"; |
32 | 34 |
|
@@ -66,7 +68,7 @@ void TF3DigitReader::run(o2::framework::ProcessingContext& pc) |
66 | 68 | pc.outputs().snapshot(Output{mOrigin, "DIGITSROF", 0}, mDigROFRec); |
67 | 69 | pc.outputs().snapshot(Output{mOrigin, "DIGITS", 0}, mDigits); |
68 | 70 | if (mUseCalib) { |
69 | | - pc.outputs().snapshot(Output{mOrigin, "GBTCALIB", 0}, mCalib); |
| 71 | + // pc.outputs().snapshot(Output{mOrigin, "GBTCALIB", 0}, mCalib); |
70 | 72 | } |
71 | 73 |
|
72 | 74 | if (mUseMC) { |
@@ -96,35 +98,35 @@ void TF3DigitReader::connectTree(const std::string& filename) |
96 | 98 | if (!mTree->GetBranch(mCalibBranchName.c_str())) { |
97 | 99 | throw std::runtime_error("GBT calibration data requested but not found in the tree"); |
98 | 100 | } |
99 | | - mTree->SetBranchAddress(mCalibBranchName.c_str(), &mCalibPtr); |
| 101 | + // mTree->SetBranchAddress(mCalibBranchName.c_str(), &mCalibPtr); |
100 | 102 | } |
101 | 103 | if (mUseMC) { |
102 | | - if (!mTree->GetBranch(mDigtMC2ROFBranchName.c_str()) || !mTree->GetBranch(mDigtMCTruthBranchName.c_str())) { |
| 104 | + if (!mTree->GetBranch(mDigtMCTruthBranchName.c_str())) { |
103 | 105 | throw std::runtime_error("MC data requested but not found in the tree"); |
104 | 106 | } |
105 | 107 | mTree->SetBranchAddress(mDigtMC2ROFBranchName.c_str(), &mDigMC2ROFsPtr); |
106 | 108 | } |
107 | 109 | LOG(info) << "Loaded tree from " << filename << " with " << mTree->GetEntries() << " entries"; |
108 | 110 | } |
109 | 111 |
|
110 | | -DataProcessorSpec getTRKDigitReaderSpec(bool useMC, bool useCalib, std::string defname) |
| 112 | +DataProcessorSpec getIOTOFDigitReaderSpec(bool useMC, bool useCalib, std::string defname) |
111 | 113 | { |
112 | 114 | std::vector<OutputSpec> outputSpec; |
113 | | - outputSpec.emplace_back("TRK", "DIGITS", 0, Lifetime::Timeframe); |
114 | | - outputSpec.emplace_back("TRK", "DIGITSROF", 0, Lifetime::Timeframe); |
| 115 | + outputSpec.emplace_back("TF3", "DIGITS", 0, Lifetime::Timeframe); |
| 116 | + outputSpec.emplace_back("TF3", "DIGITSROF", 0, Lifetime::Timeframe); |
115 | 117 | if (useCalib) { |
116 | | - outputSpec.emplace_back("TRK", "GBTCALIB", 0, Lifetime::Timeframe); |
| 118 | + // outputSpec.emplace_back("TF3", "GBTCALIB", 0, Lifetime::Timeframe); |
117 | 119 | } |
118 | 120 | if (useMC) { |
119 | | - outputSpec.emplace_back("TRK", "DIGITSMCTR", 0, Lifetime::Timeframe); |
120 | | - outputSpec.emplace_back("TRK", "DIGITSMC2ROF", 0, Lifetime::Timeframe); |
| 121 | + outputSpec.emplace_back("TF3", "DIGITSMCTR", 0, Lifetime::Timeframe); |
| 122 | + outputSpec.emplace_back("TF3", "DIGITSMC2ROF", 0, Lifetime::Timeframe); |
121 | 123 | } |
122 | 124 |
|
123 | 125 | return DataProcessorSpec{ |
124 | 126 | "iotof-digit-reader", |
125 | 127 | Inputs{}, |
126 | 128 | outputSpec, |
127 | | - AlgorithmSpec{adaptFromTask<TRKDigitReader>(useMC, useCalib)}, |
| 129 | + AlgorithmSpec{adaptFromTask<TF3DigitReader>(o2::detectors::DetID::TF3, useMC, useCalib)}, |
128 | 130 | Options{ |
129 | 131 | {"iotof-digit-infile", VariantType::String, defname, {"Name of the input digit file"}}}}; |
130 | 132 | } |
|
0 commit comments