@@ -2660,13 +2660,21 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
26602660{
26612661 auto strangenessBuilderTask = adaptAnalysisTask<StrangenessBuilder>(cfgc);
26622662
2663- bool isRun3 = true ;
2664- bool isMC = false ;
2665- if (cfgc.options ().hasOption (" aod-metadata-Run" ) && cfgc.options ().get <std::string>(" aod-metadata-Run" ) == " 2" ){
2666- isRun3 = false ;
2663+ bool isRun3 = true , hasRunInfo = false ;
2664+ bool isMC = false , hasDataTypeInfo = false ;
2665+ LOGF (info, " Bool: %i" , cfgc.options ().hasOption (" aod-metadata-Run" ));
2666+
2667+ if (cfgc.options ().hasOption (" aod-metadata-Run" ) == true ){
2668+ hasRunInfo = true ;
2669+ if (cfgc.options ().get <std::string>(" aod-metadata-Run" ) == " 2" ){
2670+ isRun3 = false ;
2671+ }
26672672 }
2668- if (cfgc.options ().hasOption (" aod-metadata-DataType" ) && cfgc.options ().get <std::string>(" aod-metadata-DataType" ) == " MC" ){
2669- isMC = true ;
2673+ if (cfgc.options ().hasOption (" aod-metadata-DataType" ) == true ){
2674+ hasDataTypeInfo = true ;
2675+ if (cfgc.options ().get <std::string>(" aod-metadata-DataType" ) == " MC" ){
2676+ isMC = true ;
2677+ }
26702678 }
26712679
26722680 int idxSwitches[8 ]; // 8 switches (real / real r2 / MC / MC r2 + PID)
@@ -2708,10 +2716,10 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
27082716 }
27092717 }
27102718
2711- // positions of switches known - flip if asked for
2719+ // positions of switches are known. Next: flip if asked for
27122720 if (autoConfigureProcess){
27132721 int relevantProcess = static_cast <int >(isMC) + 2 *static_cast <int >(!isRun3) + 4 *static_cast <int >(withPID);
2714- LOGF (info, " Automatic configuration of process switches requested! Bools : isRun3? %i, isMC? %i, withPID? %i (switch #%i)" , isRun3, isMC, withPID, relevantProcess);
2722+ LOGF (info, " Automatic configuration of process switches requested! Present in metadata? Run %i DataType %i, Values : isRun3? %i, isMC? %i, withPID? %i (switch #%i)" , hasRunInfo, hasDataTypeInfo , isRun3, isMC, withPID, relevantProcess);
27152723 for (size_t idx = 0 ; idx < 8 ; idx ++){
27162724 auto option = strangenessBuilderTask.options [idxSwitches[idx]];
27172725 option.defaultValue = false ; // switch all off
0 commit comments