@@ -58,7 +58,10 @@ void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
5858 workflowOptions.push_back (ConfigParamSpec{" input-desc" , o2::framework::VariantType::String, " CRAWDATA" , {" Input specs description string" }});
5959 workflowOptions.push_back (ConfigParamSpec{" disable-root-input" , o2::framework::VariantType::Bool, false , {" disable root-files input readers" }});
6060 workflowOptions.push_back (ConfigParamSpec{" disable-root-output" , o2::framework::VariantType::Bool, false , {" disable root-files output writers" }});
61+ workflowOptions.push_back (ConfigParamSpec{" conet-mode" , o2::framework::VariantType::Bool, false , {" enable conet mode" }});
6162 workflowOptions.push_back (ConfigParamSpec{" configKeyValues" , o2::framework::VariantType::String, " " , {" Semicolon separated key=value strings ..." }});
63+ workflowOptions.push_back (ConfigParamSpec{" disable-row-writing" , o2::framework::VariantType::Bool, false , {" disable ROW in Digit writing" }});
64+ workflowOptions.push_back (ConfigParamSpec{" write-decoding-errors" , o2::framework::VariantType::Bool, false , {" trace errors in digits output when decoding" }});
6265}
6366
6467#include " Framework/runDataProcessing.h" // the main driver
@@ -84,13 +87,6 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
8487 WorkflowSpec specs;
8588
8689 if (!cfgc.helpOnCommandLine ()) {
87- std::string inputGRP = o2::base::NameConf::getGRPFileName ();
88- o2::base::Propagator::initFieldFromGRP (inputGRP);
89- const auto grp = o2::parameters::GRPObject::loadFrom (inputGRP);
90- if (!grp) {
91- LOG (ERROR) << " This workflow needs a valid GRP file to start" ;
92- return specs;
93- }
9490 o2::conf::ConfigurableParam::updateFromString (cfgc.options ().get <std::string>(" configKeyValues" ));
9591 // o2::conf::ConfigurableParam::writeINI("o2tofrecoflow_configuration.ini");
9692 }
@@ -107,6 +103,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
107103 bool writedigit = 0 ;
108104 bool writeraw = 0 ;
109105 bool writectf = 0 ;
106+ bool writeerr = 0 ;
110107
111108 if (outputType.rfind (" clusters" ) < outputType.size ())
112109 writecluster = 1 ;
@@ -131,15 +128,31 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
131128 clusterinput = 1 ;
132129 } else if (inputType == " raw" ) {
133130 rawinput = 1 ;
131+ writeerr = cfgc.options ().get <bool >(" write-decoding-errors" );
134132 } else if (inputType == " ctf" ) {
135133 ctfinput = 1 ;
136134 }
137135
136+ if (ctfinput || rawinput) {
137+ } else {
138+ if (!cfgc.helpOnCommandLine ()) {
139+ std::string inputGRP = o2::base::NameConf::getGRPFileName ();
140+ o2::base::Propagator::initFieldFromGRP (inputGRP);
141+ const auto grp = o2::parameters::GRPObject::loadFrom (inputGRP);
142+ if (!grp) {
143+ LOG (ERROR) << " This workflow needs a valid GRP file to start" ;
144+ return specs;
145+ }
146+ }
147+ }
148+
138149 auto useMC = !cfgc.options ().get <bool >(" disable-mc" );
139150 auto useCCDB = cfgc.options ().get <bool >(" use-ccdb" );
140151 auto useFIT = cfgc.options ().get <bool >(" use-fit" );
141152 bool disableRootInput = cfgc.options ().get <bool >(" disable-root-input" ) || rawinput;
142153 bool disableRootOutput = cfgc.options ().get <bool >(" disable-root-output" );
154+ bool conetmode = cfgc.options ().get <bool >(" conet-mode" );
155+ bool disableROWwriting = cfgc.options ().get <bool >(" disable-row-writing" );
143156
144157 LOG (INFO) << " TOF RECO WORKFLOW configuration" ;
145158 LOG (INFO) << " TOF input = " << cfgc.options ().get <std::string>(" input-type" );
@@ -151,6 +164,9 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
151164 LOG (INFO) << " TOF use-fit = " << cfgc.options ().get <std::string>(" use-fit" );
152165 LOG (INFO) << " TOF disable-root-input = " << disableRootInput;
153166 LOG (INFO) << " TOF disable-root-output = " << disableRootOutput;
167+ LOG (INFO) << " TOF conet-mode = " << conetmode;
168+ LOG (INFO) << " TOF disable-row-writing = " << disableROWwriting;
169+ LOG (INFO) << " TOF write-decoding-errors = " << writeerr;
154170
155171 if (clusterinput) {
156172 LOG (INFO) << " Insert TOF Cluster Reader" ;
@@ -167,13 +183,13 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
167183 } else if (rawinput) {
168184 LOG (INFO) << " Insert TOF Compressed Raw Decoder" ;
169185 auto inputDesc = cfgc.options ().get <std::string>(" input-desc" );
170- specs.emplace_back (o2::tof::getCompressedDecodingSpec (inputDesc));
186+ specs.emplace_back (o2::tof::getCompressedDecodingSpec (inputDesc, conetmode ));
171187 useMC = 0 ;
172188
173189 if (writedigit && !disableRootOutput) {
174190 // add TOF digit writer without mc labels
175191 LOG (INFO) << " Insert TOF Digit Writer" ;
176- specs.emplace_back (o2::tof::getTOFDigitWriterSpec (0 ));
192+ specs.emplace_back (o2::tof::getTOFDigitWriterSpec (0 , writeerr ));
177193 }
178194 } else if (ctfinput) {
179195 LOG (INFO) << " Insert TOF CTF decoder" ;
0 commit comments