#include <RawData.h>
Inheritance diagram for DayaBay::LocalTriggerData:
Public Member Functions | |
LocalTriggerData (unsigned int *buffer=0, unsigned int majorVersion=0, unsigned int minorVersion=0, unsigned int ltbDataVersion=0, bool isOwner=false) | |
~LocalTriggerData () | |
virtual unsigned int | size () const |
virtual unsigned int | dataType () const |
unsigned int | ltbDataVersion () const |
unsigned int | sequenceNumber () const |
unsigned int | readOutType () const |
unsigned int | triggerType () const |
unsigned int | hour () const |
unsigned int | minute () const |
unsigned int | second () const |
unsigned int | hsum () const |
unsigned int | esumComp () const |
unsigned int | esum () const |
unsigned int | crossTriggerSource () const |
unsigned int | year () const |
unsigned int | month () const |
unsigned int | day () const |
unsigned int | clock () const |
unsigned int | accumulationStatus () const |
unsigned int | gpsValid () const |
unsigned int | timestampType () const |
unsigned int | clockValid () const |
unsigned int | unixtimeHigh () const |
unsigned int | unixtimeLow () const |
unsigned int | unixtime () const |
unsigned int | days () const |
unsigned int | accumulationHigh () const |
unsigned int | nanosecondHigh () const |
unsigned int | accumulationLow () const |
unsigned int | nanosecondLow () const |
int | accumulation () const |
unsigned int | nanosecond () const |
unsigned int | feeBufferStatus () const |
unsigned int | ltbBufferStatus () const |
unsigned int | blockedTrigger () const |
bool | isUtcTime () const |
bool | isUnixTime () const |
bool | isManualTrigger () const |
bool | isCrossTrigger () const |
bool | isPeriodicTrigger () const |
bool | isMultiplicityTrigger () const |
bool | isEsumAdcTrigger () const |
bool | isEsumCompHighTrigger () const |
bool | isEsumCompLowTrigger () const |
bool | isEsumCompAllTrigger () const |
virtual std::ostream & | dump (std::ostream &str) |
bool | isLocalTriggerData () const |
bool | isFeePeakData () const |
unsigned int | type () const |
unsigned int | majorVersion () const |
unsigned int | minorVersion () const |
bool | isEventType () const |
bool | isModuleType () const |
unsigned int * | buffer () const |
unsigned int | bufferSize () const |
bool | isOwner () const |
void | setOwner (bool isOwner=true) |
virtual bool | isValid () const |
unsigned int * | getPointer (const unsigned int &line) const |
unsigned int | getValue (const unsigned int &line, const unsigned int &firstBit=0, const unsigned int &bitLength=32) const |
char * | getString (const unsigned int &line, const unsigned int &byteOffset=0) const |
Static Public Member Functions | |
static DayaBay::RawData * | makeNewData (unsigned int *buffer=0, unsigned int majorVersion=0, unsigned int minorVersion=0, bool isOwner=false) |
Protected Attributes | |
unsigned int | m_ltbDataVersion |
unsigned int | m_majorVersion |
unsigned int | m_minorVersion |
Definition at line 132 of file RawData.h.
DayaBay::LocalTriggerData::LocalTriggerData | ( | unsigned int * | buffer = 0 , |
|
unsigned int | majorVersion = 0 , |
|||
unsigned int | minorVersion = 0 , |
|||
unsigned int | ltbDataVersion = 0 , |
|||
bool | isOwner = false | |||
) |
Definition at line 999 of file RawData.cc.
01004 : DataFragment(buffer,majorVersion,minorVersion,isOwner), 01005 m_ltbDataVersion(ltbDataVersion) 01006 { 01007 // Default constructor 01008 }
DayaBay::LocalTriggerData::~LocalTriggerData | ( | ) |
unsigned int DayaBay::LocalTriggerData::size | ( | ) | const [virtual] |
Reimplemented from DayaBay::DataFragment.
Definition at line 1020 of file RawData.cc.
01021 { 01022 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01023 return DataFormat::LocalTriggerData_v2::size; 01024 return DataFormat::LocalTriggerData::size; 01025 }
unsigned int DayaBay::LocalTriggerData::dataType | ( | ) | const [virtual] |
Reimplemented from DayaBay::DataFragment.
Definition at line 1027 of file RawData.cc.
01028 { 01029 return DataFormat::LocalTriggerData::dataType; 01030 }
unsigned int DayaBay::LocalTriggerData::ltbDataVersion | ( | ) | const |
unsigned int DayaBay::LocalTriggerData::sequenceNumber | ( | ) | const |
Definition at line 1032 of file RawData.cc.
01033 { 01034 return this->getValue(DataFormat::LocalTriggerData::sequenceNumberLine, 01035 DataFormat::LocalTriggerData::sequenceNumberBitOffset, 01036 DataFormat::LocalTriggerData::sequenceNumberBitLength); 01037 }
unsigned int DayaBay::LocalTriggerData::readOutType | ( | ) | const |
Definition at line 1039 of file RawData.cc.
01040 { 01041 return this->getValue(DataFormat::LocalTriggerData::readOutTypeLine, 01042 DataFormat::LocalTriggerData::readOutTypeBitOffset, 01043 DataFormat::LocalTriggerData::readOutTypeBitLength); 01044 }
unsigned int DayaBay::LocalTriggerData::triggerType | ( | ) | const |
Definition at line 1046 of file RawData.cc.
01047 { 01048 return this->getValue(DataFormat::LocalTriggerData::triggerTypeLine, 01049 DataFormat::LocalTriggerData::triggerTypeBitOffset, 01050 DataFormat::LocalTriggerData::triggerTypeBitLength); 01051 }
unsigned int DayaBay::LocalTriggerData::hour | ( | ) | const |
Definition at line 1080 of file RawData.cc.
01081 { 01082 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ){ 01083 unsigned int bcdHour = 01084 this->getValue(DataFormat::LocalTriggerData_v2::hourLine, 01085 DataFormat::LocalTriggerData_v2::hourBitOffset, 01086 DataFormat::LocalTriggerData_v2::hourBitLength); 01087 return (bcdHour & 0xf) + (bcdHour>>4 & 0xf)*10; 01088 } 01089 return this->getValue(DataFormat::LocalTriggerData::hourLine, 01090 DataFormat::LocalTriggerData::hourBitOffset, 01091 DataFormat::LocalTriggerData::hourBitLength); 01092 }
unsigned int DayaBay::LocalTriggerData::minute | ( | ) | const |
Definition at line 1094 of file RawData.cc.
01095 { 01096 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ){ 01097 unsigned int bcdMin = 01098 this->getValue(DataFormat::LocalTriggerData_v2::minuteLine, 01099 DataFormat::LocalTriggerData_v2::minuteBitOffset, 01100 DataFormat::LocalTriggerData_v2::minuteBitLength); 01101 return (bcdMin & 0xf) + (bcdMin>>4 & 0xf)*10; 01102 } 01103 return this->getValue(DataFormat::LocalTriggerData::minuteLine, 01104 DataFormat::LocalTriggerData::minuteBitOffset, 01105 DataFormat::LocalTriggerData::minuteBitLength); 01106 }
unsigned int DayaBay::LocalTriggerData::second | ( | ) | const |
Definition at line 1108 of file RawData.cc.
01109 { 01110 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ){ 01111 unsigned int bcdSec = 01112 this->getValue(DataFormat::LocalTriggerData_v2::secondLine, 01113 DataFormat::LocalTriggerData_v2::secondBitOffset, 01114 DataFormat::LocalTriggerData_v2::secondBitLength); 01115 return (bcdSec & 0xf) + (bcdSec>>4 & 0xf)*10; 01116 } 01117 return this->getValue(DataFormat::LocalTriggerData::secondLine, 01118 DataFormat::LocalTriggerData::secondBitOffset, 01119 DataFormat::LocalTriggerData::secondBitLength); 01120 }
unsigned int DayaBay::LocalTriggerData::hsum | ( | ) | const |
Definition at line 1131 of file RawData.cc.
01132 { 01133 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01134 return this->getValue(DataFormat::LocalTriggerData_v2::hsumLine, 01135 DataFormat::LocalTriggerData_v2::hsumBitOffset, 01136 DataFormat::LocalTriggerData_v2::hsumBitLength); 01137 return this->getValue(DataFormat::LocalTriggerData::hsumLine, 01138 DataFormat::LocalTriggerData::hsumBitOffset, 01139 DataFormat::LocalTriggerData::hsumBitLength); 01140 }
unsigned int DayaBay::LocalTriggerData::esumComp | ( | ) | const |
Definition at line 1142 of file RawData.cc.
01143 { 01144 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01145 return this->getValue(DataFormat::LocalTriggerData_v2::esumCompLine, 01146 DataFormat::LocalTriggerData_v2::esumCompBitOffset, 01147 DataFormat::LocalTriggerData_v2::esumCompBitLength); 01148 return this->getValue(DataFormat::LocalTriggerData::esumCompLine, 01149 DataFormat::LocalTriggerData::esumCompBitOffset, 01150 DataFormat::LocalTriggerData::esumCompBitLength); 01151 }
unsigned int DayaBay::LocalTriggerData::esum | ( | ) | const |
Definition at line 1153 of file RawData.cc.
01154 { 01155 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01156 return this->getValue(DataFormat::LocalTriggerData_v2::esumLine, 01157 DataFormat::LocalTriggerData_v2::esumBitOffset, 01158 DataFormat::LocalTriggerData_v2::esumBitLength); 01159 return this->getValue(DataFormat::LocalTriggerData::esumLine, 01160 DataFormat::LocalTriggerData::esumBitOffset, 01161 DataFormat::LocalTriggerData::esumBitLength); 01162 }
unsigned int DayaBay::LocalTriggerData::crossTriggerSource | ( | ) | const |
Definition at line 1164 of file RawData.cc.
01165 { 01166 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01167 return this->getValue( 01168 DataFormat::LocalTriggerData_v2::crossTriggerSourceLine, 01169 DataFormat::LocalTriggerData_v2::crossTriggerSourceBitOffset, 01170 DataFormat::LocalTriggerData_v2::crossTriggerSourceBitLength); 01171 return this->getValue(DataFormat::LocalTriggerData::crossTriggerSourceLine, 01172 DataFormat::LocalTriggerData::crossTriggerSourceBitOffset, 01173 DataFormat::LocalTriggerData::crossTriggerSourceBitLength); 01174 }
unsigned int DayaBay::LocalTriggerData::year | ( | ) | const |
Definition at line 1053 of file RawData.cc.
01054 { 01055 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01056 return 0; 01057 return this->getValue(DataFormat::LocalTriggerData::yearLine, 01058 DataFormat::LocalTriggerData::yearBitOffset, 01059 DataFormat::LocalTriggerData::yearBitLength); 01060 }
unsigned int DayaBay::LocalTriggerData::month | ( | ) | const |
Definition at line 1062 of file RawData.cc.
01063 { 01064 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01065 return 0; 01066 return this->getValue(DataFormat::LocalTriggerData::monthLine, 01067 DataFormat::LocalTriggerData::monthBitOffset, 01068 DataFormat::LocalTriggerData::monthBitLength); 01069 }
unsigned int DayaBay::LocalTriggerData::day | ( | ) | const |
Definition at line 1071 of file RawData.cc.
01072 { 01073 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01074 return 0; 01075 return this->getValue(DataFormat::LocalTriggerData::dayLine, 01076 DataFormat::LocalTriggerData::dayBitOffset, 01077 DataFormat::LocalTriggerData::dayBitLength); 01078 }
unsigned int DayaBay::LocalTriggerData::clock | ( | ) | const |
Definition at line 1122 of file RawData.cc.
01123 { 01124 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01125 return 0; 01126 return this->getValue(DataFormat::LocalTriggerData::clockLine, 01127 DataFormat::LocalTriggerData::clockBitOffset, 01128 DataFormat::LocalTriggerData::clockBitLength); 01129 }
unsigned int DayaBay::LocalTriggerData::accumulationStatus | ( | ) | const |
Definition at line 1177 of file RawData.cc.
01178 { 01179 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01180 return this->getValue( 01181 DataFormat::LocalTriggerData_v2::accumulationStatusLine, 01182 DataFormat::LocalTriggerData_v2::accumulationStatusBitOffset, 01183 DataFormat::LocalTriggerData_v2::accumulationStatusBitLength); 01184 return 0; 01185 }
unsigned int DayaBay::LocalTriggerData::gpsValid | ( | ) | const |
Definition at line 1187 of file RawData.cc.
01188 { 01189 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01190 return this->getValue(DataFormat::LocalTriggerData_v2::gpsValidLine, 01191 DataFormat::LocalTriggerData_v2::gpsValidBitOffset, 01192 DataFormat::LocalTriggerData_v2::gpsValidBitLength); 01193 return 0; 01194 }
unsigned int DayaBay::LocalTriggerData::timestampType | ( | ) | const |
Definition at line 1196 of file RawData.cc.
01197 { 01198 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01199 return this->getValue(DataFormat::LocalTriggerData_v2::timestampTypeLine, 01200 DataFormat::LocalTriggerData_v2::timestampTypeBitOffset, 01201 DataFormat::LocalTriggerData_v2::timestampTypeBitLength); 01202 return 0; 01203 }
unsigned int DayaBay::LocalTriggerData::clockValid | ( | ) | const |
Definition at line 1205 of file RawData.cc.
01206 { 01207 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01208 return this->getValue(DataFormat::LocalTriggerData_v2::clockValidLine, 01209 DataFormat::LocalTriggerData_v2::clockValidBitOffset, 01210 DataFormat::LocalTriggerData_v2::clockValidBitLength); 01211 return 0; 01212 }
unsigned int DayaBay::LocalTriggerData::unixtimeHigh | ( | ) | const |
Definition at line 1214 of file RawData.cc.
01215 { 01216 if( this->isUnixTime() ) 01217 return this->getValue(DataFormat::LocalTriggerData_v2::unixtimeHighLine, 01218 DataFormat::LocalTriggerData_v2::unixtimeHighBitOffset, 01219 DataFormat::LocalTriggerData_v2::unixtimeHighBitLength); 01220 return 0; 01221 }
unsigned int DayaBay::LocalTriggerData::unixtimeLow | ( | ) | const |
Definition at line 1223 of file RawData.cc.
01224 { 01225 if( this->isUnixTime() ) 01226 return this->getValue(DataFormat::LocalTriggerData_v2::unixtimeLowLine, 01227 DataFormat::LocalTriggerData_v2::unixtimeLowBitOffset, 01228 DataFormat::LocalTriggerData_v2::unixtimeLowBitLength); 01229 return 0; 01230 }
unsigned int DayaBay::LocalTriggerData::unixtime | ( | ) | const |
Definition at line 1232 of file RawData.cc.
01233 { 01234 if( this->isUnixTime() ) 01235 return (this->unixtimeHigh()<<DataFormat::LocalTriggerData_v2::unixtimeLowBitLength | this->unixtimeLow()); 01236 return 0; 01237 }
unsigned int DayaBay::LocalTriggerData::days | ( | ) | const |
Definition at line 1239 of file RawData.cc.
01240 { 01241 if( this->isUtcTime() ) 01242 return this->getValue(DataFormat::LocalTriggerData_v2::daysLine, 01243 DataFormat::LocalTriggerData_v2::daysBitOffset, 01244 DataFormat::LocalTriggerData_v2::daysBitLength); 01245 return 0; 01246 }
unsigned int DayaBay::LocalTriggerData::accumulationHigh | ( | ) | const |
Definition at line 1248 of file RawData.cc.
01249 { 01250 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01251 return this->getValue(DataFormat::LocalTriggerData_v2::accumulationHighLine, 01252 DataFormat::LocalTriggerData_v2::accumulationHighBitOffset, 01253 DataFormat::LocalTriggerData_v2::accumulationHighBitLength); 01254 return 0; 01255 }
unsigned int DayaBay::LocalTriggerData::nanosecondHigh | ( | ) | const |
Definition at line 1257 of file RawData.cc.
01258 { 01259 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01260 return this->getValue(DataFormat::LocalTriggerData_v2::nanosecondHighLine, 01261 DataFormat::LocalTriggerData_v2::nanosecondHighBitOffset, 01262 DataFormat::LocalTriggerData_v2::nanosecondHighBitLength); 01263 return 0; 01264 }
unsigned int DayaBay::LocalTriggerData::accumulationLow | ( | ) | const |
Definition at line 1266 of file RawData.cc.
01267 { 01268 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01269 return this->getValue(DataFormat::LocalTriggerData_v2::accumulationLowLine, 01270 DataFormat::LocalTriggerData_v2::accumulationLowBitOffset, 01271 DataFormat::LocalTriggerData_v2::accumulationLowBitLength); 01272 return 0; 01273 }
unsigned int DayaBay::LocalTriggerData::nanosecondLow | ( | ) | const |
Definition at line 1275 of file RawData.cc.
01276 { 01277 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01278 return this->getValue(DataFormat::LocalTriggerData_v2::nanosecondLowLine, 01279 DataFormat::LocalTriggerData_v2::nanosecondLowBitOffset, 01280 DataFormat::LocalTriggerData_v2::nanosecondLowBitLength); 01281 return 0; 01282 }
int DayaBay::LocalTriggerData::accumulation | ( | ) | const |
Definition at line 1284 of file RawData.cc.
01285 { 01286 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01287 return int(this->accumulationHigh()<<DataFormat::LocalTriggerData_v2::accumulationLowBitLength | this->accumulationLow())/2; 01288 return 0; 01289 }
unsigned int DayaBay::LocalTriggerData::nanosecond | ( | ) | const |
Definition at line 1291 of file RawData.cc.
01292 { 01293 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01294 return (this->nanosecondHigh()<<DataFormat::LocalTriggerData_v2::nanosecondLowBitLength | this->nanosecondLow())/2; 01295 return 0; 01296 }
unsigned int DayaBay::LocalTriggerData::feeBufferStatus | ( | ) | const |
Definition at line 1298 of file RawData.cc.
01299 { 01300 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01301 return this->getValue(DataFormat::LocalTriggerData_v2::feeBufferStatusLine, 01302 DataFormat::LocalTriggerData_v2::feeBufferStatusBitOffset, 01303 DataFormat::LocalTriggerData_v2::feeBufferStatusBitLength); 01304 return 0; 01305 }
unsigned int DayaBay::LocalTriggerData::ltbBufferStatus | ( | ) | const |
Definition at line 1307 of file RawData.cc.
01308 { 01309 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01310 return this->getValue(DataFormat::LocalTriggerData_v2::ltbBufferStatusLine, 01311 DataFormat::LocalTriggerData_v2::ltbBufferStatusBitOffset, 01312 DataFormat::LocalTriggerData_v2::ltbBufferStatusBitLength); 01313 return 0; 01314 }
unsigned int DayaBay::LocalTriggerData::blockedTrigger | ( | ) | const |
Definition at line 1316 of file RawData.cc.
01317 { 01318 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01319 return this->getValue(DataFormat::LocalTriggerData_v2::blockedTriggerLine, 01320 DataFormat::LocalTriggerData_v2::blockedTriggerBitOffset, 01321 DataFormat::LocalTriggerData_v2::blockedTriggerBitLength); 01322 return 0; 01323 }
bool DayaBay::LocalTriggerData::isUtcTime | ( | ) | const |
Definition at line 1325 of file RawData.cc.
01326 { 01327 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01328 return (this->timestampType() & this->clockValid() & this->gpsValid()); 01329 return false; 01330 }
bool DayaBay::LocalTriggerData::isUnixTime | ( | ) | const |
Definition at line 1332 of file RawData.cc.
01333 { 01334 if( this->ltbDataVersion() >= DataFormat::LocalTriggerData_v2::version ) 01335 return !this->isUtcTime(); 01336 return false; 01337 }
bool DayaBay::LocalTriggerData::isManualTrigger | ( | ) | const |
Definition at line 1339 of file RawData.cc.
01340 { 01341 // Is this a Manual Trigger? 01342 return (this->triggerType() & DataFormat::LocalTriggerData::TriggerType::kManual); 01343 }
bool DayaBay::LocalTriggerData::isCrossTrigger | ( | ) | const |
Definition at line 1345 of file RawData.cc.
01346 { 01347 // Is this a Cross Trigger? 01348 return (this->triggerType() & DataFormat::LocalTriggerData::TriggerType::kCross); 01349 }
bool DayaBay::LocalTriggerData::isPeriodicTrigger | ( | ) | const |
Definition at line 1351 of file RawData.cc.
01352 { 01353 // Is this a Periodic Trigger? 01354 return (this->triggerType() & DataFormat::LocalTriggerData::TriggerType::kPeriodic); 01355 }
bool DayaBay::LocalTriggerData::isMultiplicityTrigger | ( | ) | const |
Definition at line 1357 of file RawData.cc.
01358 { 01359 // Is this a Multiplicity Trigger? 01360 return (this->triggerType() & DataFormat::LocalTriggerData::TriggerType::kMultiplicity); 01361 }
bool DayaBay::LocalTriggerData::isEsumAdcTrigger | ( | ) | const |
Definition at line 1363 of file RawData.cc.
01364 { 01365 // Is this an Esum ADC Trigger? 01366 return (this->triggerType() & DataFormat::LocalTriggerData::TriggerType::kEsumAdc); 01367 }
bool DayaBay::LocalTriggerData::isEsumCompHighTrigger | ( | ) | const |
Definition at line 1369 of file RawData.cc.
01370 { 01371 // Is this an Esum Comp High Trigger? 01372 return (this->triggerType() & DataFormat::LocalTriggerData::TriggerType::kEsumCompHigh); 01373 }
bool DayaBay::LocalTriggerData::isEsumCompLowTrigger | ( | ) | const |
Definition at line 1375 of file RawData.cc.
01376 { 01377 // Is this an Esum Comp Low Trigger? 01378 return (this->triggerType() & DataFormat::LocalTriggerData::TriggerType::kEsumCompLow); 01379 }
bool DayaBay::LocalTriggerData::isEsumCompAllTrigger | ( | ) | const |
Definition at line 1381 of file RawData.cc.
01382 { 01383 // Is this an Esum Comp All Trigger? 01384 return (this->triggerType() & DataFormat::LocalTriggerData::TriggerType::kEsumCompAll); 01385 }
std::ostream & DayaBay::LocalTriggerData::dump | ( | std::ostream & | str | ) | [virtual] |
Reimplemented from DayaBay::DataFragment.
Definition at line 1387 of file RawData.cc.
01387 { 01388 // Print the module information 01389 str << "LocalTriggerData {" << std::endl << " "; 01390 this->DataFragment::dump(str); 01391 str << " sequenceNumber: " << this->sequenceNumber() << ", " 01392 << " readOutType: " << this->readOutType() << ", " 01393 << " triggerType: " << this->triggerType() << " [ "; 01394 if(this->isManualTrigger()) str << "Manual, "; 01395 if(this->isCrossTrigger()) str << "Cross, "; 01396 if(this->isPeriodicTrigger()) str << "Periodic, "; 01397 if(this->isMultiplicityTrigger()) str << "Multiplicity, "; 01398 if(this->isEsumAdcTrigger()) str << "EsumAdc, "; 01399 if(this->isEsumCompHighTrigger()) str << "EsumCompHigh, "; 01400 if(this->isEsumCompLowTrigger()) str << "EsumCompLow, "; 01401 if(this->isEsumCompAllTrigger()) str << "EsumCompAll, "; 01402 str << " ], "; 01403 if( this->ltbDataVersion()>=DataFormat::LocalTriggerData_v2::version ){ 01404 str << " accumulationStatus: " << this->accumulationStatus() << ", " 01405 << " gpsValid: " << this->gpsValid() << ", " 01406 << " timestampType: " << this->timestampType() << ", " 01407 << " clockValid: " << this->clockValid() << ", "; 01408 } 01409 if( this->ltbDataVersion() == DataFormat::LocalTriggerData::version ){ 01410 str << " year: " << this->year() << ", " 01411 << " month: " << this->month() << ", " 01412 << " day: " << this->day() << ", " 01413 << " hour: " << this->hour() << ", " 01414 << " minute: " << this->minute() << ", " 01415 << " second: " << this->second() << ", " 01416 << " clock: " << this->clock() << ", "; 01417 }else if( this->ltbDataVersion()>=DataFormat::LocalTriggerData_v2::version ){ 01418 if( this->isUtcTime() ){ 01419 str << " days: " << this->day() << ", " 01420 << " hour: " << this->hour() << ", " 01421 << " minute: " << this->minute() << ", " 01422 << " second: " << this->second() << ", "; 01423 }else{ 01424 // Unix time 01425 time_t unixtime = this->unixtime(); 01426 str << " unixtimeHigh: " << this->unixtimeHigh() << ", " 01427 << " unixtimeLow: " << this->unixtimeLow() << ", " 01428 << " unixtime (formatted): " 01429 << ctime(&unixtime); 01430 } 01431 str << " nanosecond: " << this->nanosecond() << ", " 01432 << " accumulation: " << this->accumulation() << ", " 01433 << " nano+accum: " << this->nanosecond()+this->accumulation() << ", "; 01434 } 01435 01436 str << " hsum: " << this->hsum() << ", " 01437 << " esumComp: " << this->esumComp() << ", " 01438 << " esum: " << this->esum() << ", "; 01439 if( this->ltbDataVersion()>=DataFormat::LocalTriggerData_v2::version ){ 01440 str << " feeBufferStatus: " << this->feeBufferStatus() << ", " 01441 << " ltbBufferStatus: " << this->ltbBufferStatus() << ", " 01442 << " blockedTrigger: " << this->blockedTrigger() << ", "; 01443 } 01444 str << " crossTriggerSource: " << this->crossTriggerSource() 01445 << std::endl 01446 << "}" << std::endl; 01447 return str; 01448 }
bool DayaBay::DataFragment::isLocalTriggerData | ( | ) | const [inherited] |
Definition at line 975 of file RawData.cc.
00976 { 00977 // Is this a Local Trigger data fragment? 00978 return (this->dataType()==DataFormat::LocalTriggerData::dataType); 00979 }
bool DayaBay::DataFragment::isFeePeakData | ( | ) | const [inherited] |
Definition at line 981 of file RawData.cc.
00982 { 00983 // Is this a FEE Peak-finding data fragment? 00984 return (this->dataType()==DataFormat::FeePeakData::dataType); 00985 }
unsigned int DayaBay::RawFragment::type | ( | ) | const [inherited] |
Reimplemented from DayaBay::RawData.
Definition at line 681 of file RawData.cc.
00682 { 00683 return this->getValue(DataFormat::RawFragment::typeLine, 00684 DataFormat::RawFragment::typeBitOffset, 00685 DataFormat::RawFragment::typeBitLength); 00686 }
unsigned int DayaBay::RawData::majorVersion | ( | ) | const [inherited] |
Definition at line 58 of file RawData.cc.
00059 { 00060 // Return the major version of this data 00061 return m_majorVersion; 00062 }
unsigned int DayaBay::RawData::minorVersion | ( | ) | const [inherited] |
Definition at line 64 of file RawData.cc.
00065 { 00066 // Return the minor version of this data 00067 return m_minorVersion; 00068 }
bool DayaBay::RawData::isEventType | ( | ) | const [inherited] |
Definition at line 46 of file RawData.cc.
00047 { 00048 // Is this event data? 00049 return (this->type()==DataFormat::Event::type); 00050 }
bool DayaBay::RawData::isModuleType | ( | ) | const [inherited] |
Definition at line 52 of file RawData.cc.
00053 { 00054 // Is this module data? 00055 return (this->type()==DataFormat::Module::type); 00056 }
DayaBay::RawData * DayaBay::RawData::makeNewData | ( | unsigned int * | buffer = 0 , |
|
unsigned int | majorVersion = 0 , |
|||
unsigned int | minorVersion = 0 , |
|||
bool | isOwner = false | |||
) | [static, inherited] |
Definition at line 101 of file RawData.cc.
00104 { 00105 // Make a new raw data object. Automatically set the correct class 00106 // type using the type() defined in the raw data. 00107 // 00108 // The caller is responsible for deleting the returned data object. 00109 00110 DayaBay::RawData* newData = 0; 00111 // Convert to the proper record type 00112 DayaBay::RawData rawData(buffer,majorVersion,minorVersion); 00113 if( rawData.isEventType() ){ 00114 newData = new DayaBay::RawEvent(buffer, majorVersion, minorVersion, 00115 isOwner); 00116 }else if( rawData.isModuleType() ){ 00117 newData = new DayaBay::RawModule(buffer, majorVersion, minorVersion, 00118 isOwner); 00119 }else{ 00120 newData = new DayaBay::RawData(buffer, majorVersion, minorVersion, 00121 isOwner); 00122 } 00123 return newData; 00124 }
unsigned int * DayaBay::RawBuffer::buffer | ( | ) | const [inherited] |
Definition at line 52 of file RawBuffer.cc.
00053 { 00054 // Return the pointer to the internal memory buffer 00055 return m_buffer; 00056 }
unsigned int DayaBay::RawBuffer::bufferSize | ( | ) | const [inherited] |
Definition at line 58 of file RawBuffer.cc.
00059 { 00060 // Return the allocated size of the internal memory buffer, if known 00061 return m_bufferSize; 00062 }
bool DayaBay::RawBuffer::isOwner | ( | ) | const [inherited] |
Definition at line 64 of file RawBuffer.cc.
00065 { 00066 // Does this RawBuffer own this memory buffer? 00067 return m_isOwner; 00068 }
void DayaBay::RawBuffer::setOwner | ( | bool | isOwner = true |
) | [inherited] |
bool DayaBay::RawBuffer::isValid | ( | ) | const [virtual, inherited] |
Definition at line 74 of file RawBuffer.cc.
00075 { 00076 // Does this RawBuffer contain data? 00077 return (m_buffer != 0); 00078 }
unsigned int * DayaBay::RawBuffer::getPointer | ( | const unsigned int & | line | ) | const [inherited] |
Definition at line 80 of file RawBuffer.cc.
00081 { 00082 // Return a pointer to a specific line in the data block 00083 if(m_bufferSize>0 && line>=m_bufferSize) return 0; 00084 return (m_buffer + line); 00085 }
unsigned int DayaBay::RawBuffer::getValue | ( | const unsigned int & | line, | |
const unsigned int & | firstBit = 0 , |
|||
const unsigned int & | bitLength = 32 | |||
) | const [inherited] |
Definition at line 87 of file RawBuffer.cc.
00090 { 00091 // Read a value from the memory buffer 00092 // line = line number in the memory block (line = integer length) 00093 // firstBit = first bit to read (max=31) 00094 // bitLength = length of bits to read (max=32) 00095 if(bitLength>32 || firstBit>31) return 0; 00096 unsigned int* pointer = this->getPointer(line); 00097 if(!pointer) return 0; 00098 // Catch request for full line 00099 if(firstBit==0 && bitLength==32) return *pointer; 00100 // Prepare bit mask 00101 unsigned int oneBit = 0x1; 00102 unsigned int mask = 0; 00103 for(unsigned int shift=0; shift<bitLength; shift++) 00104 mask += (oneBit << shift); 00105 // Shift value, mask, and return 00106 return (*pointer >> firstBit) & mask; 00107 }
char * DayaBay::RawBuffer::getString | ( | const unsigned int & | line, | |
const unsigned int & | byteOffset = 0 | |||
) | const [inherited] |
Definition at line 109 of file RawBuffer.cc.
00111 { 00112 // Return a char pointer to a specific byte in the data block 00113 // line = line number in the memory block (line = integer length) 00114 // byteOffset = offset if string starts at an uneven byte position (max=3) 00115 if(byteOffset>3) return 0; 00116 unsigned int* pointer = this->getPointer(line); 00117 if(!pointer) return 0; 00118 return (char*)(pointer + byteOffset); 00119 }
unsigned int DayaBay::LocalTriggerData::m_ltbDataVersion [protected] |
unsigned int DayaBay::RawData::m_majorVersion [protected, inherited] |
unsigned int DayaBay::RawData::m_minorVersion [protected, inherited] |