@@ -93,20 +93,23 @@ class AlfClient : public AliceO2::Common::Program
9393
9494 virtual void run (const po::variables_map&) override
9595 {
96+ Logger::enableInfoLogger (false );
97+ Logger::setFacility (" ALF/Client" );
9698 if (mOptions .alfId == " " ) {
97- Logger::get (). err () << " Parameter alf-id is required." << endm ;
99+ std::cerr << " Parameter alf-id is required." << std::endl ;
98100 return ;
99101 }
100102
101- Logger::get ().log () << " ALF client initializations..." << endm;
103+ std::cout << " ALF client initializations..." << std::endl;
104+ std::cout << " ALF client initializations..." << std::endl;
102105
103106 if (mOptions .dimDnsNode != " " ) {
104- Logger::get (). log () << " Setting DIM_DNS_NODE from argument." << endm ;
105- Logger::get (). log () << " DIM_DNS_NODE=" << mOptions .dimDnsNode << endm ;
107+ std::cout << " Setting DIM_DNS_NODE from argument." << std::endl ;
108+ std::cout << " DIM_DNS_NODE=" << mOptions .dimDnsNode << std::endl ;
106109 setenv (" DIM_DNS_NODE" , mOptions .dimDnsNode .c_str (), true );
107110 } else if (const char * dimDnsNode = std::getenv (" DIM_DNS_NODE" )) {
108- Logger::get (). log () << " Picked up DIM_DMS_NODE from the environment." << endm ;
109- Logger::get (). log () << " DIM_DNS_NODE=" << dimDnsNode << endm ;
111+ std::cout << " Picked up DIM_DMS_NODE from the environment." << std::endl ;
112+ std::cout << " DIM_DNS_NODE=" << dimDnsNode << std::endl ;
110113 mOptions .dimDnsNode = dimDnsNode;
111114 } else {
112115 BOOST_THROW_EXCEPTION (AlfException () << ErrorInfo::Message (" DIM_DNS_NODE env variable not set, and no relevant argument provided." )); // InfoLogger and errors?
@@ -115,7 +118,7 @@ class AlfClient : public AliceO2::Common::Program
115118 std::string alfId = mOptions .alfId ;
116119 boost::to_upper (alfId);
117120
118- Logger::get (). log () << " Starting the DIM Client using ALF ID=" << alfId << " , card=" << mOptions .serial << " :" << mOptions .endpoint << " and link=" << mOptions .link << endm ;
121+ std::cout << " Starting the DIM Client using ALF ID=" << alfId << " , card=" << mOptions .serial << " :" << mOptions .endpoint << " and link=" << mOptions .link << std::endl ;
119122
120123 AlfLink link = AlfLink{ alfId, roc::SerialId (mOptions .serial , mOptions .endpoint ), mOptions .link , mOptions .endpoint * 12 + mOptions .link , nullptr , roc::CardType::Cru };
121124
@@ -129,7 +132,7 @@ class AlfClient : public AliceO2::Common::Program
129132 std::make_pair (" 0x1f0" , " " ),
130133 std::make_pair (" 0x1f0" , " 0x00080000" ),
131134 std::make_pair (" 0x1f0" , " " ) });
132- Logger::get (). log () << " [REGISTER SEQUENCE] output: " << regOut << endm ;
135+ std::cout << " [REGISTER SEQUENCE] output: " << regOut << std::endl ;
133136
134137 return ;
135138 }
@@ -152,7 +155,7 @@ class AlfClient : public AliceO2::Common::Program
152155 uint32_t rAddress = 0x00f0005c ;
153156 registerWriteRpc.writeRegister (wAddress, wValue);
154157 uint32_t rValue = registerReadRpc.readRegister (rAddress);
155- Logger::get (). log () << " [REGISTER] Wrote: " << Util::formatValue (wValue) << " Read: " << Util::formatValue (rValue) << endm ;
158+ std::cout << " [REGISTER] Wrote: " << Util::formatValue (wValue) << " Read: " << Util::formatValue (rValue) << std::endl ;
156159
157160 if (mOptions .swt ) {
158161 auto swtOut = swtSequence.write ({ std::make_pair (" " , " lock" ),
@@ -166,7 +169,7 @@ class AlfClient : public AliceO2::Common::Program
166169 std::make_pair (" 1" , " read" ),
167170 std::make_pair (" 0xbadc0ffee" , " write" ),
168171 std::make_pair (" 4" , " read" ) });
169- Logger::get (). log () << " [SWT_SEQUENCE] output: " << swtOut << endm ;
172+ std::cout << " [SWT_SEQUENCE] output: " << swtOut << std::endl ;
170173 }
171174
172175 if (mOptions .swtStress ) {
@@ -182,8 +185,8 @@ class AlfClient : public AliceO2::Common::Program
182185 swtStressPairs.push_back (std::make_pair (" 1000" , " read" ));
183186
184187 auto swtStressOut = swtSequence.write (swtStressPairs);
185- Logger::get (). log () << " [SWT stress] cycle " << cycle << endm ;
186- Logger::get (). log () << " [SWT stress] output: " << swtStressOut << endm ;
188+ std::cout << " [SWT stress] cycle " << cycle << std::endl ;
189+ std::cout << " [SWT stress] output: " << swtStressOut << std::endl ;
187190 std::cout << " [SWT stress] output: " << swtStressOut << std::endl; // Infologger gets filled up here...
188191 }
189192 }
@@ -200,7 +203,7 @@ class AlfClient : public AliceO2::Common::Program
200203 std::make_pair (" 0x0B9601DE" , " 0x50000000" ),
201204 std::make_pair (" 0x0B970471" , " 0x50000000" ),
202205 std::make_pair (" 0x0B980461" , " 0x50000000" ) });
203- Logger::get (). log () << " [SCA_SEQUENCE] output: " << scaOut << endm ;
206+ std::cout << " [SCA_SEQUENCE] output: " << scaOut << std::endl ;
204207 }
205208
206209 if (mOptions .ic ) {
@@ -212,13 +215,13 @@ class AlfClient : public AliceO2::Common::Program
212215 std::make_pair (" 0x56,0xff" , " write" ),
213216 std::make_pair (" 0x56" , " read" ),
214217 });
215- Logger::get (). log () << " [IC_SEQUENCE] output: " << icOut << endm ;
218+ std::cout << " [IC_SEQUENCE] output: " << icOut << std::endl ;
216219
217220 icGbtI2cWriteRpc.write (0x3 );
218221 }
219222
220223 if (mOptions .patternPlayer ) {
221- Logger::get (). log () << " Running the pattern player" << endm ;
224+ std::cout << " Running the pattern player" << std::endl ;
222225 auto ppOut = patternPlayerRpc.play ({
223226 " 0x23456789abcdef123456" ,
224227 " 0x5678" ,
@@ -234,11 +237,11 @@ class AlfClient : public AliceO2::Common::Program
234237 " false" ,
235238 // "0xdeadbeef" // Uncomment to test more parameters than expected
236239 });
237- Logger::get (). log () << " Pairs test return: " << ppOut << endm ;
240+ std::cout << " Pairs test return: " << ppOut << std::endl ;
238241 }
239242
240243 if (mOptions .lla ) {
241- Logger::get (). log () << " Running the lla" << endm ;
244+ std::cout << " Running the lla" << std::endl ;
242245 const auto start = std::chrono::steady_clock::now ();
243246 auto timeExceeded = [&]() { return ((std::chrono::steady_clock::now () - start) > std::chrono::milliseconds (4100 )); };
244247
@@ -255,7 +258,7 @@ class AlfClient : public AliceO2::Common::Program
255258 }
256259 }
257260
258- Logger::get (). log () << " See ya!" << endm ;
261+ std::cout << " See ya!" << std::endl ;
259262 }
260263
261264 private:
0 commit comments