| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

RawDataInputSvc Class Reference

#include <RawDataInputSvc.h>

Inheritance diagram for RawDataInputSvc:

[legend]
Collaboration diagram for RawDataInputSvc:
[legend]
List of all members.

Public Types

 SUCCESS
 NO_INTERFACE
 VERSMISMATCH
 LAST_ERROR
enum  Status

Public Member Functions

 RawDataInputSvc (const std::string &name, ISvcLocator *svcloc)
 ~RawDataInputSvc ()
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppRaw)
virtual StatusCode initialize ()
virtual StatusCode finalize ()
virtual RawDataEventcurrentEvent ()
 implement interface
virtual StatusCode nextEvent ()
DayaBay::RawEventcurrentRawEvent ()
 the following is added to read raw data without intermediate data object
DayaBay::RawEventcurrentRawEventClone ()
virtual unsigned long addRef ()
virtual unsigned long release ()
virtual const std::string & name () const
virtual const InterfaceIDtype () const
virtual StatusCode configure ()
virtual StatusCode start ()
virtual StatusCode stop ()
virtual StatusCode terminate ()
virtual Gaudi::StateMachine::State FSMState () const
virtual Gaudi::StateMachine::State targetFSMState () const
virtual StatusCode reinitialize ()
virtual StatusCode restart ()
virtual StatusCode sysInitialize ()
virtual StatusCode sysStart ()
virtual StatusCode sysStop ()
virtual StatusCode sysFinalize ()
virtual StatusCode sysReinitialize ()
virtual StatusCode sysRestart ()
virtual StatusCode setProperty (const Property &p)
virtual StatusCode setProperty (const std::string &s)
virtual StatusCode setProperty (const std::string &n, const std::string &v)
StatusCode setProperty (const std::string &name, const TYPE &value)
virtual StatusCode getProperty (Property *p) const
virtual const PropertygetProperty (const std::string &name) const
virtual StatusCode getProperty (const std::string &n, std::string &v) const
virtual const std::vector<
Property * > & 
getProperties () const
ISvcLocatorserviceLocator () const
IMessageSvcmsgSvc ()
IMessageSvcmsgSvc () const
IMessageSvcmessageService ()
IMessageSvcmessageService () const
StatusCode setProperties ()
StatusCode service (const std::string &name, T *&psvc, bool createIf=true) const
StatusCode service (const std::string &svcType, const std::string &svcName, T *&psvc) const
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
IAuditorSvcauditorSvc () const

Static Public Member Functions

static const InterfaceIDinterfaceID ()
static const InterfaceIDinterfaceID ()
static const InterfaceIDinterfaceID ()
static const InterfaceIDinterfaceID ()
 Retrieve interface ID.

Public Attributes

 SUCCESS
 NO_INTERFACE
 VERSMISMATCH
 LAST_ERROR
unsigned int m_inputSvcVersion
bool m_usePacked
bool m_useUnpacked
unsigned int m_fileYear
unsigned int m_fileMonth
unsigned int m_fileDay
unsigned int m_utcDay

Protected Member Functions

int outputLevel () const

Protected Attributes

IntegerProperty m_outputLevel
Gaudi::StateMachine::State m_state
Gaudi::StateMachine::State m_targetState
IMessageSvcm_messageSvc

Private Member Functions

StatusCode nextInputFile ()
 open next input file
uint32_t nextRecord ()
 read next record from raw data file stream
void setBuffer (uint32_t size)
 set buffer for event data block
void readRawEventBuffer ()
 read/decode the raw event information from buffer
int readRomData (RawDataEvent::RomFee *rom, int &offset, const int &romDataSize)
int readRomData (RawDataEvent::RomFadc *rom, int &offset, const int &romDataSize)
int readRomData (RawDataEvent::RomLtb *rom, int &offset, const int &romDataSize)
int readRomDataUTC (RawDataEvent::RomLtb *rom, int &offset, const int &romDataSize)
int readRomDataUnix (RawDataEvent::RomLtb *rom, int &offset, const int &romDataSize)
void printEvent ()
 print event information
int queryRawFileFromDB ()
 Query Raw Data File Info from DB.

Private Attributes

std::vector< std::string > m_inputFiles
IInputStreamm_inputStream
RawDataEventm_rawDataEvent
int m_bufferSize
 pointer to buffer for event data block
char * m_buffer
int m_printFreq
bool m_isFileHeaderPrinted
bool m_includeRawEvent
bool m_ifRawEventHeader
int m_samplingInterval
 for data sampling
int m_randomEvtNum
int m_SeqNo
 for query raw data files from database
bool m_IsDBI
DayaBay::RawDataReaderm_reader
DayaBay::RawEventm_rawEvent
DayaBay::RawEventm_rawEventClone

Friends

friend class ServiceManager

Detailed Description

Definition at line 19 of file RawDataInputSvc.h.


Constructor & Destructor Documentation

RawDataInputSvc::RawDataInputSvc ( const std::string &  name,
ISvcLocator svcloc 
)

RawDataInputSvc::~RawDataInputSvc (  ) 

Definition at line 49 of file RawDataInputSvc.cc.

00050 {
00051   MsgStream log(msgSvc(), name());
00052   log << MSG::DEBUG << "~RawDataInputSvc()" << endreq;
00053   delete m_rawDataEvent;
00054 }


Member Function Documentation

StatusCode RawDataInputSvc::queryInterface ( const InterfaceID riid,
void **  ppRaw 
) [virtual]

Reimplemented from Service.

Definition at line 109 of file RawDataInputSvc.cc.

00110 {
00111   MsgStream log(msgSvc(), name());
00112   log << MSG::DEBUG << "queryInterface(" << riid.id() << "." << riid.majorVersion() << "." << riid.minorVersion() << ")" << endreq;
00113   if (IID_IRawDataInputSvc.versionMatch(riid)) {
00114     log << MSG::DEBUG << "--> IRawDataInputSvc" << endreq;
00115     *ppRaw = dynamic_cast<IRawDataInputSvc*>(this);
00116     return StatusCode::SUCCESS;
00117   } else {
00118     log << MSG::DEBUG << "---> other" << endreq;
00119   }
00120   return Service::queryInterface(riid, ppRaw);
00121 }

StatusCode RawDataInputSvc::initialize (  )  [virtual]

Reimplemented from Service.

Definition at line 57 of file RawDataInputSvc.cc.

00058 {
00059   MsgStream log(msgSvc(), name());
00060   log << MSG::DEBUG << "initialize()" << endreq;
00061 
00062   StatusCode sc = Service::initialize();
00063   if (sc.isFailure()) {
00064     log << MSG::ERROR << "parent class failed to initialize" << endreq;
00065     return sc;
00066   }
00067 
00068   if (!m_IsDBI && m_inputFiles.size() == 0 ) {
00069     log << MSG::ERROR << " ==> No raw data files defined for this job!!" << endreq;
00070   } else if (!m_IsDBI ) {
00071     log << MSG::INFO << " ==> there are [" << m_inputFiles.size() << "] raw data files pre-defined." << endreq;
00072   } else {
00073     log << MSG::INFO << " ==> raw data files to be read will be queried from database. "<<endreq;
00074   }
00075 
00076   // check file suffix based on the first file.
00077   string fname = m_inputFiles[0];
00078   string suffix = fname.substr(fname.size()-5,5);
00079 
00080   if( suffix==".data" ) { 
00081     m_inputStream = new IFStream; 
00082     log << MSG::INFO << "Using IFStream for input" << endreq;
00083   }
00084   else if ( suffix==".rraw" ) {
00085     m_inputStream = new RRawStream; 
00086     log << MSG::INFO << "Using RRawStream for input" << endreq;
00087   }
00088 
00089   // opening raw data file
00090   sc = nextInputFile();
00091   return sc;
00092 }

StatusCode RawDataInputSvc::finalize (  )  [virtual]

Reimplemented from Service.

Definition at line 96 of file RawDataInputSvc.cc.

00097 {
00098   MsgStream log(msgSvc(), name());
00099   log << MSG::DEBUG << "finalize()" << endreq;
00100   if (m_inputStream->is_open())
00101     m_inputStream->close();
00102 
00103   if (m_buffer != 0) delete[] m_buffer;
00104 
00105   return this->Service::finalize();
00106 }

RawDataEvent * RawDataInputSvc::currentEvent (  )  [virtual]

implement interface

Implements IRawDataInputSvc.

Definition at line 191 of file RawDataInputSvc.cc.

00192 {
00193   MsgStream log(msgSvc(), name());
00194   log << MSG::DEBUG << "currentEvent()" << endreq;
00195   return  m_rawDataEvent;
00196 }

StatusCode RawDataInputSvc::nextEvent (  )  [virtual]

Implements IRawDataInputSvc.

Definition at line 218 of file RawDataInputSvc.cc.

00219 {
00220   MsgStream log(msgSvc(), name());
00221   log << MSG::DEBUG << "nextEvent()" << endreq;
00222 
00223   StatusCode sc = StatusCode::SUCCESS;
00224 
00225 
00226   if(m_inputSvcVersion==2) {
00227     DayaBay::RawEvent* event = 0;
00228     while( !event ){
00229 
00230       DayaBay::RawRecord* record = m_reader->nextRecord();
00231       if(!record){
00232         log << MSG::ERROR << "Failed to read next record" << endreq;
00233         return StatusCode::FAILURE;
00234       }
00235 
00236       log << MSG::DEBUG << "Record type: 0x" << hex << record->type() << dec << endreq;
00237 
00238       if( !record->isDataSeparator() ){
00239         std::stringstream message;
00240         record->dump( message );
00241         log << MSG::INFO << message.str() << endreq;
00242         if( record->isFileStart() ){
00243           DayaBay::RawFileStart* fileStart = dynamic_cast<DayaBay::RawFileStart*>(record);
00244           if(fileStart){
00245             m_fileYear = fileStart->date() % 10000;
00246             m_fileMonth = (fileStart->date() / 10000) % 100;
00247             m_fileDay = (fileStart->date() / 1000000) % 100;
00248             m_utcDay = 0;
00249           }
00250         }
00251         if( record->isFileEnd() ){
00252           //End of file.
00253           sc = nextInputFile();
00254           if(sc != StatusCode::SUCCESS) {
00255             delete record;
00256             return sc;
00257           }
00258           //delete m_reader;
00259           //m_reader = 0; 
00260         }
00261         delete record;
00262         continue;
00263       }
00264 
00265       DayaBay::RawDataSeparator* dataSeparator =
00266         dynamic_cast<DayaBay::RawDataSeparator*>(record);
00267       if( !dataSeparator ){
00268         log << MSG::ERROR << "Failed to process data separator" << endreq;
00269         std::stringstream message;
00270         record->dump( message );
00271         log << MSG::ERROR << message.str() << endreq;
00272         delete record;
00273         return StatusCode::FAILURE;
00274       }
00275 
00276       DayaBay::RawData* data = dataSeparator->data();
00277       if( !data ){
00278         log << MSG::ERROR << "Failed to load payload data" << endreq;
00279         std::stringstream message;
00280         record->dump( message );
00281         log << MSG::ERROR << message.str() << endreq;
00282         delete record;
00283         return StatusCode::FAILURE;
00284       }
00285 
00286       if( !data->isEventType() ){
00287         std::stringstream message;
00288         data->dump( message );
00289         log << MSG::INFO << message.str() << endreq;
00290         delete data;
00291         delete record;
00292         return sc;
00293       }
00294 
00295       event = dynamic_cast<DayaBay::RawEvent*>(data);
00296       if( !event ){
00297         log << MSG::ERROR << "Failed to read event" << endreq;
00298         std::stringstream message;
00299         data->dump( message );
00300         log << MSG::ERROR << message.str() << endreq;
00301         delete data;
00302         delete record;
00303         return StatusCode::FAILURE;
00304       }
00305 
00306       // data sampling
00307       if(event->eventId() % m_samplingInterval != 0) {
00308         event = 0;
00309         delete data;
00310         delete record;
00311         continue;
00312       }
00313 
00314       m_rawEvent = event;
00315       if(m_ifRawEventHeader) m_rawEventClone = m_rawEvent->clone();
00316     }
00317   }
00318 
00319   else {
00320     // read next record from the file stream, and return the record marker.
00321     uint32_t recordMarker = nextRecord();
00322 
00323     //check the record marker, decode the record and decide work flow accordingly.
00324     switch (recordMarker) {
00325       case kFileStartRecord:
00326       case kFileNameStrings:
00327       case kMetadataStrings:
00328       case kRunParametersRecord:
00329       case kCalibrationParametersRecord:
00330         sc = nextEvent();
00331         break;
00332       case kDataSeparatorRecord: // event data record
00333         sc = StatusCode::SUCCESS;
00334         break;
00335       case kFileEndRecord:
00336         sc = nextInputFile();
00337         if (sc.isSuccess()) {
00338           sc = nextEvent();
00339         }
00340         break;
00341       default:
00342         log << MSG::WARNING << "unknown recordMarker=" << hex << recordMarker << endreq;
00343         sc = StatusCode::FAILURE;
00344         break;
00345     }
00346   }
00347 
00348   return sc;
00349 }

StatusCode RawDataInputSvc::nextInputFile (  )  [private]

open next input file

control file header print

Definition at line 125 of file RawDataInputSvc.cc.

00126 {
00127   MsgStream log(msgSvc(), name());
00128   log << MSG::DEBUG << "nextInputFile()" << endreq;
00129 
00130   if(m_inputSvcVersion==2) {
00131     // Delete old file reader
00132     if(m_reader){
00133       delete m_reader;
00134       m_reader=0;
00135     }
00136   }
00137 
00139   m_isFileHeaderPrinted = false;
00140 
00141   static unsigned int i = 0;
00142   if ( i >= m_inputFiles.size() ) {
00143     if ( !m_IsDBI ) {
00144       log << MSG::WARNING << "no more raw data file." << endreq;
00145       return StatusCode::FAILURE;
00146     } else  {
00147       if(  queryRawFileFromDB() > 0 ) {
00148         i=0;
00149         nextInputFile();
00150       } else{
00151         //need more considering based on SeqNo.
00152         //........................
00153         log << MSG::WARNING << "no more raw data file." << endreq;
00154         return StatusCode::FAILURE;
00155       }  
00156     } 
00157   }
00158 
00159   if(m_inputSvcVersion==2) {
00160     // Create new file reader
00161     m_reader = new DayaBay::RawDataReader;
00162     if(!m_reader){
00163       log << MSG::ERROR << "Failed to create new file reader" << endreq;
00164       return StatusCode::FAILURE;
00165     }
00166 
00167     if(!m_reader->open( m_inputFiles[i].c_str() )){
00168       log << MSG::ERROR << "Failed to open input file: " << m_inputFiles[i]
00169         << endreq;
00170       delete m_reader;
00171       m_reader=0;
00172       return StatusCode::FAILURE;
00173     }
00174   }
00175 
00176   // close the input stream if it's open
00177   if (m_inputStream->is_open()) m_inputStream->close();
00178 
00179   string fn = m_inputFiles[i++];
00180   m_inputStream->open(fn.c_str());
00181   if (!m_inputStream->good()) {
00182     log << MSG::ERROR << "Failed opening the raw data file: " << fn << endreq;      return StatusCode::FAILURE;
00183   }
00184 
00185   log << MSG::INFO << "Success opening the raw data file: " << fn << endreq;
00186   return StatusCode::SUCCESS;
00187 }

uint32_t RawDataInputSvc::nextRecord (  )  [private]

read next record from raw data file stream

Definition at line 353 of file RawDataInputSvc.cc.

00354 {
00355   MsgStream log(msgSvc(), name());
00356   log << MSG::DEBUG << "nextRecord()" << endreq;
00357 
00358   uint32_t temp, recordMarker, recordSize;
00359   unsigned int readSize = 0; // size has been read in 4bytes
00360 
00361   // read record marker
00362   m_inputStream->read((char*)(&temp), 4);
00363   recordMarker = temp;
00364   readSize++;
00365   // read record size
00366   m_inputStream->read((char*)(&temp), 4);
00367   recordSize = temp; // in 4*bytes
00368   readSize++;
00369   log << MSG::DEBUG << "  recordMarker=0x" << hex << recordMarker << " recordSize=" << dec << recordSize << "*4 bytes" << endreq;
00370   // read record data
00371   switch (recordMarker) {
00372     case kFileStartRecord:
00373       log << MSG::DEBUG << "kFileStartRecord" << endreq;
00374       m_inputStream->read((char*)(&temp), 4);
00375       m_rawDataEvent->m_fileHeader->m_version = temp;
00376       readSize++;
00377       m_inputStream->read((char*)(&temp), 4);
00378       m_rawDataEvent->m_fileHeader->m_fileNumber = temp;
00379       readSize++;
00380       m_inputStream->read((char*)(&temp), 4);
00381       m_rawDataEvent->m_fileHeader->m_date = temp;
00382       readSize++;
00383       m_inputStream->read((char*)(&temp), 4);
00384       m_rawDataEvent->m_fileHeader->m_time = temp;
00385       readSize++;
00386       m_inputStream->read((char*)(&temp), 4);
00387       m_rawDataEvent->m_fileHeader->m_sizeLimitBlocks = temp;
00388       readSize++;
00389       m_inputStream->read((char*)(&temp), 4);
00390       m_rawDataEvent->m_fileHeader->m_sizeLimitMB = temp;
00391       readSize++;
00392       break;
00393     case kFileNameStrings:
00394       log << MSG::DEBUG << "kFileNameStrings" << endreq;
00395       int length, padding;
00396 
00397       // appName
00398       m_inputStream->read((char*)(&temp), 4);
00399       length = temp;
00400       readSize++;
00401       m_rawDataEvent->m_fileHeader->m_appName.clear();
00402       for (int i = 0; i < length; i++) {
00403         char ctemp;
00404         m_inputStream->read(&ctemp, 1);
00405         m_rawDataEvent->m_fileHeader->m_appName.append(1, ctemp);
00406       }
00407       padding = length % 4;
00408       if (padding > 0) {
00409         padding = 4 - padding;
00410         m_inputStream->read((char*)(&temp), padding);
00411       }
00412       readSize += (length + padding) / 4;
00413 
00414       // fileNameTag
00415       m_inputStream->read((char*)(&temp), 4);
00416       length = temp;
00417       readSize++;
00418       m_rawDataEvent->m_fileHeader->m_fileNameTag.clear();
00419       for (int i = 0; i < length; i++) {
00420         char ctemp;
00421         m_inputStream->read(&ctemp, 1);
00422         m_rawDataEvent->m_fileHeader->m_fileNameTag.append(1, ctemp);
00423       }
00424       padding = length % 4;
00425       if (padding > 0) {
00426         padding = 4 - padding;
00427         m_inputStream->read((char*)(&temp), padding);
00428       }
00429       readSize += (length + padding) / 4;
00430 
00431       break;
00432     case kMetadataStrings:
00433       log << MSG::DEBUG << "kMetadataStrings" << endreq;
00434       m_inputStream->read((char*)(&temp), 4);
00435       int nstr;
00436       nstr = temp;
00437       readSize++;
00438       m_rawDataEvent->m_fileHeader->m_metadataString.clear();
00439       for (int j = 0; j < nstr; j++) {
00440         m_inputStream->read((char*)(&temp), 4);
00441         length = temp;
00442         readSize++;
00443         string str;
00444         for (int i = 0; i < length; i++) {
00445           char ctemp;
00446           m_inputStream->read(&ctemp, 1);
00447           str.append(1, ctemp);
00448         }
00449         m_rawDataEvent->m_fileHeader->m_metadataString.push_back(str);
00450 
00451         padding = length % 4;
00452         if (padding > 0) {
00453           padding = 4 - padding;
00454           m_inputStream->read((char*)(&temp), padding);
00455         }
00456         readSize += (length + padding) / 4;
00457       }
00458       break;
00459     case kRunParametersRecord:
00460       m_inputStream->read((char*)(&temp), 4);
00461       m_rawDataEvent->m_fileHeader->m_runNumber = temp;
00462       readSize++;
00463       m_inputStream->read((char*)(&temp), 4);
00464       m_rawDataEvent->m_fileHeader->m_recEnable = temp;
00465       readSize++;
00466       m_inputStream->read((char*)(&temp), 4);
00467       m_rawDataEvent->m_fileHeader->m_triggerType = temp;
00468       readSize++;
00469       m_inputStream->read((char*)(&temp), 4);
00470       m_rawDataEvent->m_fileHeader->m_detectorMask = temp;
00471       readSize++;
00472       break;
00473     case kCalibrationParametersRecord:
00474       // offline should find a place to record calibration parameters
00475       // may be RunData, but it needs to be consistent with raw data
00476       m_inputStream->ignore((recordSize - 2)*4);
00477       readSize += recordSize - 2;
00478       break;
00479     case kDataSeparatorRecord: // event data record
00480       log << MSG::DEBUG << "kDataSeparatorRecord" << endreq;
00481       m_inputStream->read((char*)(&temp), 4);
00482       m_rawDataEvent->m_dataBlockNum = temp;
00483       readSize++;
00484       m_inputStream->read((char*)(&temp), 4);
00485       m_rawDataEvent->m_dataBlockSize = temp; // in bytes
00486       readSize++;
00487       log << MSG::DEBUG << " m_dataBlockNum = " << m_rawDataEvent->m_dataBlockNum 
00488         << ", m_dataBlockSize = " << m_rawDataEvent->m_dataBlockSize << endreq;
00489 
00490 
00491       if(m_rawDataEvent->m_dataBlockNum % m_samplingInterval != 0) {
00492         m_inputStream->ignore(m_rawDataEvent->m_dataBlockSize);
00493         // temporarily return kMetadataStrings to skip this event
00494         recordMarker = kMetadataStrings;
00495       } else {
00496         // read the following event data block into buffer
00497         setBuffer(m_rawDataEvent->m_dataBlockSize);
00498         m_inputStream->read(m_buffer, m_rawDataEvent->m_dataBlockSize);
00499 
00500         readRawEventBuffer();
00501       }
00502       break;
00503     case kFileEndRecord:
00504       log << MSG::DEBUG << "kFileEndRecord" << endreq;
00505       m_inputStream->read((char*)(&temp), 4);
00506       m_rawDataEvent->m_fileFooter->m_dateEnd = temp;
00507       readSize++;
00508       m_inputStream->read((char*)(&temp), 4);
00509       m_rawDataEvent->m_fileFooter->m_timeEnd = temp;
00510       readSize++;
00511       m_inputStream->read((char*)(&temp), 4);
00512       m_rawDataEvent->m_fileFooter->m_eventsInFile = temp;
00513       readSize++;
00514       m_inputStream->read((char*)(&temp), 4);
00515       m_rawDataEvent->m_fileFooter->m_dataInFile = temp;
00516       readSize++;
00517       m_inputStream->read((char*)(&temp), 4);
00518       m_rawDataEvent->m_fileFooter->m_eventsInRun = temp;
00519       readSize++;
00520       m_inputStream->read((char*)(&temp), 4);
00521       m_rawDataEvent->m_fileFooter->m_dataInRun = temp;
00522       readSize++;
00523       m_inputStream->read((char*)(&temp), 4);
00524       m_rawDataEvent->m_fileFooter->m_status = temp;
00525       readSize++;
00526       m_inputStream->read((char*)(&temp), 4);
00527       uint32_t endMarker;
00528       endMarker = temp;
00529       readSize++;
00530       if (endMarker != kFileEndMarker) {
00531         log << MSG::WARNING << "file end marker wrong"
00532           << " expected=0x" << hex << kFileEndMarker
00533           << " real=0x" << endMarker
00534           << dec << endreq;
00535       }
00536       m_rawDataEvent->m_fileFooter->print();
00537       break;
00538     default:
00539       log << MSG::WARNING << "unknown recordMarker=0x" << hex << recordMarker << dec << endreq;
00540       break;
00541   }
00542 
00543   // check consistency
00544   if (readSize != recordSize) {
00545     log << MSG::WARNING << "read size NOT equal to record size:"
00546       << " recordMarker=0x" << hex << recordMarker << dec
00547       << " recordSize=" << recordSize
00548       << " readSize=" << readSize
00549       << endreq;
00550 
00551     // skip left bytes
00552     if (readSize < recordSize) {
00553       m_inputStream->ignore((recordSize - readSize)*4);
00554     }
00555   }
00556 
00557   return recordMarker;
00558 }

void RawDataInputSvc::setBuffer ( uint32_t  size  )  [inline, private]

set buffer for event data block

Definition at line 43 of file RawDataInputSvc.h.

00043                                  {
00044       if (m_buffer != 0) delete[] m_buffer;
00045       m_buffer = new char[size];
00046       m_bufferSize = size;
00047    }

void RawDataInputSvc::readRawEventBuffer (  )  [private]

read/decode the raw event information from buffer

wangzhe, about trac ticket #359 The unit of size stored in raw data is integer. The unit here in m_evtSize is byte. Please pay attention to any memory copy command. For memcpy, the size of the third parameter is in bype.

wz

Definition at line 562 of file RawDataInputSvc.cc.

00563 {
00564   MsgStream log(msgSvc(), name());
00565   log << MSG::DEBUG << "readRawEventBuffer()" << endreq;
00566 
00567   uint32_t temp;
00568   uint32_t headerMarker;
00569   int offset = 0;
00570   m_rawDataEvent->clear();
00571   while (offset < m_bufferSize) {
00572     memcpy(&temp, m_buffer + offset, 4);
00573     offset += 4;
00574     headerMarker = temp;
00575     log << MSG::VERBOSE << offset - 4 << ": headerMarker=0x" << hex << headerMarker << dec << endreq;
00576     if (headerMarker == kEventHeader) {
00577       // format version
00578       memcpy(&temp, m_buffer + offset, 4);
00579       offset += 4;
00580       m_rawDataEvent->m_formatVersionMajor = get_bits(temp, 24, 8);
00581       m_rawDataEvent->m_formatVersionMinor = get_bits(temp, 16, 8);
00582       // size information
00583       memcpy(&temp, m_buffer + offset, 4);
00584       offset += 4;
00590       m_rawDataEvent->m_evtSize = get_bits(temp, 0, 24) * 4;
00591       if( m_includeRawEvent ){
00592         // Include full raw event if requested
00593         m_rawDataEvent->m_rawBuffer.resize( m_rawDataEvent->m_evtSize );
00594         memcpy(&(m_rawDataEvent->m_rawBuffer[0]),
00595             (unsigned int*)(m_buffer+offset-3*4),
00596             m_rawDataEvent->m_evtSize);
00597       }
00599       // source identifier
00600       memcpy(&temp, m_buffer + offset, 4);
00601       offset += 4;
00602       //m_rawDataEvent->m_detType = get_bits(temp, 4, 4);
00603       m_rawDataEvent->m_detId   = get_bits(temp, 16, 8);
00604       m_rawDataEvent->m_positionId  = get_bits(m_rawDataEvent->m_detId, 0, 4);
00605       m_rawDataEvent->m_siteId   = get_bits(m_rawDataEvent->m_detId, 4, 4);
00606       // run number
00607       memcpy(&temp, m_buffer + offset, 4);
00608       offset += 4;
00609       m_rawDataEvent->m_runNum = temp;
00610       // event Id
00611       memcpy(&temp, m_buffer + offset, 4);
00612       offset += 4;
00613       m_rawDataEvent->m_evtNum = temp;
00614       // detector data type
00615       memcpy(&temp, m_buffer + offset, 4);
00616       offset += 4;
00617       m_rawDataEvent->m_dataType  = get_bits(temp, 28, 4);
00618       m_rawDataEvent->m_dataTypeSpecific = get_bits(temp, 0, 16);
00619       // data status
00620       memcpy(&temp, m_buffer + offset, 4);
00621       offset += 4;
00622       m_rawDataEvent->m_dataStatus = temp;
00623       // end of the Event Header
00624     } else if (headerMarker == kROMHeader) {
00625       int romRead = 4;  // bytes read
00626       // ROM fragment size
00627       memcpy(&temp, m_buffer + offset, 4);
00628       offset += 4;
00629       romRead += 4;
00630       int romSize = get_bits(temp, 0, 24) * 4;
00631       int romDataSize = romSize - get_bits(temp, 24, 8) * 4;
00632       // module identifier
00633       memcpy(&temp, m_buffer + offset, 4);
00634       offset += 4;
00635       romRead += 4;
00636       int romSlot = get_bits(temp, 0, 8);
00637       int romType = get_bits(temp, 8, 8);
00638 
00639       log << MSG::DEBUG << "runNum=" << m_rawDataEvent->m_runNum << " evtNum=" << m_rawDataEvent->m_evtNum << " RomType=" << romType << " romDataSize = " << romDataSize << endreq;
00640 
00641       // read different ROM types
00642       RawDataEvent::Rom* rom;
00643       switch (romType) {
00644         case kRomFee:
00645           rom = new RawDataEvent::RomFee();
00646           romRead += readRomData(dynamic_cast<RawDataEvent::RomFee*>(rom), offset, romDataSize);
00647           break;
00648         case kRomFadc:
00649           rom = new RawDataEvent::RomFadc();
00650           romRead += readRomData(dynamic_cast<RawDataEvent::RomFadc*>(rom), offset, romDataSize);
00651           break;
00652         case kRomLtb:
00653           rom = new RawDataEvent::RomLtb();
00654           romRead += readRomData(dynamic_cast<RawDataEvent::RomLtb*>(rom), offset, romDataSize);
00655           break;
00656         default:
00657           break;
00658       }
00659 
00660       rom->m_size = romSize;
00661       rom->m_slot = romSlot;
00662       rom->m_type = romType;
00663       m_rawDataEvent->m_modules.push_back(rom);
00664 
00665       if (romRead != rom->m_size) {
00666         log << MSG::WARNING << "ROM size=" << rom->m_size << ", read=" << romRead << endreq;
00667       }
00668 
00669     } else {
00670       log << MSG::WARNING << "something is wrong or end of buffer!" << endreq;
00671       log << MSG::WARNING << "  headerMarker=" << hex << headerMarker << dec << endreq;
00672       log << MSG::WARNING << "  offset=" << offset << endreq;
00673       log << MSG::WARNING << "  m_bufferSize=" << m_rawDataEvent->m_dataBlockSize << endreq;
00674       break;
00675     }
00676   }
00677   printEvent();
00678   //m_rawDataEvent->print();
00679 }

int RawDataInputSvc::readRomData ( RawDataEvent::RomFee rom,
int &  offset,
const int &  romDataSize 
) [private]

Definition at line 683 of file RawDataInputSvc.cc.

00684 {
00685   MsgStream log(msgSvc(), name());
00686   log << MSG::DEBUG << "readRomData(RomFee)" << endreq;
00687 
00688   int romDataRead=0;
00689   uint32_t temp;
00690 
00691   int channel, channelLast = -1;
00692   RawDataEvent::PmtChannel pmtChannel;
00693   while (romDataRead < romDataSize) {
00694     // data header
00695     memcpy(&temp, m_buffer + offset, 4);
00696     offset += 4;
00697     romDataRead += 4;
00698     unsigned int dataMarker = get_bits(temp, 29, 3);
00699     log << MSG::VERBOSE << offset - 4 << ": dataMarker=0x" << hex << dataMarker << dec << endreq;
00700     switch (dataMarker) {
00701       case kCBLTHead:
00702         rom->m_cbltModuleType = get_bits(temp, 16, 4);
00703         rom->m_cbltGA  = get_bits(temp, 23, 5);
00704         log << MSG::DEBUG << "GA=" << rom->m_cbltGA << " ModuleType=" << rom->m_cbltModuleType << endreq;
00705         break;
00706       case kDataHead:
00707         rom->m_triggerNum  = get_bits(temp, 0, 8);
00708         rom->m_status  = get_bits(temp, 8, 8);
00709         rom->m_triggerType  = get_bits(temp, 16, 4);
00710         rom->m_version = get_bits(temp, 24, 4);
00711 
00712         // in case of multiple DataHeads
00713         channelLast = -1;
00714         if (pmtChannel.filled()) {
00715           rom->m_channels.push_back(pmtChannel);
00716           pmtChannel.clear();
00717         }
00718         break;
00719       case kDataCharge:
00720         channel = get_bits(temp, 25, 4);
00721         // reset PmtChannel for new channel
00722         if (channel != channelLast) {
00723           if (pmtChannel.filled()) {
00724             rom->m_channels.push_back(pmtChannel);
00725             pmtChannel.clear();
00726           }
00727           channelLast = channel;
00728           pmtChannel.m_channel = channel;
00729         }
00730 
00731         pmtChannel.m_adc.push_back(get_bits(temp, 0, 12));
00732         pmtChannel.m_pedestal.push_back(get_bits(temp, 12, 12));
00733         pmtChannel.m_adcRange.push_back(get_bits(temp, 24, 1));
00734         break;
00735       case kDataTime:
00736         channel = get_bits(temp, 25, 4);
00737         if (channel != pmtChannel.m_channel) {
00738           log << MSG::WARNING << "wrong TDC channel ID: " << channel << " <> PmtChannelId=" << pmtChannel.m_channel << endreq;
00739         }
00740         pmtChannel.m_tdc.push_back(get_bits(temp, 0, 17));
00741         pmtChannel.m_tdcHitCount.push_back(get_bits(temp, 17, 4));
00742         pmtChannel.m_adcPeakingCycle.push_back(get_bits(temp, 21, 4));
00743         break;
00744       case kDataFoot:
00745         rom->m_dataLength  = get_bits(temp, 0, 10);
00746         break;
00747       case kCBLTFoot:
00748         rom->m_cbltDataLength = get_bits(temp, 0, 18);
00749         break;
00750       default:
00751         log << MSG::WARNING << "unknown DataMarker=0x" << hex << dataMarker << dec << endreq;
00752         break;
00753     }
00754     // stop reading data
00755     //if (dataMarker == kDataFoot) break;
00756   } 
00757 
00758   // last PmtChannel
00759   if (pmtChannel.filled()) {
00760     rom->m_channels.push_back(pmtChannel);
00761     pmtChannel.clear();
00762   }
00763 
00764   return romDataRead;
00765 }

int RawDataInputSvc::readRomData ( RawDataEvent::RomFadc rom,
int &  offset,
const int &  romDataSize 
) [private]

Definition at line 769 of file RawDataInputSvc.cc.

00770 {
00771   MsgStream log(msgSvc(), name());
00772   log << MSG::DEBUG << "readRomData(RomFadc)" << endreq;
00773 
00774   int romDataRead=0;
00775   uint32_t temp;
00776 
00777   int channel, channelLast = -1;
00778   RawDataEvent::FadcChannel fadcChannel;
00779   while (romDataRead < romDataSize) {
00780     // data header
00781     memcpy(&temp, m_buffer + offset, 4);
00782     offset += 4;
00783     romDataRead += 4;
00784     unsigned int dataMarker = get_bits(temp, 29, 3);
00785     log << MSG::VERBOSE << offset - 4 << ": dataMarker=0x" << hex << dataMarker << dec << endreq;
00786     switch (dataMarker) {
00787       case kCBLTHead:
00788         rom->m_cbltModuleType = get_bits(temp, 16, 4);
00789         rom->m_cbltGA  = get_bits(temp, 23, 5);
00790         log << MSG::DEBUG << "GA=" << rom->m_cbltGA << " ModuleType=" << rom->m_cbltModuleType << endreq;
00791         break;
00792       case kDataHead:
00793         rom->m_triggerNum  = get_bits(temp, 0, 8);
00794         rom->m_status  = get_bits(temp, 8, 8);
00795         rom->m_triggerType  = get_bits(temp, 16, 4);
00796         rom->m_version = get_bits(temp, 24, 4);
00797 
00798         // in case of multiple DataHeads
00799         channelLast = -1;
00800         if (fadcChannel.filled()) {
00801           rom->m_channels.push_back(fadcChannel);
00802           fadcChannel.clear();
00803         }
00804         break;
00805       case kDataCharge:
00806         channel = get_bits(temp, 24, 4);
00807 
00808         // reset PmtChannel for new channel
00809         if (channel != channelLast) {
00810           if (fadcChannel.filled()) {
00811             rom->m_channels.push_back(fadcChannel);
00812             fadcChannel.clear();
00813           }
00814           channelLast = channel;
00815           fadcChannel.m_channel = channel;
00816         }
00817 
00818         fadcChannel.m_adcData.push_back(get_bits(temp, 16, 8));
00819         fadcChannel.m_adcData.push_back(get_bits(temp, 8, 8));
00820         fadcChannel.m_adcData.push_back(get_bits(temp, 0, 8));
00821         break;
00822       case kDataFoot:
00823         rom->m_dataLength  = get_bits(temp, 0, 10);
00824         break;
00825       case kCBLTFoot:
00826         rom->m_cbltDataLength = get_bits(temp, 0, 18);
00827         break;
00828       default:
00829         log << MSG::WARNING << "unknown DataMarker=0x" << hex << dataMarker << dec << endreq;
00830         break;
00831     }
00832     // stop reading data
00833     //if (dataMarker == kDataFoot) break;
00834   } 
00835 
00836   // last FadcChannel
00837   if (fadcChannel.filled()) {
00838     rom->m_channels.push_back(fadcChannel);
00839     fadcChannel.clear();
00840   }
00841 
00842   return romDataRead;
00843 }

int RawDataInputSvc::readRomData ( RawDataEvent::RomLtb rom,
int &  offset,
const int &  romDataSize 
) [private]

Definition at line 846 of file RawDataInputSvc.cc.

00847 {
00848   MsgStream log(msgSvc(), name());
00849   log << MSG::DEBUG << "readRomData(RomLtb)" << endreq;
00850 
00851   uint32_t temp;
00852   memcpy(&temp, m_buffer + offset + 4*2, 4);
00853   unsigned int dataformat = get_bits(temp, 25, 3);
00854   bool utc = dataformat == 7 ? true : false;
00855 
00856   if(utc) {
00857     return readRomDataUTC(rom,offset,romDataSize);
00858   } else {
00859     return readRomDataUnix(rom,offset,romDataSize);
00860   }
00861 
00862 }

int RawDataInputSvc::readRomDataUTC ( RawDataEvent::RomLtb rom,
int &  offset,
const int &  romDataSize 
) [private]

Definition at line 866 of file RawDataInputSvc.cc.

00868 {
00869   MsgStream log(msgSvc(), name());
00870   log << MSG::DEBUG << "readRomData(RomLtb,LtbFrameUTC)" << endreq;
00871 
00872   int romDataRead=0;
00873   uint32_t temp;
00874 
00875   int nwords=0;
00876   RawDataEvent::LtbFrameUTC *ltbFrame;
00877 
00878   while (romDataRead < romDataSize) {
00879     // data header
00880     memcpy(&temp, m_buffer + offset, 4);
00881     offset += 4;
00882     romDataRead += 4;
00883     unsigned int dataMarker = get_bits(temp, 29, 3);
00884     switch (dataMarker) {
00885       case kCBLTHead:
00886         rom->m_cbltModuleType = get_bits(temp, 16, 4);
00887         rom->m_cbltGA  = get_bits(temp, 23, 5);
00888         log << MSG::DEBUG << "GA=" << rom->m_cbltGA << " ModuleType=" << rom->m_cbltModuleType << endreq;
00889         break;
00890       case kCBLTFoot:
00891         rom->m_cbltDataLength = get_bits(temp, 0, 18);
00892         break;
00893       case kLtbFrame:
00894         switch (nwords%7) {
00895           case 0:
00896             ltbFrame = new RawDataEvent::LtbFrameUTC();
00897             rom->m_frames.push_back(ltbFrame);
00898             ltbFrame->m_triggerSrc      = get_bits(temp, 0, 16);
00899             ltbFrame->m_rot     = get_bits(temp, 16, 2);
00900             ltbFrame->m_iltSn   = get_bits(temp, 18, 6);
00901             ltbFrame->m_clockSystemValid = get_bits(temp, 24, 1) == 1 ? true : false;
00902             ltbFrame->m_timestampType = get_bits(temp, 25, 1) == 1 ? true : false;
00903             ltbFrame->m_GPSValid = get_bits(temp, 26, 1) == 1 ? true : false;
00904             ltbFrame->m_accStat = get_bits(temp, 27, 1) == 1 ? true : false;
00905             break;
00906           case 1:
00907             ltbFrame->m_hour    = get_bits(temp, 0, 6);
00908             ltbFrame->m_day     = get_bits(temp, 6, 10);
00909             break;
00910           case 2:
00911             ltbFrame->m_second  = get_bits(temp, 0, 7);
00912             ltbFrame->m_minute  = get_bits(temp, 7, 7);
00913             ltbFrame->m_nanoSecondLow = get_bits(temp, 16, 4);
00914             ltbFrame->m_accumulationLow = get_bits(temp, 20, 4);
00915             break;
00916           case 3:
00917             ltbFrame->m_nanoSecondHigh = get_bits(temp, 0, 28);
00918             break;
00919           case 4:
00920             ltbFrame->m_accumulationHigh = get_bits(temp, 0, 28);
00921             break;
00922           case 5:
00923             ltbFrame->m_esumADC = get_bits(temp, 0, 12);
00924             ltbFrame->m_esumComp        = get_bits(temp, 12, 3);
00925             ltbFrame->m_hsum    = get_bits(temp, 16, 9);
00926             break;
00927           case 6:
00928             ltbFrame->m_crossTriggerSrc = get_bits(temp, 0, 15);
00929             ltbFrame->m_blockedValidTrigger = get_bits(temp, 16, 10);
00930             ltbFrame->m_feeBufferStat = get_bits(temp, 26, 1) == 1 ? true : false;
00931             break;
00932         }
00933         nwords++;
00934         break;
00935       case kDataHead:           // ignore
00936       case kDataFoot:           // ignore
00937         break;
00938       default:
00939         log << MSG::WARNING << hex << "+0x" << romDataRead << ": unknown DataMarker=0x" << dataMarker << dec << endreq;
00940         break;
00941     }
00942   } 
00943 
00944   if (nwords%7 > 0) {
00945     log << MSG::WARNING << "wrong number of frame words: " << nwords << endreq;
00946   }
00947 
00948   return romDataRead;
00949 }

int RawDataInputSvc::readRomDataUnix ( RawDataEvent::RomLtb rom,
int &  offset,
const int &  romDataSize 
) [private]

Definition at line 953 of file RawDataInputSvc.cc.

00955 {
00956   MsgStream log(msgSvc(), name());
00957   log << MSG::DEBUG << "readRomData(RomLtb,LtbFrameUnix)" << endreq;
00958 
00959   int romDataRead=0;
00960   uint32_t temp;
00961 
00962   int nwords=0;
00963   RawDataEvent::LtbFrameUnix *ltbFrame;
00964 
00965   while (romDataRead < romDataSize) {
00966     // data header
00967     memcpy(&temp, m_buffer + offset, 4);
00968     offset += 4;
00969     romDataRead += 4;
00970     unsigned int dataMarker = get_bits(temp, 29, 3);
00971     switch (dataMarker) {
00972       case kCBLTHead:
00973         rom->m_cbltModuleType = get_bits(temp, 16, 4);
00974         rom->m_cbltGA  = get_bits(temp, 23, 5);
00975         log << MSG::DEBUG << "GA=" << rom->m_cbltGA << " ModuleType=" << rom->m_cbltModuleType << endreq;
00976         break;
00977       case kCBLTFoot:
00978         rom->m_cbltDataLength = get_bits(temp, 0, 18);
00979         break;
00980       case kLtbFrame:
00981         switch (nwords%7) {
00982           case 0:
00983             ltbFrame = new RawDataEvent::LtbFrameUnix();
00984             rom->m_frames.push_back(ltbFrame);
00985             ltbFrame->m_triggerSrc      = get_bits(temp, 0, 16);
00986             ltbFrame->m_rot     = get_bits(temp, 16, 2);
00987             ltbFrame->m_iltSn   = get_bits(temp, 18, 6);
00988             ltbFrame->m_clockSystemValid = get_bits(temp, 24, 1) == 1 ? true : false;
00989             ltbFrame->m_timestampType = get_bits(temp, 25, 1) == 1 ? true : false;
00990             ltbFrame->m_GPSValid = get_bits(temp, 26, 1) == 1 ? true : false;
00991             ltbFrame->m_accStat = get_bits(temp, 27, 1) == 1 ? true : false;
00992             break;
00993           case 1:
00994             ltbFrame->m_unixSecHigh = get_bits(temp, 0, 16);
00995             break;
00996           case 2:
00997             ltbFrame->m_unixSecLow= get_bits(temp, 0, 16);
00998             ltbFrame->m_nanoSecondLow = get_bits(temp, 16, 4);
00999             ltbFrame->m_accumulationLow = get_bits(temp, 20, 4);
01000             break;
01001           case 3:
01002             ltbFrame->m_nanoSecondHigh = get_bits(temp, 0, 28);
01003             break;
01004           case 4:
01005             ltbFrame->m_accumulationHigh = get_bits(temp, 0, 28);
01006             break;
01007           case 5:
01008             ltbFrame->m_esumADC = get_bits(temp, 0, 12);
01009             ltbFrame->m_esumComp        = get_bits(temp, 12, 3);
01010             ltbFrame->m_hsum    = get_bits(temp, 16, 9);
01011             break;
01012           case 6:
01013             ltbFrame->m_crossTriggerSrc = get_bits(temp, 0, 15);
01014             ltbFrame->m_blockedValidTrigger = get_bits(temp, 16, 10);
01015             ltbFrame->m_feeBufferStat = get_bits(temp, 26, 1) == 1 ? true : false;
01016             break;
01017         }
01018         nwords++;
01019         break;
01020       case kDataHead:           // ignore
01021       case kDataFoot:           // ignore
01022         break;
01023       default:
01024         log << MSG::WARNING << hex << "+0x" << romDataRead << ": unknown DataMarker=0x" << dataMarker << dec << endreq;
01025         break;
01026     }
01027   } 
01028 
01029   if (nwords%7 > 0) {
01030     log << MSG::WARNING << "wrong number of frame words: " << nwords << endreq;
01031   }
01032 
01033   return romDataRead;
01034 }

void RawDataInputSvc::printEvent (  )  [private]

print event information

Definition at line 1037 of file RawDataInputSvc.cc.

01038 {
01039   if (!m_isFileHeaderPrinted) {
01040     m_isFileHeaderPrinted = true;
01041     m_rawDataEvent->m_fileHeader->print();
01042   }
01043   if (m_printFreq>0 && m_rawDataEvent->m_evtNum%m_printFreq == 0) m_rawDataEvent->print();
01044 }

int RawDataInputSvc::queryRawFileFromDB (  )  [private]

Query Raw Data File Info from DB.

Definition at line 1047 of file RawDataInputSvc.cc.

01048 {
01049 
01050   MsgStream log(msgSvc(), name());
01051   log << MSG::DEBUG << "QueryRawFileFromDatabase!" << endreq;
01052 
01053   // Query Data with Context 
01054   // TimeStamp tstamp(2009, 8, 26 ,9, 45, 20);
01055   // Context vc(Site::kDayaBay, SimFlag::kMC, tstamp);
01056   //DbiResultPtr<DaqRawDataFileInfo>  m_ResPtr(vc, 0,0);
01057 
01058   // Query Data with SeqNo.
01059   DbiResultPtr<DaqRawDataFileInfo>  m_ResPtr("DaqRawDataFileInfo",m_SeqNo, 0 );
01060   log << MSG::INFO <<"--------------------------------------------------------"<<std::endl;
01061   log << MSG::INFO << m_ResPtr.GetValidityRec()-> GetContextRange().AsString() <<std::endl;
01062   log << MSG::INFO <<" The Num Rows to be queried ==> "<< m_ResPtr.GetNumRows()<< std::endl;
01063 
01064   m_inputFiles.clear();
01065   for ( UInt_t irow = 0; irow < m_ResPtr.GetNumRows(); ++irow) {
01066     const  DaqRawDataFileInfo* ddd1 = m_ResPtr.GetRow(irow);
01067     log << MSG::INFO <<"==> ["<<irow<<"]:"<< "\n"
01068       <<"RUNNO ="         << ddd1-> GetRunNo()<<"\n  "
01069       <<"FileNO ="         << ddd1-> GetFileNo()<<"\n  "
01070       <<"FILENAME="        << ddd1-> GetFileName() <<"\n"
01071       <<"FILESTATE="       << ddd1-> GetFileState() <<"\n"
01072       <<"FILESIZE="        << ddd1-> GetFileSize()<<"\n"
01073       <<"CHECKSUM="        << ddd1-> GetCheckSum()<<"\n"
01074       <<"TRANSFERSTATE="   << ddd1-> GetTransferState()<<std::endl;
01075     m_inputFiles.push_back( ddd1->GetFileName() );
01076   }
01077   m_SeqNo++;
01078   return m_inputFiles.size() ;
01079 }

DayaBay::RawEvent * RawDataInputSvc::currentRawEvent (  )  [virtual]

the following is added to read raw data without intermediate data object

Implements IRawDataInputSvc.

Definition at line 200 of file RawDataInputSvc.cc.

00201 {
00202   MsgStream log(msgSvc(), name());
00203   log << MSG::DEBUG << "currentRawEvent()" << endreq;
00204   return  m_rawEvent;
00205 }

DayaBay::RawEvent * RawDataInputSvc::currentRawEventClone (  )  [virtual]

Implements IRawDataInputSvc.

Definition at line 209 of file RawDataInputSvc.cc.

00210 {
00211   MsgStream log(msgSvc(), name());
00212   log << MSG::DEBUG << "currentRawEventClone()" << endreq;
00213   return  m_rawEventClone;
00214 }

static const InterfaceID& IRawDataInputSvc::interfaceID (  )  [inline, static, inherited]

Retrieve interface ID.

Reimplemented from IInterface.

Definition at line 19 of file IRawDataInputSvc.h.

00019                                            {
00020       return IID_IRawDataInputSvc;
00021    }


Member Data Documentation

std::vector<std::string> RawDataInputSvc::m_inputFiles [private]

Definition at line 63 of file RawDataInputSvc.h.

IInputStream* RawDataInputSvc::m_inputStream [private]

Definition at line 64 of file RawDataInputSvc.h.

RawDataEvent* RawDataInputSvc::m_rawDataEvent [private]

Definition at line 65 of file RawDataInputSvc.h.

int RawDataInputSvc::m_bufferSize [private]

pointer to buffer for event data block

Definition at line 68 of file RawDataInputSvc.h.

char* RawDataInputSvc::m_buffer [private]

Definition at line 69 of file RawDataInputSvc.h.

int RawDataInputSvc::m_printFreq [private]

Definition at line 70 of file RawDataInputSvc.h.

bool RawDataInputSvc::m_isFileHeaderPrinted [private]

Definition at line 71 of file RawDataInputSvc.h.

bool RawDataInputSvc::m_includeRawEvent [private]

Definition at line 72 of file RawDataInputSvc.h.

bool RawDataInputSvc::m_ifRawEventHeader [private]

Definition at line 73 of file RawDataInputSvc.h.

int RawDataInputSvc::m_samplingInterval [private]

for data sampling

Definition at line 76 of file RawDataInputSvc.h.

int RawDataInputSvc::m_randomEvtNum [private]

Definition at line 77 of file RawDataInputSvc.h.

int RawDataInputSvc::m_SeqNo [private]

for query raw data files from database

Definition at line 80 of file RawDataInputSvc.h.

bool RawDataInputSvc::m_IsDBI [private]

Definition at line 81 of file RawDataInputSvc.h.

DayaBay::RawDataReader* RawDataInputSvc::m_reader [private]

Definition at line 90 of file RawDataInputSvc.h.

DayaBay::RawEvent* RawDataInputSvc::m_rawEvent [private]

Definition at line 91 of file RawDataInputSvc.h.

DayaBay::RawEvent* RawDataInputSvc::m_rawEventClone [private]

Definition at line 92 of file RawDataInputSvc.h.

unsigned int IRawDataInputSvc::m_inputSvcVersion [inherited]

Definition at line 29 of file IRawDataInputSvc.h.

bool IRawDataInputSvc::m_usePacked [inherited]

Definition at line 31 of file IRawDataInputSvc.h.

bool IRawDataInputSvc::m_useUnpacked [inherited]

Definition at line 33 of file IRawDataInputSvc.h.

unsigned int IRawDataInputSvc::m_fileYear [inherited]

Definition at line 35 of file IRawDataInputSvc.h.

unsigned int IRawDataInputSvc::m_fileMonth [inherited]

Definition at line 36 of file IRawDataInputSvc.h.

unsigned int IRawDataInputSvc::m_fileDay [inherited]

Definition at line 37 of file IRawDataInputSvc.h.

unsigned int IRawDataInputSvc::m_utcDay [inherited]

Definition at line 38 of file IRawDataInputSvc.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:27:05 2011 for RawDataIO by doxygen 1.4.7