Skip to content
Snippets Groups Projects
Commit f9e07271 authored by Sanya Solodkov's avatar Sanya Solodkov
Browse files

Providing most up-to-date drawer->ROD mapping in TileRodIdHash

parent 1b561603
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ class TileRodIdHash { ...@@ -25,7 +25,7 @@ class TileRodIdHash {
virtual ~TileRodIdHash() { }; virtual ~TileRodIdHash() { };
/** initialize */ /** initialize */
void initialize(int offset ); void initialize(int offset, int runnum );
/** new initialize for the HLT */ /** new initialize for the HLT */
void initialize (int offset, const std::vector<ID>& rmod ); void initialize (int offset, const std::vector<ID>& rmod );
......
...@@ -20,13 +20,41 @@ TileRodIdHash::TileRodIdHash( ) ...@@ -20,13 +20,41 @@ TileRodIdHash::TileRodIdHash( )
} }
void TileRodIdHash::initialize( int offset ) { void TileRodIdHash::initialize( int offset, int runnum ) {
// //
m_offset = offset;
std::vector<ID> rmod; std::vector<ID> rmod;
rmod.reserve(256);
if (runnum>318000) {
// new frag->ROB mapping since March 2017
// put 4 drawers in two subsequent RODs
// odd drawers in odd ROD, even drawers in even ROD
for(unsigned int i=0x510000;i<=0x51001f;i+=2){
rmod.push_back(i);
rmod.push_back(i+1);
rmod.push_back(i);
rmod.push_back(i+1);
}
for(unsigned int i=0x520000;i<=0x52001f;i+=2){
rmod.push_back(i);
rmod.push_back(i+1);
rmod.push_back(i);
rmod.push_back(i+1);
}
for(unsigned int i=0x530000;i<=0x53001f;i+=2){
rmod.push_back(i);
rmod.push_back(i+1);
rmod.push_back(i);
rmod.push_back(i+1);
}
for(unsigned int i=0x540000;i<=0x54001f;i+=2){
rmod.push_back(i);
rmod.push_back(i+1);
rmod.push_back(i);
rmod.push_back(i+1);
}
} else {
for(unsigned int i=0x510000;i<=0x51000f;i++){ for(unsigned int i=0x510000;i<=0x51000f;i++){
rmod.push_back(i); rmod.push_back(i);
rmod.push_back(i); rmod.push_back(i);
...@@ -51,22 +79,9 @@ void TileRodIdHash::initialize( int offset ) { ...@@ -51,22 +79,9 @@ void TileRodIdHash::initialize( int offset ) {
rmod.push_back(i); rmod.push_back(i);
rmod.push_back(i); rmod.push_back(i);
} }
}
std::vector<ID>::const_iterator initialize(offset,rmod);
it = rmod.begin();
std::vector<ID>::const_iterator
it_end = rmod.end() ;
int n = 0;
for (; it!=it_end;++it) {
ID id = *it;
unsigned int i = id;
m_lookup[i] = n ;
m_int2id.push_back(id);
++n;
}
m_size = n;
} }
void TileRodIdHash::initialize( int offset, const std::vector<ID>& rmod ) { void TileRodIdHash::initialize( int offset, const std::vector<ID>& rmod ) {
......
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