#include <RawDataEvent.h>
Collaboration diagram for RawDataEvent:
Public Member Functions | |
RawDataEvent () | |
start of class definition | |
virtual | ~RawDataEvent () |
void | print () |
void | clear () |
reset the vector of modules | |
bool | isInvalidData () |
bit test tools | |
bool | isNotMatchTriggerNumber () |
bool | isCBLTRawFormat () |
bool | isCBLTHeader () |
DayaBay::Trigger::TriggerType_t | triggerType () |
tools for dyb conventions | |
Site::Site_t | siteId () |
DetectorId::DetectorId_t | detectorId () |
Public Attributes | |
FileHeader * | m_fileHeader |
file-wise information | |
FileFooter * | m_fileFooter |
int | m_dataBlockNum |
information in data_separator_record | |
int | m_dataBlockSize |
int | m_formatVersionMajor |
information in event header | |
int | m_formatVersionMinor |
int | m_evtSize |
int | m_detId |
int | m_siteId |
int | m_positionId |
int | m_runNum |
int | m_evtNum |
int | m_dataType |
int | m_dataTypeSpecific |
int | m_dataStatus |
std::vector< unsigned int > | m_rawBuffer |
std::vector< Rom * > | m_modules |
modules' information | |
Classes | |
class | FadcChannel |
class | FileFooter |
sub-class of file_end_record More... | |
class | FileHeader |
sub-class for records other than event records More... | |
class | LtbFrame |
class | LtbFrameUnix |
class | LtbFrameUTC |
class | PmtChannel |
sub-class of PMT channel More... | |
class | Rom |
sub-class for a Readout Module More... | |
class | RomFadc |
class | RomFee |
class | RomLtb |
Definition at line 11 of file RawDataEvent.h.
RawDataEvent::RawDataEvent | ( | ) | [inline] |
start of class definition
Definition at line 251 of file RawDataEvent.h.
00251 { 00252 m_fileHeader = new FileHeader(); 00253 m_fileFooter = new FileFooter(); 00254 }
virtual RawDataEvent::~RawDataEvent | ( | ) | [inline, virtual] |
Definition at line 256 of file RawDataEvent.h.
00256 { 00257 delete m_fileHeader; 00258 delete m_fileFooter; 00259 m_rawBuffer.clear(); 00260 clear(); 00261 }
void RawDataEvent::print | ( | ) |
Definition at line 179 of file RawDataEvent.cc.
00180 { 00181 GaudiMsgStreams log("RawDataEvent"); 00182 log.verbose() << std::endl 00183 << "<<------------------------------ Start of Decoded Raw Data Event ------------------------------>>" << std::endl 00184 << "Event:" << std::endl 00185 << DYBINDENT << "dataBlockNum=" << m_dataBlockNum << std::endl 00186 << DYBINDENT << "dataBlockSize=" << m_dataBlockSize << std::endl 00187 << DYBINDENT << "formatVersion=" << m_formatVersionMajor << "." << m_formatVersionMinor << std::endl 00188 << DYBINDENT << "evtSize=" << m_evtSize << std::endl 00189 << DYBINDENT << "siteId=" << m_siteId << std::endl 00190 << DYBINDENT << "positionId=" << m_positionId << std::endl 00191 << DYBINDENT << "runNum=" << m_runNum << std::endl 00192 << DYBINDENT << "evtNum=" << m_evtNum << std::endl 00193 << DYBINDENT << "dataType=" << m_dataType << " specific value=" << m_dataTypeSpecific << std::endl 00194 << DYBINDENT << "dataStatus=0x" << std::hex << m_dataStatus << std::dec << std::endl 00195 << DYBINDENT << "total modules=" << m_modules.size() << std::endl; 00196 for (unsigned int i = 0; i < m_modules.size(); i++) { 00197 m_modules[i]->print(); 00198 } 00199 log.verbose() 00200 << "<<------------------------------ End of Decoded Raw Data Event ------------------------------>>" 00201 << endreq; 00202 }
void RawDataEvent::clear | ( | ) | [inline] |
bool RawDataEvent::isInvalidData | ( | ) | [inline] |
bit test tools
Definition at line 304 of file RawDataEvent.h.
00304 { 00305 return test_bit(m_dataStatus, 0); 00306 }
bool RawDataEvent::isNotMatchTriggerNumber | ( | ) | [inline] |
Definition at line 307 of file RawDataEvent.h.
00307 { 00308 return test_bit(m_dataStatus, 1); 00309 }
bool RawDataEvent::isCBLTRawFormat | ( | ) | [inline] |
Definition at line 310 of file RawDataEvent.h.
00310 { 00311 return test_bit(m_dataStatus, 16); 00312 }
bool RawDataEvent::isCBLTHeader | ( | ) | [inline] |
Definition at line 313 of file RawDataEvent.h.
00313 { 00314 return test_bit(m_dataStatus, 17); 00315 }
DayaBay::Trigger::TriggerType_t RawDataEvent::triggerType | ( | ) | [inline] |
tools for dyb conventions
loop on LTB data frames
Definition at line 320 of file RawDataEvent.h.
00320 { 00321 00322 unsigned int triType = 0; 00323 00324 for (unsigned int i = 0; i < m_modules.size(); i++) { 00325 if(m_modules[i]->m_type == dyb::kRomLtb) { 00326 RawDataEvent::RomLtb* romLtb; 00327 romLtb = dynamic_cast<RawDataEvent::RomLtb*>(m_modules[i]); 00328 00330 for (unsigned int j = 0; j < romLtb->m_frames.size(); j++) { 00331 //std::cout<<romLtb->m_frames[j].m_triggerSrc<<std::endl; 00332 if(romLtb->m_frames[j]->m_triggerSrc & (1<<0) ) { //MANUAL_TRIGGER 00333 triType = triType | DayaBay::Trigger::kManual; 00334 } 00335 if(romLtb->m_frames[j]->m_triggerSrc & (1<<1) ) { //CROSS_TRIGGER_IN 00336 triType = triType | DayaBay::Trigger::kExternal; 00337 } 00338 if(romLtb->m_frames[j]->m_triggerSrc & (1<<2) ) { //PERIODIC_TRIGGER 00339 triType = triType | DayaBay::Trigger::kPeriodic; 00340 } 00341 if(romLtb->m_frames[j]->m_triggerSrc & (1<<8) ) { //MULTIPLICITY_TRIGGER 00342 triType = triType | DayaBay::Trigger::kMult; 00343 } 00344 if(romLtb->m_frames[j]->m_triggerSrc & (1<<9) ) { //ESUM_ADC_TRG 00345 triType = triType | DayaBay::Trigger::kESumADC; 00346 } 00347 if(romLtb->m_frames[j]->m_triggerSrc & (1<<10) ) { //HIGH_ESUM_COMP_TRG 00348 triType = triType | DayaBay::Trigger::kESumHigh; 00349 } 00350 if(romLtb->m_frames[j]->m_triggerSrc & (1<<11) ) { //LOW_ESUM_COMP_TRG 00351 triType = triType | DayaBay::Trigger::kESumLow; 00352 } 00353 if(romLtb->m_frames[j]->m_triggerSrc & (1<<12) ) { //ALL_ESUM_COMP_TRG 00354 triType = triType | DayaBay::Trigger::kESumAll; 00355 } 00356 00357 break; // use the first ltb frame 00358 } 00359 00360 break; 00361 } 00362 } 00363 00364 return (DayaBay::Trigger::TriggerType_t)( triType | (detectorId() << 2)); 00365 }
Site::Site_t RawDataEvent::siteId | ( | ) | [inline] |
Definition at line 368 of file RawDataEvent.h.
00368 { 00369 return (Site::Site_t)(m_siteId == 0 ? m_siteId : 1 << (m_siteId - 1)); 00370 }
DetectorId::DetectorId_t RawDataEvent::detectorId | ( | ) | [inline] |
Definition at line 372 of file RawDataEvent.h.
00372 { 00373 return (DetectorId::DetectorId_t)m_positionId; 00374 }
Definition at line 280 of file RawDataEvent.h.
Definition at line 284 of file RawDataEvent.h.
Definition at line 288 of file RawDataEvent.h.
Definition at line 289 of file RawDataEvent.h.
Definition at line 290 of file RawDataEvent.h.
Definition at line 291 of file RawDataEvent.h.
Definition at line 292 of file RawDataEvent.h.
Definition at line 293 of file RawDataEvent.h.
Definition at line 294 of file RawDataEvent.h.
Definition at line 295 of file RawDataEvent.h.
Definition at line 296 of file RawDataEvent.h.
Definition at line 297 of file RawDataEvent.h.
std::vector<unsigned int> RawDataEvent::m_rawBuffer |
Definition at line 298 of file RawDataEvent.h.
std::vector<Rom*> RawDataEvent::m_modules |