TPC: Processing of common mode values in O2#15137
TPC: Processing of common mode values in O2#15137tubagundem wants to merge 5 commits intoAliceO2Group:devfrom
Conversation
|
REQUEST FOR PRODUCTION RELEASES: This will add The following labels are available |
shahor02
left a comment
There was a problem hiding this comment.
Could the class methods with lot of code be moved from the header to cxx file (including needed headers, like TFile.h and TTree.h in https://github.com/AliceO2Group/AliceO2/pull/15137/changes#diff-74cad5f291e0478b7a6334eb7e3dcdabbad615a01df0db129d836a337e76582aR26-R27 ?
wiechula
left a comment
There was a problem hiding this comment.
Hi @tubagundem , some minor things and a couple questions:
- How different are the
CMVToVectorSpec.hand the corresponding IDC code? Could it have a common base to? - What is done in the
TPCFactorizeCMVSpec.h? I think in the CMV we don't do factorization.
| /// Header definition of the CMVs | ||
| struct Header { | ||
| static constexpr uint8_t MagicWord = 0xDC; | ||
| union { |
There was a problem hiding this comment.
I would prefer to use the same structure as in IDC.h: the words are 64 bit and then split up.
|
|
||
| /// CMV single data container | ||
| struct Data { | ||
| uint16_t CMV{0}; ///< 16bit ADC value |
There was a problem hiding this comment.
Naming convention
| uint16_t CMV{0}; ///< 16bit ADC value | |
| uint16_t cmv{0}; ///< 16bit ADC value |
| // Point branches directly at the vector data — single Fill() call writes all rows | ||
| float* pCmv = const_cast<float*>(cmvValues.data()); | ||
| uint32_t* pCru = const_cast<uint32_t*>(cru.data()); | ||
| uint32_t* pTimebin = const_cast<uint32_t*>(timebin.data()); | ||
| uint32_t* pTf = const_cast<uint32_t*>(tf.data()); | ||
|
|
||
| tree->Branch("cmv", pCmv, fmt::format("cmv[{}]/F", n).c_str()); | ||
| tree->Branch("cru", pCru, fmt::format("cru[{}]/i", n).c_str()); | ||
| tree->Branch("timebin", pTimebin, fmt::format("timebin[{}]/i", n).c_str()); | ||
| tree->Branch("tf", pTf, fmt::format("tf[{}]/i", n).c_str()); |
There was a problem hiding this comment.
Why don't you directly fill the vectors into the tree (blow), or even write the full class? I guess this function also does not need to be const.
No description provided.