@@ -299,50 +299,44 @@ public:
299
299
// /
300
300
// / \param[in] primaryNTuple The name and location of the primary RNTuple. Its entries are processed in sequential
301
301
// / order.
302
- // / \param[in] auxNTuples The names and locations of the RNTuples to join the primary RNTuple with. The order in
303
- // / which their entries are processed are determined by the primary RNTuple and doesn't necessarily have to be
304
- // / sequential.
302
+ // / \param[in] auxNTuple The name and location of the RNTuple to join the primary RNTuple with. The order in which
303
+ // / its entries are processed is determined by the primary RNTuple and doesn't necessarily have to be sequential.
305
304
// / \param[in] joinFields The names of the fields on which to join, in case the specified RNTuples are unaligned.
306
305
// / The join is made based on the combined join field values, and therefore each field has to be present in each
307
306
// / specified RNTuple. If an empty list is provided, it is assumed that the specified ntuple are fully aligned.
308
307
// / \param[in] primaryModel An RNTupleModel specifying which fields from the primary RNTuple can be read by the
309
308
// / processor. If no model is provided, one will be created based on the descriptor of the primary RNTuple.
310
- // / \param[in] auxModels A list of RNTupleModels specifying which fields from the corresponding auxiliary RNTuple
311
- // / (according to the order of `auxNTuples`) can be read by the processor. If this vector is empty, the models will
312
- // / be created based on the descriptors of their corresponding RNTuples. This also applies to individual auxiliary
313
- // / RNTuples for which the provided model is a `nullptr`.
309
+ // / \param[in] auxModel An RNTupleModel specifying which fields from the auxiliary RNTuple can be read by the
310
+ // / processor. If no model is provided, one will be created based on the descriptor of the auxiliary RNTuple.
314
311
// / \param[in] processorName The name to give to the processor. If empty, the name of the primary RNTuple is used.
315
312
// /
316
313
// / \return A pointer to the newly created RNTupleProcessor.
317
314
static std::unique_ptr<RNTupleProcessor>
318
- CreateJoin (RNTupleOpenSpec primaryNTuple, std::vector<RNTupleOpenSpec> auxNTuples ,
319
- const std::vector<std::string> &joinFields, std::unique_ptr<ROOT::RNTupleModel> primaryModel = nullptr ,
320
- std::vector<std:: unique_ptr<ROOT::RNTupleModel>> auxModels = {} , std::string_view processorName = " " );
315
+ CreateJoin (RNTupleOpenSpec primaryNTuple, RNTupleOpenSpec auxNTuple, const std::vector<std::string> &joinFields ,
316
+ std::unique_ptr<ROOT::RNTupleModel> primaryModel = nullptr ,
317
+ std::unique_ptr<ROOT::RNTupleModel> auxModel = nullptr , std::string_view processorName = " " );
321
318
322
319
// ///////////////////////////////////////////////////////////////////////////
323
320
// / \brief Create an RNTupleProcessor for a *join* (i.e., a horizontal combination) of RNTuples.
324
321
// /
325
322
// / \param[in] primaryProcessor The primary processor. Its entries are processed in sequential order.
326
- // / \param[in] auxProcessors The processors to join the primary processor with. The order in which their entries are
327
- // / processed are determined by the primary processor and doesn't necessarily have to be sequential.
323
+ // / \param[in] auxProcessor The processor to join the primary processor with. The order in which its entries are
324
+ // / processed is determined by the primary processor and doesn't necessarily have to be sequential.
328
325
// / \param[in] joinFields The names of the fields on which to join, in case the specified processors are unaligned.
329
326
// / The join is made based on the combined join field values, and therefore each field has to be present in each
330
327
// / specified processors. If an empty list is provided, it is assumed that the specified processors are fully
331
328
// / aligned.
332
329
// / \param[in] primaryModel An RNTupleModel specifying which fields from the primary processor can be read by the
333
330
// / processor. If no model is provided, one will be created based on the descriptor of the primary processor.
334
- // / \param[in] auxModels A list of RNTupleModels specifying which fields from the corresponding auxiliary processor
335
- // / (according to the order of `auxProcessors`) can be read by the processor. If this vector is empty, the models
336
- // / will be inferred from their corresponding processors. This also applies to individual auxiliary processors for
337
- // / which the provided model is a `nullptr`.
331
+ // / \param[in] auxModel An RNTupleModel specifying which fields from the auxiliary processor can be read by the
332
+ // / processor. If no model is provided, one will be created based on the descriptor of the auxiliary processor.
338
333
// / \param[in] processorName The name to give to the processor. If empty, the name of the primary processor is used.
339
334
// /
340
335
// / \return A pointer to the newly created RNTupleProcessor.
341
336
static std::unique_ptr<RNTupleProcessor>
342
- CreateJoin (std::unique_ptr<RNTupleProcessor> primaryProcessor,
343
- std::vector<std::unique_ptr<RNTupleProcessor>> auxProcessors, const std::vector<std::string> &joinFields,
344
- std::unique_ptr<ROOT::RNTupleModel> primaryModel = nullptr ,
345
- std::vector<std::unique_ptr<ROOT::RNTupleModel>> auxModels = {}, std::string_view processorName = " " );
337
+ CreateJoin (std::unique_ptr<RNTupleProcessor> primaryProcessor, std::unique_ptr<RNTupleProcessor> auxProcessor,
338
+ const std::vector<std::string> &joinFields, std::unique_ptr<ROOT::RNTupleModel> primaryModel = nullptr ,
339
+ std::unique_ptr<ROOT::RNTupleModel> auxModel = nullptr , std::string_view processorName = " " );
346
340
};
347
341
348
342
// clang-format off
@@ -477,14 +471,12 @@ class RNTupleJoinProcessor : public RNTupleProcessor {
477
471
478
472
private:
479
473
std::unique_ptr<RNTupleProcessor> fPrimaryProcessor ;
480
- std::vector<std:: unique_ptr<RNTupleProcessor>> fAuxiliaryProcessors ;
474
+ std::unique_ptr<RNTupleProcessor> fAuxiliaryProcessor ;
481
475
482
476
// / Tokens representing the join fields present in the primary processor.
483
477
std::vector<ROOT::RFieldToken> fJoinFieldTokens ;
484
- std::vector<std::unique_ptr<Internal::RNTupleJoinTable>> fJoinTables ;
485
- bool fJoinTablesAreBuilt = false ;
486
-
487
- bool HasJoinTable () const { return fJoinTables .size () > 0 ; }
478
+ std::unique_ptr<Internal::RNTupleJoinTable> fJoinTable ;
479
+ bool fJoinTableIsBuilt = false ;
488
480
489
481
// ///////////////////////////////////////////////////////////////////////////
490
482
// / \brief Load the entry identified by the provided entry number of the primary processor.
@@ -510,34 +502,31 @@ private:
510
502
// / \brief Set fModel by combining the primary and auxiliary models.
511
503
// /
512
504
// / \param[in] primaryModel The model of the primary processor.
513
- // / \param[in] auxModels Models of the auxiliary processors.
505
+ // / \param[in] auxModel Model of the auxiliary processors.
514
506
// /
515
507
// / To prevent field name clashes when one or more models have fields with duplicate names, fields from each
516
508
// / auxiliary model are stored as a anonymous record, and subsequently registered as subfields in the join model.
517
509
// / This way, they can be accessed from the processor's entry as `auxNTupleName.fieldName`.
518
- void SetModel (std::unique_ptr<ROOT::RNTupleModel> primaryModel,
519
- std::vector<std::unique_ptr<ROOT::RNTupleModel>> auxModels);
510
+ void SetModel (std::unique_ptr<ROOT::RNTupleModel> primaryModel, std::unique_ptr<ROOT::RNTupleModel> auxModel);
520
511
521
512
// ///////////////////////////////////////////////////////////////////////////
522
513
// / \brief Construct a new RNTupleJoinProcessor.
523
514
// / \param[in] primaryProcessor The primary processor. Its entries are processed in sequential order.
524
- // / \param[in] auxProcessors The processors to join the primary processor with. The order in which their entries are
525
- // / processed are determined by the primary processor and doesn't necessarily have to be sequential.
515
+ // / \param[in] auxProcessor The processor to join the primary processor with. The order in which its entries are
516
+ // / processed is determined by the primary processor and doesn't necessarily have to be sequential.
526
517
// / \param[in] joinFields The names of the fields on which to join, in case the specified processors are unaligned.
527
518
// / The join is made based on the combined join field values, and therefore each field has to be present in each
528
519
// / specified processor. If an empty list is provided, it is assumed that the processors are fully aligned.
529
520
// / \param[in] primaryModel An RNTupleModel specifying which fields from the primary processor can be read by the
530
521
// / processor. If no model is provided, one will be created based on the descriptor of the primary processor.
531
- // / \param[in] auxModels A list of RNTupleModels specifying which fields from the corresponding auxiliary processor
532
- // / (according to the order of `auxProcessors`) can be read by the processor. If this vector is empty, the models
533
- // / will be inferred from their corresponding processors. This also applies to individual auxiliary processors for
534
- // / which the provided model is a `nullptr`.
522
+ // / \param[in] auxModel An RNTupleModel specifying which fields from the auxiliary processor can be read by the
523
+ // / processor. If no model is provided, one will be created based on the descriptor of the auxiliary processor.
535
524
// / \param[in] processorName Name of the processor. Unless specified otherwise in RNTupleProcessor::CreateJoin, this
536
525
// / is the name of the primary processor.
537
526
RNTupleJoinProcessor (std::unique_ptr<RNTupleProcessor> primaryProcessor,
538
- std::vector< std::unique_ptr<RNTupleProcessor>> auxProcessors ,
539
- const std::vector<std::string> &joinFields , std::unique_ptr<ROOT::RNTupleModel> primaryModel ,
540
- std::vector<std::unique_ptr<ROOT::RNTupleModel>> auxModels, std:: string_view processorName);
527
+ std::unique_ptr<RNTupleProcessor> auxProcessor, const std::vector<std::string> &joinFields ,
528
+ std::unique_ptr<ROOT::RNTupleModel> primaryModel , std::unique_ptr<ROOT::RNTupleModel> auxModel ,
529
+ std::string_view processorName);
541
530
542
531
public:
543
532
RNTupleJoinProcessor (const RNTupleJoinProcessor &) = delete ;
0 commit comments