Skip to content
Snippets Groups Projects
Commit ce32d13a authored by Pascal Raisig's avatar Pascal Raisig Committed by Pascal Raisig
Browse files

Improve performance by initializing the channel vector in the header

Instead of initilazing the spadic channel vector with each function call,
 it is now initialized as member variable in the header.
parent 66d49200
No related branches found
No related tags found
1 merge request!88Fix spadic ch mapping
......@@ -189,10 +189,8 @@ Int_t CbmTrdParSpadic::GetAsicChAddress(const Int_t asicChannel) {
Int_t address = -1;
// Channel mapping based on channels 0-15 on the odd eLink and 16-31 on the even eLink, check setting in the unpacker for your dataset
std::vector<Int_t> chvec = {23, 7, 22, 6, 21, 19, 5, 20, 18, 4, 3,
17, 16, 2, 1, 0, 31, 30, 29, 15, 14, 28,
27, 13, 11, 26, 12, 10, 25, 9, 24, 8};
address = chvec.at(asicChannel);
address = fVecSpadicChannels.at(asicChannel);
return address;
}
......
......@@ -78,8 +78,12 @@ private:
static Double_t fgSizeY; ///< SPADIC half size in y [cm]
static Double_t fgSizeZ; ///< SPADIC half size in z [cm]
const std::vector<Int_t> fVecSpadicChannels = {
23, 7, 22, 6, 21, 19, 5, 20, 18, 4, 3, 17, 16, 2, 1, 0,
31, 30, 29, 15, 14, 28, 27, 13, 11, 26, 12, 10, 25, 9, 24, 8};
ClassDef(CbmTrdParSpadic, 1) // Definition of SPADIC ASIC parameters
ClassDef(CbmTrdParSpadic, 2) // Definition of SPADIC ASIC parameters
};
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment