|
10 | 10 | // or submit itself to any jurisdiction. |
11 | 11 |
|
12 | 12 | #include "DataFormatsCPV/CPVBlockHeader.h" |
| 13 | +#include "DataFormatsCPV/Cluster.h" |
| 14 | +#include "DataFormatsCPV/Digit.h" |
| 15 | +#include "DataFormatsCPV/TriggerRecord.h" |
| 16 | +#include "SimulationDataFormat/MCTruthContainer.h" |
| 17 | +#include "SimulationDataFormat/MCCompLabel.h" |
13 | 18 | #include "CPVWorkflow/ReaderSpec.h" |
14 | 19 | #include "Framework/ConfigParamRegistry.h" |
15 | 20 | #include "Framework/ControlService.h" |
@@ -54,28 +59,22 @@ DataProcessorSpec getDigitsReaderSpec(bool propagateMC) |
54 | 59 | processAttributes->terminateOnEod = ic.options().get<bool>("terminate-on-eod"); |
55 | 60 | processAttributes->finished = false; |
56 | 61 | processAttributes->datatype = "CPVDigit"; |
57 | | - constexpr auto persistency = Lifetime::Timeframe; |
58 | 62 | o2::header::DataHeader::SubSpecificationType subSpec = 0; |
59 | 63 | if (propagateMC) { |
60 | 64 | processAttributes->reader = std::make_shared<RootTreeReader>(treename.c_str(), // tree name |
61 | 65 | filename.c_str(), // input file name |
62 | 66 | nofEvents, // number of entries to publish |
63 | 67 | publishingMode, |
64 | | - Output{"CPV", "DIGITS", subSpec, persistency}, |
65 | | - "CPVDigit", // name of data branch |
66 | | - Output{"CPV", "DIGITTRIGREC", subSpec, persistency}, |
67 | | - "CPVDigitTrigRecords", // name of data triggerrecords branch |
68 | | - Output{"CPV", "DIGITSMCTR", subSpec, persistency}, |
69 | | - "CPVDigitMCTruth"); // name of mc label branch |
| 68 | + RootTreeReader::BranchDefinition<std::vector<Digit>>{Output{"CPV", "DIGITS", subSpec}, "CPVDigit"}, |
| 69 | + RootTreeReader::BranchDefinition<std::vector<TriggerRecord>>{Output{"CPV", "DIGITTRIGREC", subSpec}, "CPVDigitTrigRecords"}, |
| 70 | + RootTreeReader::BranchDefinition<dataformats::MCTruthContainer<MCCompLabel>>{Output{"CPV", "DIGITSMCTR", subSpec}, "CPVDigitMCTruth"}); |
70 | 71 | } else { |
71 | 72 | processAttributes->reader = std::make_shared<RootTreeReader>(treename.c_str(), // tree name |
72 | 73 | filename.c_str(), // input file name |
73 | 74 | nofEvents, // number of entries to publish |
74 | 75 | publishingMode, |
75 | | - Output{"CPV", "DIGITS", subSpec, persistency}, |
76 | | - "CPVDigit", // name of data branch |
77 | | - Output{"CPV", "DIGITTRIGREC", subSpec, persistency}, |
78 | | - "CPVDigitTrigRecords"); // name of data triggerrecords branch |
| 76 | + RootTreeReader::BranchDefinition<std::vector<Digit>>{Output{"CPV", "DIGITS", subSpec}, "CPVDigit"}, |
| 77 | + RootTreeReader::BranchDefinition<std::vector<TriggerRecord>>{Output{"CPV", "DIGITTRIGREC", subSpec}, "CPVDigitTrigRecords"}); |
79 | 78 | } |
80 | 79 | } |
81 | 80 |
|
@@ -157,21 +156,16 @@ DataProcessorSpec getClustersReaderSpec(bool propagateMC) |
157 | 156 | filename.c_str(), // input file name |
158 | 157 | nofEvents, // number of entries to publish |
159 | 158 | publishingMode, |
160 | | - Output{"CPV", "CLUSTERS", subSpec, persistency}, |
161 | | - "CPVCluster", // name of data branch |
162 | | - Output{"CPV", "CLUSTERTRIGRECS", subSpec, persistency}, |
163 | | - "CPVClusterTrigRec", // name of data triggerrecords branch |
164 | | - Output{"CPV", "CLUSTERTRUEMC", subSpec, persistency}, |
165 | | - "CPVClusterTrueMC"); // name of mc label branch |
| 159 | + RootTreeReader::BranchDefinition<std::vector<Cluster>>{Output{"CPV", "CLUSTERS", subSpec}, "CPVCluster"}, |
| 160 | + RootTreeReader::BranchDefinition<std::vector<TriggerRecord>>{Output{"CPV", "CLUSTERTRIGRECS", subSpec}, "CPVClusterTrigRec"}, |
| 161 | + RootTreeReader::BranchDefinition<dataformats::MCTruthContainer<MCCompLabel>>{Output{"CPV", "CLUSTERTRUEMC", subSpec}, "CPVClusterTrueMC"}); |
166 | 162 | } else { |
167 | 163 | processAttributes->reader = std::make_shared<RootTreeReader>(treename.c_str(), // tree name |
168 | 164 | filename.c_str(), // input file name |
169 | 165 | nofEvents, // number of entries to publish |
170 | 166 | publishingMode, |
171 | | - Output{"CPV", "CLUSTERS", subSpec, persistency}, |
172 | | - "CPVCluster", // name of data branch |
173 | | - Output{"CPV", "CLUSTERTRIGRECS", subSpec, persistency}, |
174 | | - "CPVClusterTrueMC"); // name of data triggerrecords branch |
| 167 | + RootTreeReader::BranchDefinition<std::vector<Cluster>>{Output{"CPV", "CLUSTERS", subSpec}, "CPVCluster"}, |
| 168 | + RootTreeReader::BranchDefinition<std::vector<TriggerRecord>>{Output{"CPV", "CLUSTERTRIGRECS", subSpec}, "CPVClusterTrigRec"}); |
175 | 169 | } |
176 | 170 | } |
177 | 171 |
|
|
0 commit comments