@@ -56,7 +56,7 @@ namespace o2
5656namespace tpc
5757{
5858
59- DataProcessorSpec getZSEncoderSpec (std::vector<int > const & inputIds , bool zs10bit, float threshold = 2 .f, bool outRaw = false )
59+ DataProcessorSpec getZSEncoderSpec (std::vector<int > const & tpcSectors , bool zs10bit, float threshold = 2 .f, bool outRaw = false )
6060{
6161 std::string processorName = " tpc-zsEncoder" ;
6262 constexpr static size_t NSectors = o2::tpc::Sector::MAXSECTOR;
@@ -66,21 +66,25 @@ DataProcessorSpec getZSEncoderSpec(std::vector<int> const& inputIds, bool zs10bi
6666 struct ProcessAttributes {
6767 std::unique_ptr<unsigned long long int []> zsoutput;
6868 std::vector<unsigned int > sizes;
69- std::vector<int > inputIds ;
69+ std::vector<int > tpcSectors ;
7070 bool verify = false ;
7171 int verbosity = 1 ;
7272 bool finished = false ;
7373 };
7474
75- auto initFunction = [inputIds , zs10bit, threshold, outRaw](InitContext& ic) {
75+ auto initFunction = [tpcSectors , zs10bit, threshold, outRaw](InitContext& ic) {
7676 auto processAttributes = std::make_shared<ProcessAttributes>();
7777 auto & zsoutput = processAttributes->zsoutput ;
78- processAttributes->inputIds = inputIds ;
78+ processAttributes->tpcSectors = tpcSectors ;
7979 auto & verify = processAttributes->verify ;
8080 auto & sizes = processAttributes->sizes ;
8181 auto & verbosity = processAttributes->verbosity ;
82+ unsigned long tpcSectorMask = 0 ;
83+ for (auto s : tpcSectors) {
84+ tpcSectorMask |= (1ul << s);
85+ }
8286
83- auto processingFct = [processAttributes, zs10bit, threshold, outRaw](
87+ auto processingFct = [processAttributes, zs10bit, threshold, outRaw, tpcSectorMask ](
8488 ProcessingContext& pc) {
8589 if (processAttributes->finished ) {
8690 return ;
@@ -99,7 +103,7 @@ DataProcessorSpec getZSEncoderSpec(std::vector<int> const& inputIds, bool zs10bi
99103 config.ReadConfigurableParam ();
100104 _GPUParam.SetDefaults (&config.configGRP , &config.configReconstruction , &config.configProcessing , nullptr );
101105
102- const auto & inputs = getWorkflowTPCInput (pc, 0 , false , false , 0xFFFFFFFFF , true );
106+ const auto & inputs = getWorkflowTPCInput (pc, 0 , false , false , tpcSectorMask , true );
103107 sizes.resize (NSectors * NEndpoints);
104108 bool zs12bit = !zs10bit;
105109 o2::InteractionRecord ir = o2::raw::HBFUtils::Instance ().getFirstIR ();
@@ -164,16 +168,16 @@ DataProcessorSpec getZSEncoderSpec(std::vector<int> const& inputIds, bool zs10bi
164168 return processingFct;
165169 };
166170
167- auto createInputSpecs = [inputIds ]() {
171+ auto createInputSpecs = [tpcSectors ]() {
168172 Inputs inputs;
169173 // inputs.emplace_back(InputSpec{"input", ConcreteDataTypeMatcher{gDataOriginTPC, "DIGITS"}, Lifetime::Timeframe});
170174 inputs.emplace_back (InputSpec{" input" , gDataOriginTPC , " DIGITS" , 0 , Lifetime::Timeframe});
171- return std::move (mergeInputs (inputs, inputIds .size (),
172- [inputIds ](InputSpec& input, size_t index) {
175+ return std::move (mergeInputs (inputs, tpcSectors .size (),
176+ [tpcSectors ](InputSpec& input, size_t index) {
173177 // using unique input names for the moment but want to find
174178 // an input-multiplicity-agnostic way of processing
175- input.binding += std::to_string (inputIds [index]);
176- DataSpecUtils::updateMatchingSubspec (input, inputIds [index]);
179+ input.binding += std::to_string (tpcSectors [index]);
180+ DataSpecUtils::updateMatchingSubspec (input, tpcSectors [index]);
177181 }));
178182 return inputs;
179183 };
@@ -195,7 +199,7 @@ DataProcessorSpec getZSEncoderSpec(std::vector<int> const& inputIds, bool zs10bi
195199 AlgorithmSpec (initFunction)};
196200} // spec end
197201
198- DataProcessorSpec getZStoDigitsSpec (std::vector<int > const & inputIds )
202+ DataProcessorSpec getZStoDigitsSpec (std::vector<int > const & tpcSectors )
199203{
200204 std::string processorName = " tpc-zs-to-Digits" ;
201205 constexpr static size_t NSectors = o2::tpc::Sector::MAXSECTOR;
@@ -206,7 +210,7 @@ DataProcessorSpec getZStoDigitsSpec(std::vector<int> const& inputIds)
206210 std::unique_ptr<unsigned long long int []> zsinput;
207211 std::vector<unsigned int > sizes;
208212 std::unique_ptr<o2::tpc::ZeroSuppress> decoder;
209- std::vector<int > inputIds ;
213+ std::vector<int > tpcSectors ;
210214 bool verify = false ;
211215 int verbosity = 1 ;
212216 bool finished = false ;
@@ -229,9 +233,9 @@ DataProcessorSpec getZStoDigitsSpec(std::vector<int> const& inputIds)
229233 }
230234 };
231235
232- auto initFunction = [inputIds ](InitContext& ic) {
236+ auto initFunction = [tpcSectors ](InitContext& ic) {
233237 auto processAttributes = std::make_shared<ProcessAttributes>();
234- processAttributes->inputIds = inputIds ;
238+ processAttributes->tpcSectors = tpcSectors ;
235239 auto & outDigits = processAttributes->outDigits ;
236240 auto & decoder = processAttributes->decoder ;
237241 decoder = std::make_unique<o2::tpc::ZeroSuppress>();
0 commit comments