Skip to content
Snippets Groups Projects
Commit 059fbc8d authored by Sanya Solodkov's avatar Sanya Solodkov Committed by Graeme Stewart
Browse files

updates in laser decoder + protection against zero-sized BS fragments (TileByteStream-00-08-59)

	* setting correct DQstatus(filled with all zeros)
	* in case DQfragment is missing
	* Tagging TileByteStream-00-08-59

2014-12-05  Marius Cornelis van Woerden <mvanwoer@cern.ch>

        * ROD decoder adjusted to used TileLasCalib object

2014-11-23  Sanya Solodkov  <solodkov@pcatl03.cern.ch>

	* intiialize cells with valid gain for HLT in TileCellCont.cxx
	* Tagging TileByteStream-00-08-58

2014-11-08  Sanya Solodkov  <solodkov@pcatl03.cern.ch>

	* bug fix in TileROD_Decoder::unpack_frag17()
	* Tagging TileByteStream-00-08-57

2014-11-05  Sanya Solodkov  <solodkov@pcatl03.cern.ch>
...
(Long ChangeLog diff - truncated)
parent ac19be41
No related branches found
No related tags found
No related merge requests found
......@@ -328,8 +328,12 @@ class TileROD_Decoder: public AthAlgTool {
bool unpack_frag5L2(uint32_t version, const uint32_t* p, TileL2Container & v) const;
/** unpack_frag16 decodes tile subfragment type 0x16 or 0x20. This subfragment contains
informations coming from the Laser box */
void unpack_frag16(uint32_t version, const uint32_t* p, TileLaserObject & v);
informations coming from the Laser box [calibration run] */
void unpack_frag16(uint32_t version, const uint32_t* p, TileLaserObject & v); // LASERI
/** unpack_frag17 decodes tile subfragment type 0x17 or 0x20. This subfragment contains
informations coming from the Laser box [calibration run] */
void unpack_frag17(uint32_t version, const uint32_t* p, TileLaserObject & v); // LASERII
/** unpack_brod decodes all ancillary tile subfragments coming from beam ROD
at the testbeam or LASTROD in normal ATLAS configuration */
......@@ -450,6 +454,18 @@ class TileROD_Decoder: public AthAlgTool {
std::vector<int> m_list_of_masked_drawers;
void initHid2re();
const uint32_t * get_data(const ROBData * rob) {
const uint32_t * p;
if (rob->rod_status_position()==0 &&
rob->rod_nstatus() + rob->rod_header_size_word() + rob->rod_trailer_size_word() >= rob->rod_fragment_size_word()) {
rob->rod_status(p);
} else {
rob->rod_data(p);
}
return p;
}
uint32_t data_size(const ROBData * rob) {
uint32_t size = rob->rod_ndata();
uint32_t max_allowed_size = rob->rod_fragment_size_word();
......@@ -567,6 +583,12 @@ void TileROD_Decoder::make_copy(const ROBData * rob, pDigiVec & pDigits, pRwChVe
v.setDetEvType(rob->rod_detev_type());
v.setRODBCID(rob->rod_bc_id());
for (unsigned int i = 0; i < 6; ++i) {
for (size_t j=m_rawchannelMetaData[i]->size(); j<2; ++j) {
m_rawchannelMetaData[i]->push_back(0);
}
}
v.setFragGlobalCRC((*(m_rawchannelMetaData[0]))[0]);
v.setFragDSPBCID((*(m_rawchannelMetaData[0]))[1]);
v.setFragBCID((*(m_rawchannelMetaData[1]))[0]);
......@@ -671,18 +693,19 @@ void TileROD_Decoder::fillCollection(const ROBData * rob, COLLECTION & v) {
uint32_t wc = 0;
uint32_t size = data_size(rob);
const uint32_t * p;
rob->rod_data(p);
const uint32_t * p = get_data(rob);
// bool skipWords = ( ! isBeamROD && version == 0x1 );
// std::cout << " *(p) = 0x" << std::hex << (*(p)) << std::dec << std::endl;
bool V3format = (*(p) == 0xff1234ff); // additional frag marker since Sep 2005
V3format |= (*(p) == 0x00123400); // additional frag marker since Sep 2005 (can appear in buggy ROD frags)
if (V3format) {
++p; // skip frag marker
m_sizeOverhead = 3;
} else {
m_sizeOverhead = 2;
if (size) {
bool V3format = (*(p) == 0xff1234ff); // additional frag marker since Sep 2005
V3format |= (*(p) == 0x00123400); // additional frag marker since Sep 2005 (can appear in buggy ROD frags)
if (V3format) {
++p; // skip frag marker
m_sizeOverhead = 3;
} else {
m_sizeOverhead = 2;
}
}
//std::cout << std::hex << " frag_id " << frag_id << " mask " << mask
......
......@@ -122,7 +122,7 @@ TileCellCont::initialize() {
m_mbts_rods.push_back(src.getRodID(frag));
m_mbts_IDs.push_back(((section-1)*64+drawer));
CaloDetDescrElement * caloDDE = (mbtsMgr) ? mbtsMgr->get_element(cell_id) : NULL;
TileCell* myMBTSCell = new TileCell(caloDDE,cell_id,0.0,0.0);
TileCell* myMBTSCell = new TileCell(caloDDE,cell_id,0.0,0.0,0,0,CaloGain::TILEONELOW);
m_MBTS->push_back(myMBTSCell);
m_mapMBTS[frag]=mbts_count;
mbts_count++;
......@@ -152,7 +152,7 @@ TileCellCont::initialize() {
cell_hash = tmp[i].second;
++index;
CaloDetDescrElement * caloDDE = tileMgr->get_cell_element((IdentifierHash)cell_hash);
TileCell * pCell = new TileCell(caloDDE,0.0,0.0);
TileCell * pCell = new TileCell(caloDDE,0.0,0.0,0,0,CaloGain::TILELOWLOW);
newColl->push_back(pCell);
}
Rw2Cell[tmp[i].first]=index;
......
......@@ -145,7 +145,12 @@ void TileHid2RESrcID::setROD2ROBmap (const eformat::FullEventFragment<const uint
if ( size > 0 ) {
const uint32_t * data;
robf.rod_data(data);
if (robf.rod_status_position()==0 &&
robf.rod_nstatus() + robf.rod_header_size_word() + robf.rod_trailer_size_word() >= robf.rod_fragment_size_word()) {
robf.rod_status(data);
} else {
robf.rod_data(data);
}
switch ( subdet_id ) {
case TILE_BEAM_ID: // TILE BEAM ROD
......
......@@ -9,6 +9,7 @@
#include "TileByteStream/TileLaserObjByteStreamCnv.h"
#include "TileByteStream/TileLaserObjByteStreamTool.h"
#include "TileByteStream/TileROD_Decoder.h"
#include "TileByteStream/TileHid2RESrcID.h"
#include "ByteStreamCnvSvc/ByteStreamCnvSvc.h"
#include "ByteStreamCnvSvcBase/ByteStreamCnvSvcBase.h"
......@@ -23,6 +24,7 @@
#include "GaudiKernel/IRegistry.h"
#include "GaudiKernel/IToolSvc.h"
#include "TileIdentifier/TileTBFrag.h"
#include "TileEvent/TileLaserObject.h"
#include "StoreGate/StoreGate.h"
......@@ -106,8 +108,10 @@ TileLaserObjByteStreamCnv::initialize()
}
m_ROBID.clear();
// m_ROBID.push_back( 0x500000 );
m_ROBID.push_back( 0x520010 );
// m_ROBID.push_back( 0x500000 );
// m_ROBID.push_back( 0x520010 );
const TileHid2RESrcID * hid2re = m_decoder->getHid2re();
m_ROBID.push_back( hid2re->getRobFromFragID(LASER_OBJ_FRAG) );
return service("StoreGateSvc",m_storeGate) ;
}
......
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