File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
DataFormats/Detectors/CTP Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,8 @@ struct CtpCfg {
214214 uint32_t orbitShift = 0 ;
215215 uint32_t irInputs_1_24 = 0 ;
216216 uint32_t irInputs_25_48 = 0 ;
217- ClassDefNV (CtpCfg, 1 )
217+ std::vector<int > listOfUsedInputs ();
218+ ClassDefNV (CtpCfg, 2 )
218219};
219220} // namespace ctp
220221} // namespace o2
Original file line number Diff line number Diff line change @@ -1227,9 +1227,24 @@ int CtpCfg::readAndSave(std::string& path)
12271227 }
12281228 return 0 ;
12291229}
1230-
1230+ std::vector<int > CtpCfg::listOfUsedInputs ()
1231+ {
1232+ std::cout << std::hex << " 0x" << irInputs_1_24 << " " << irInputs_25_48 << std::dec << std::endl;
1233+ std::vector<int > inputList;
1234+ for (int i = 0 ; i < 24 ; i++) {
1235+ if ((1ul << i) & irInputs_1_24) {
1236+ inputList.push_back (i);
1237+ }
1238+ }
1239+ for (int i = 0 ; i < 24 ; i++) {
1240+ if ((1ul << i) & irInputs_25_48) {
1241+ inputList.push_back (i + 24 );
1242+ }
1243+ }
1244+ return inputList;
1245+ }
12311246std::ostream& o2::ctp::operator <<(std::ostream& in, const o2::ctp::CTPConfiguration& conf)
12321247{
12331248 conf.printStream (in);
12341249 return in;
1235- }
1250+ }
You can’t perform that action at this time.
0 commit comments