17 #include "interface/evb/i2oEVBMsgs.h"
18 #include "interface/shared/i2oXFunctionCodes.h"
19 #include "interface/shared/version.h"
34 I2O_PRIVATE_MESSAGE_FRAME *pvtMsg =
35 (I2O_PRIVATE_MESSAGE_FRAME*) pRef->getDataLocation();
39 data_->addFirstFragment(pRef);
44 switch (i2oMessageCode)
65 case I2O_EVM_LUMISECTION:
80 data_->addFirstFragment(pRef);
120 if (!
data_)
return false;
121 return data_->complete();
127 if (!
data_)
return false;
128 return data_->faulty();
134 if (!
data_)
return 0;
135 return data_->faultyBits();
144 XCEPT_RAISE(stor::exception::I2OChain,
145 "A fragment may not be added to an empty chain.");
149 XCEPT_RAISE(stor::exception::I2OChain,
150 "A fragment may not be added to a complete chain.");
156 XCEPT_RAISE(stor::exception::I2OChain,
157 "An empty chain may not be added to an existing chain.");
161 XCEPT_RAISE(stor::exception::I2OChain,
162 "A complete chain may not be added to an existing chain.");
169 if (thisKey < thatKey || thatKey < thisKey)
171 std::stringstream
msg;
172 msg <<
"A fragment key mismatch was detected when trying to add "
173 <<
"a chain link to an existing chain. "
174 <<
"Existing key values = ("
175 << ((int)thisKey.
code_) <<
"," << thisKey.
run_ <<
","
178 <<
"), new key values = ("
179 << ((int)thatKey.
code_) <<
"," << thatKey.
run_ <<
","
183 XCEPT_RAISE(stor::exception::I2OChain, msg.str());
221 return data_->messageCode();
226 if (!
data_)
return 0xffff;
227 return data_->i2oMessageCode();
232 if (!
data_)
return 0;
233 return data_->rbBufferId();
238 if (!
data_)
return 0;
239 return data_->hltLocalId();
244 if (!
data_)
return 0;
245 return data_->hltInstance();
250 if (!
data_)
return 0;
251 return data_->hltTid();
256 if (!
data_)
return "";
257 return data_->hltURL();
262 if (!
data_)
return "";
263 return data_->hltClassName();
268 if (!
data_)
return 0;
269 return data_->fuProcessId();
274 if (!
data_)
return 0;
275 return data_->fuGuid();
281 return data_->fragmentKey();
286 if (!
data_)
return 0;
287 return data_->fragmentCount();
292 if (!
data_)
return boost::posix_time::not_a_date_time;
293 return data_->creationTime();
298 if (!
data_)
return boost::posix_time::not_a_date_time;
299 return data_->lastFragmentTime();
304 if (!
data_)
return boost::posix_time::not_a_date_time;
305 return data_->staleWindowStartTime();
311 data_->addToStaleWindowStartTime(duration);
317 data_->resetStaleWindowStartTime();
324 std::stringstream
msg;
325 msg <<
"An empty chain can not be tagged for a specific ";
326 msg <<
"event stream.";
327 XCEPT_RAISE(stor::exception::I2OChain, msg.str());
329 data_->tagForStream(streamId);
336 std::stringstream
msg;
337 msg <<
"An empty chain can not be tagged for a specific ";
338 msg <<
"event consumer.";
339 XCEPT_RAISE(stor::exception::I2OChain, msg.str());
341 data_->tagForEventConsumer(queueId);
348 std::stringstream
msg;
349 msg <<
"An empty chain can not be tagged for a specific ";
350 msg <<
"DQM event consumer.";
351 XCEPT_RAISE(stor::exception::I2OChain, msg.str());
353 data_->tagForDQMEventConsumer(queueId);
358 if (!
data_)
return false;
359 return data_->isTaggedForAnyStream();
364 if (!
data_)
return false;
365 return data_->isTaggedForAnyEventConsumer();
370 if (!
data_)
return false;
371 return data_->isTaggedForAnyDQMEventConsumer();
378 std::vector<StreamID> tmpList;
381 return data_->getStreamTags();
391 return data_->getEventConsumerTags();
401 return data_->getDQMEventConsumerTags();
408 std::stringstream
msg;
409 msg <<
"A dropped event count cannot be retrieved from an empty chain";
410 XCEPT_RAISE(stor::exception::I2OChain, msg.str());
412 return data_->droppedEventsCount();
419 std::stringstream
msg;
420 msg <<
"A dropped event count cannot be added to an empty chain";
421 XCEPT_RAISE(stor::exception::I2OChain, msg.str());
423 data_->setDroppedEventsCount(count);
428 if (!
data_)
return 0;
429 return data_->memoryUsed();
434 if (!
data_)
return 0UL;
435 return data_->totalDataSize();
440 if (!
data_)
return 0UL;
441 return data_->dataSize(fragmentIndex);
446 if (!
data_)
return 0UL;
447 return data_->dataLocation(fragmentIndex);
452 if (!
data_)
return 0;
453 return data_->getFragmentID(fragmentIndex);
458 if (!
data_)
return 0UL;
459 return data_->headerSize();
464 if (!
data_)
return 0UL;
465 return data_->headerLocation();
471 if (!
data_)
return 0;
472 return data_->copyFragmentsIntoBuffer(targetBuffer);
479 XCEPT_RAISE( stor::exception::I2OChain,
480 "The top folder name can not be determined from an empty I2OChain." );
482 return data_->topFolderName();
489 XCEPT_RAISE( stor::exception::I2OChain,
490 "The DQM key can not be determined from an empty I2OChain." );
492 return data_->dqmKey();
499 XCEPT_RAISE(stor::exception::I2OChain,
500 "The output module label can not be determined from an empty I2OChain.");
502 return data_->outputModuleLabel();
509 XCEPT_RAISE(stor::exception::I2OChain,
510 "The output module ID can not be determined from an empty I2OChain.");
512 return data_->outputModuleId();
519 XCEPT_RAISE(stor::exception::I2OChain,
520 "The slave EP count can not be determined from an empty I2OChain.");
522 return data_->nExpectedEPs();
529 XCEPT_RAISE(stor::exception::I2OChain,
530 "HLT trigger names can not be determined from an empty I2OChain.");
532 data_->hltTriggerNames(nameList);
539 XCEPT_RAISE(stor::exception::I2OChain,
540 "HLT trigger selections can not be determined from an empty I2OChain.");
542 data_->hltTriggerSelections(nameList);
549 XCEPT_RAISE(stor::exception::I2OChain,
550 "L1 trigger names can not be determined from an empty I2OChain.");
552 data_->l1TriggerNames(nameList);
559 XCEPT_RAISE(stor::exception::I2OChain,
560 "The number of HLT trigger bits can not be determined from an empty I2OChain.");
562 return data_->hltTriggerCount();
569 XCEPT_RAISE(stor::exception::I2OChain,
570 "HLT trigger bits can not be determined from an empty I2OChain.");
572 data_->hltTriggerBits(bitList);
579 XCEPT_RAISE(stor::exception::I2OChain,
580 "The run number can not be checked for an empty I2OChain.");
582 return data_->assertRunNumber(runNumber);
589 XCEPT_RAISE(stor::exception::I2OChain,
590 "The run number can not be determined from an empty I2OChain.");
592 return data_->runNumber();
599 XCEPT_RAISE(stor::exception::I2OChain,
600 "The luminosity section can not be determined from an empty I2OChain.");
602 return data_->lumiSection();
609 XCEPT_RAISE(stor::exception::I2OChain,
610 "The event number can not be determined from an empty I2OChain.");
612 return data_->eventNumber();
619 XCEPT_RAISE(stor::exception::I2OChain,
620 "The adler32 checksum can not be determined from an empty I2OChain.");
622 return data_->adler32Checksum();
627 if (!
data_)
return false;
628 return data_->isEndOfLumiSectionMessage();
unsigned int fragmentCount() const
uint32_t runNumber() const
QueueIDs getEventConsumerTags() const
std::string hltClassName() const
unsigned long * getBufferData() const
std::vector< QueueID > QueueIDs
unsigned short i2oMessageCode() const
bool isEndOfLumiSectionMessage() const
void tagForEventConsumer(QueueID)
unsigned int fuProcessId() const
void addToChain(I2OChain &newpart)
void setDroppedEventsCount(unsigned int)
unsigned long headerSize() const
utils::TimePoint_t lastFragmentTime() const
void addToStaleWindowStartTime(const utils::Duration_t)
unsigned int getFragmentID(int fragmentIndex) const
void hltTriggerBits(std::vector< unsigned char > &bitList) const
unsigned int faultyBits() const
void assertRunNumber(uint32_t runNumber)
void swap(I2OChain &other)
unsigned int messageCode() const
void hltTriggerNames(Strings &nameList) const
uint32_t lumiSection() const
unsigned int hltInstance() const
QueueIDs getDQMEventConsumerTags() const
unsigned int hltLocalId() const
uint32_t nExpectedEPs() const
boost::posix_time::time_duration Duration_t
I2OChain & operator=(I2OChain const &rhs)
std::vector< StreamID > getStreamTags() const
unsigned int droppedEventsCount() const
boost::shared_ptr< detail::ChainData > data_
unsigned int fuGuid() const
std::string outputModuleLabel() const
bool isTaggedForAnyStream() const
boost::posix_time::ptime TimePoint_t
std::string topFolderName() const
unsigned char * headerLocation() const
unsigned int copyFragmentsIntoBuffer(std::vector< unsigned char > &buff) const
void hltTriggerSelections(Strings &nameList) const
unsigned int hltTid() const
size_t memoryUsed() const
unsigned long totalDataSize() const
unsigned int rbBufferId() const
utils::TimePoint_t staleWindowStartTime() const
FragKey fragmentKey() const
void resetStaleWindowStartTime()
void tagForStream(StreamID)
uint32_t hltTriggerCount() const
unsigned long dataSize(int fragmentIndex) const
void l1TriggerNames(Strings &nameList) const
void tagForDQMEventConsumer(QueueID)
bool isTaggedForAnyDQMEventConsumer() const
uint32_t eventNumber() const
uint32_t adler32Checksum() const
std::string hltURL() const
utils::TimePoint_t creationTime() const
bool isTaggedForAnyEventConsumer() const
uint32_t outputModuleId() const
unsigned char * dataLocation(int fragmentIndex) const