diff --git a/doc-6.0/doxygen/CC/html/d6/d12/_event_writer_8h_source.html b/doc-6.0/doxygen/CC/html/d6/d12/_event_writer_8h_source.html index d55283de..5c8b18d1 100644 --- a/doc-6.0/doxygen/CC/html/d6/d12/_event_writer_8h_source.html +++ b/doc-6.0/doxygen/CC/html/d6/d12/_event_writer_8h_source.html @@ -338,315 +338,308 @@
369 
370  private:
371 
-
378  static const int DEFAULT_RECORD_SIZE = 4194304;
-
379 
-
381  static const int DEFAULT_RECORD_COUNT = 10000;
-
382 
-
387  static const int DEFAULT_BUFFER_SIZE = 6*DEFAULT_RECORD_SIZE;
-
388 
-
389 
-
392  std::shared_ptr<RecordOutput> commonRecord;
-
393 
-
395  std::shared_ptr<RecordOutput> currentRecord;
-
396 
-
398  std::shared_ptr<RecordRingItem> currentRingItem;
+
374  std::shared_ptr<RecordOutput> commonRecord;
+
375 
+
377  std::shared_ptr<RecordOutput> currentRecord;
+
378 
+
380  std::shared_ptr<RecordRingItem> currentRingItem;
+
381 
+
383  std::shared_ptr<RecordSupply> supply;
+
384 
+
386  uint32_t maxSupplyBytes = 0;
+
387 
+
390  Compressor::CompressionType compressionType{Compressor::UNCOMPRESSED};
+
391 
+
394  uint32_t compressionFactor;
+
395 
+
398  std::shared_ptr<std::vector<uint32_t>> recordLengths;
399 
-
401  std::shared_ptr<RecordSupply> supply;
-
402 
-
404  uint32_t maxSupplyBytes = 0;
-
405 
-
408  Compressor::CompressionType compressionType{Compressor::UNCOMPRESSED};
-
409 
-
412  uint32_t compressionFactor;
+
402  //TODO: DOES THIS NEED TO BE ATOMIC IF MT write????????????????????????????????
+
403  size_t bytesWritten = 0ULL;
+
404 
+
406  bool addingTrailer = true;
+
407 
+
409  bool addTrailerIndex = false;
+
410 
+
412  std::vector<uint8_t> headerArray;
413 
-
416  std::shared_ptr<std::vector<uint32_t>> recordLengths;
-
417 
-
420  //TODO: DOES THIS NEED TO BE ATOMIC IF MT write????????????????????????????????
-
421  size_t bytesWritten = 0ULL;
-
422 
-
424  bool addingTrailer = true;
-
425 
-
427  bool addTrailerIndex = false;
-
428 
-
430  std::vector<uint8_t> headerArray;
-
431 
-
433  std::vector<RecordCompressor> recordCompressorThreads;
-
434 
-
437  std::vector<EventWriter::RecordWriter> recordWriterThread;
-
438 
-
440  uint32_t recordsWritten = 0;
-
441 
-
444  uint32_t recordNumber = 1;
+
415  std::vector<RecordCompressor> recordCompressorThreads;
+
416 
+
419  std::vector<EventWriter::RecordWriter> recordWriterThread;
+
420 
+
422  uint32_t recordsWritten = 0;
+
423 
+
426  uint32_t recordNumber = 1;
+
427 
+
432  std::string xmlDictionary;
+
433 
+
435  std::vector<uint8_t> dictionaryByteArray;
+
436 
+
438  std::vector<uint8_t> firstEventByteArray;
+
439 
+
441  bool haveFirstEvent = false;
+
442 
+
444  bool closed = false;
445 
-
450  std::string xmlDictionary;
+
447  bool toFile = false;
+
448 
+
450  bool append = false;
451 
-
453  std::vector<uint8_t> dictionaryByteArray;
+
453  bool hasAppendDictionary = false;
454 
-
456  std::vector<uint8_t> firstEventByteArray;
-
457 
-
459  bool haveFirstEvent = false;
-
460 
-
462  bool closed = false;
-
463 
-
465  bool toFile = false;
-
466 
-
468  bool append = false;
+
461  uint32_t eventsWrittenTotal = 0;
+
462 
+
464  ByteOrder byteOrder {ByteOrder::ENDIAN_LOCAL};
+
465 
+
466  //-----------------------
+
467  // Buffer related members
+
468  //-----------------------
469 
-
471  bool hasAppendDictionary = false;
+
471  uint32_t sourceId = 0;
472 
-
479  uint32_t eventsWrittenTotal = 0;
-
480 
-
482  ByteOrder byteOrder {ByteOrder::ENDIAN_LOCAL};
-
483 
-
484  //-----------------------
-
485  // Buffer related members
-
486  //-----------------------
-
487 
-
489  uint32_t sourceId = 0;
-
490 
-
492  uint32_t bufferSize = 0;
-
493 
-
502  std::shared_ptr<ByteBuffer> buffer;
-
503 
-
505  std::shared_ptr<ByteBuffer> usedBuffer;
-
506 
-
508  std::vector<std::shared_ptr<ByteBuffer>> internalBuffers;
+
474  uint32_t bufferSize = 0;
+
475 
+
484  std::shared_ptr<ByteBuffer> buffer;
+
485 
+
487  std::shared_ptr<ByteBuffer> usedBuffer;
+
488 
+
490  std::vector<std::shared_ptr<ByteBuffer>> internalBuffers;
+
491 
+
493  uint32_t commonRecordBytesToBuffer = 0;
+
494 
+
497  uint32_t eventsWrittenToBuffer = 0;
+
498 
+
499  //-----------------------
+
500  // File related members
+
501  //-----------------------
+
502 
+
504  int internalBufSize;
+
505 
+
508  bool diskIsFull = false;
509 
-
511  uint32_t commonRecordBytesToBuffer = 0;
-
512 
-
515  uint32_t eventsWrittenToBuffer = 0;
+
513  std::atomic_bool diskIsFullVolatile{false};
+
514 
+
515  bool fileOpen = false;
516 
-
517  //-----------------------
-
518  // File related members
-
519  //-----------------------
-
520 
-
522  int internalBufSize;
-
523 
-
526  bool diskIsFull = false;
-
527 
-
531  std::atomic_bool diskIsFullVolatile{false};
-
532 
-
533  bool fileOpen = false;
-
534 
-
536  uint64_t idCounter = 0ULL;
-
537 
-
539  FileHeader fileHeader;
+
518  uint64_t idCounter = 0ULL;
+
519 
+
521  FileHeader fileHeader;
+
522 
+
524  FileHeader appendFileHeader;
+
525 
+
527  std::string currentFileName;
+
528 
+
529 #ifdef USE_FILESYSTEMLIB
+
531  fs::path currentFilePath;
+
532 #endif
+
533 
+
535  std::shared_ptr<std::future<void>> future1;
+
536 
+
539  std::shared_ptr<RecordRingItem> ringItem1;
540 
-
542  FileHeader appendFileHeader;
+
542  std::shared_ptr<std::fstream> asyncFileChannel = nullptr;
543 
-
545  std::string currentFileName;
+
545  uint64_t fileWritingPosition = 0ULL;
546 
-
547 #ifdef USE_FILESYSTEMLIB
-
549  fs::path currentFilePath;
-
550 #endif
-
551 
-
553  std::shared_ptr<std::future<void>> future1;
-
554 
-
557  std::shared_ptr<RecordRingItem> ringItem1;
+
548  uint32_t splitNumber = 0;
+
549 
+
551  uint32_t splitCount = 0;
+
552 
+
554  std::string baseFileName;
+
555 
+
557  uint32_t specifierCount = 0;
558 
-
560  std::shared_ptr<std::fstream> asyncFileChannel = nullptr;
+
560  uint32_t runNumber = 0;
561 
-
563  uint64_t fileWritingPosition = 0ULL;
-
564 
-
566  uint32_t splitNumber = 0;
+
566  uint64_t split = 0ULL;
567 
-
569  uint32_t splitCount = 0;
-
570 
-
572  std::string baseFileName;
+
572  uint32_t splitIncrement = 0;
573 
-
575  uint32_t specifierCount = 0;
+
575  uint64_t splitEventBytes = 0ULL;
576 
-
578  uint32_t runNumber = 0;
+
578  uint32_t splitEventCount = 0;
579 
-
584  uint64_t split = 0ULL;
+
584  uint32_t streamId = 0;
585 
-
590  uint32_t splitIncrement = 0;
+
587  uint32_t streamCount = 1;
+
588 
+
590  bool singleThreadedCompression = false;
591 
-
593  uint64_t splitEventBytes = 0ULL;
+
593  bool overWriteOK = false;
594 
-
596  uint32_t splitEventCount = 0;
-
597 
-
602  uint32_t streamId = 0;
-
603 
-
605  uint32_t streamCount = 1;
-
606 
-
608  bool singleThreadedCompression = false;
-
609 
-
611  bool overWriteOK = false;
-
612 
-
615  uint32_t eventsWrittenToFile = 0;
-
616 
-
618  bool hasTrailerWithIndex = false;
-
619 
-
621  uint32_t userHeaderLength = 0;
+
597  uint32_t eventsWrittenToFile = 0;
+
598 
+
600  bool hasTrailerWithIndex = false;
+
601 
+
603  uint32_t userHeaderLength = 0;
+
604 
+
606  uint32_t userHeaderPadding = 0;
+
607 
+
609  uint32_t indexLength = 0;
+
610 
+
613  std::shared_ptr<FileCloser> fileCloser;
+
614 
+
615  //-----------------------
+
620  bool noFileWriting = false;
+
621  //-----------------------
622 
-
624  uint32_t userHeaderPadding = 0;
+
623 
+
624  public:
625 
-
627  uint32_t indexLength = 0;
-
628 
-
631  std::shared_ptr<FileCloser> fileCloser;
-
632 
-
633  //-----------------------
-
638  bool noFileWriting = false;
-
639  //-----------------------
-
640 
-
641 
-
642  public:
-
643 
-
644 
-
645  explicit EventWriter(std::string & filename,
-
646  const ByteOrder & byteOrder = ByteOrder::nativeOrder(),
-
647  bool append = false);
+
626 
+
627  explicit EventWriter(std::string & filename,
+
628  const ByteOrder & byteOrder = ByteOrder::nativeOrder(),
+
629  bool append = false);
+
630 
+
631  EventWriter(std::string & filename,
+
632  std::string & dictionary,
+
633  const ByteOrder & byteOrder = ByteOrder::nativeOrder(),
+
634  bool append = false);
+
635 
+
636  EventWriter(std::string & baseName, const std::string & directory, const std::string & runType,
+
637  uint32_t runNumber = 1, uint64_t split = 0,
+
638  uint32_t maxRecordSize = 4194304, uint32_t maxEventCount = 10000,
+
639  const ByteOrder & byteOrder = ByteOrder::nativeOrder(),
+
640  const std::string & xmlDictionary = "",
+
641  bool overWriteOK = true, bool append = false,
+
642  std::shared_ptr<EvioBank> firstEvent = nullptr,
+
643  uint32_t streamId = 1, uint32_t splitNumber = 0,
+
644  uint32_t splitIncrement = 1, uint32_t streamCount = 1,
+
645  Compressor::CompressionType compressionType = Compressor::UNCOMPRESSED,
+
646  uint32_t compressionThreads = 1, uint32_t ringSize = 0,
+
647  uint32_t bufferSize = 32100000);
648 
-
649  EventWriter(std::string & filename,
-
650  std::string & dictionary,
-
651  const ByteOrder & byteOrder = ByteOrder::nativeOrder(),
-
652  bool append = false);
+
649 
+
650  //---------------------------------------------
+
651  // BUFFER Constructors
+
652  //---------------------------------------------
653 
-
654  EventWriter(std::string & baseName, const std::string & directory, const std::string & runType,
-
655  uint32_t runNumber = 1, uint64_t split = 0,
-
656  uint32_t maxRecordSize = 4194304, uint32_t maxEventCount = 10000,
-
657  const ByteOrder & byteOrder = ByteOrder::nativeOrder(),
-
658  const std::string & xmlDictionary = "",
-
659  bool overWriteOK = true, bool append = false,
-
660  std::shared_ptr<EvioBank> firstEvent = nullptr,
-
661  uint32_t streamId = 1, uint32_t splitNumber = 0,
-
662  uint32_t splitIncrement = 1, uint32_t streamCount = 1,
-
663  Compressor::CompressionType compressionType = Compressor::UNCOMPRESSED,
-
664  uint32_t compressionThreads = 1, uint32_t ringSize = 0,
-
665  uint32_t bufferSize = 32100000);
-
666 
+
654  explicit EventWriter(std::shared_ptr<ByteBuffer> buf);
+
655  EventWriter(std::shared_ptr<ByteBuffer> buf, std::string & xmlDictionary);
+
656  EventWriter(std::shared_ptr<ByteBuffer> buf, uint32_t maxRecordSize, uint32_t maxEventCount,
+
657  const std::string & xmlDictionary, uint32_t recordNumber,
+
658  Compressor::CompressionType compressionType);
+
659  EventWriter(std::shared_ptr<ByteBuffer> buf, uint32_t maxRecordSize, uint32_t maxEventCount,
+
660  const std::string & xmlDictionary, uint32_t recordNumber,
+
661  Compressor::CompressionType compressionType, int eventType);
+
662 
+
663  private:
+
664 
+
665  void reInitializeBuffer(std::shared_ptr<ByteBuffer> buf, const std::bitset<24> *bitInfo,
+
666  uint32_t recordNumber, bool useCurrentBitInfo);
667 
-
668  //---------------------------------------------
-
669  // BUFFER Constructors
-
670  //---------------------------------------------
-
671 
-
672  explicit EventWriter(std::shared_ptr<ByteBuffer> buf);
-
673  EventWriter(std::shared_ptr<ByteBuffer> buf, std::string & xmlDictionary);
-
674  EventWriter(std::shared_ptr<ByteBuffer> buf, uint32_t maxRecordSize, uint32_t maxEventCount,
-
675  const std::string & xmlDictionary, uint32_t recordNumber,
-
676  Compressor::CompressionType compressionType);
-
677  EventWriter(std::shared_ptr<ByteBuffer> buf, uint32_t maxRecordSize, uint32_t maxEventCount,
-
678  const std::string & xmlDictionary, uint32_t recordNumber,
-
679  Compressor::CompressionType compressionType, int eventType);
-
680 
-
681  private:
+
668  static void staticWriteFunction(EventWriter *pWriter, const char* data, size_t len);
+
669  static void staticDoNothingFunction(EventWriter *pWriter);
+
670 
+
671  public:
+
672 
+
673  bool isDiskFull();
+
674  void setBuffer(std::shared_ptr<ByteBuffer> buf, std::bitset<24> *bitInfo, uint32_t recNumber);
+
675  void setBuffer(std::shared_ptr<ByteBuffer> buf);
+
676 
+
677  private:
+
678 
+
679  std::shared_ptr<ByteBuffer> getBuffer();
+
680  void expandInternalBuffers(int bytes);
+
681 
682 
-
683  void reInitializeBuffer(std::shared_ptr<ByteBuffer> buf, const std::bitset<24> *bitInfo,
-
684  uint32_t recordNumber, bool useCurrentBitInfo);
-
685 
-
686  static void staticWriteFunction(EventWriter *pWriter, const char* data, size_t len);
-
687  static void staticDoNothingFunction(EventWriter *pWriter);
+
683  public:
+
684 
+
685  std::shared_ptr<ByteBuffer> getByteBuffer();
+
686  void setSourceId(int sId);
+
687  void setEventType(int type);
688 
-
689  public:
-
690 
-
691  bool isDiskFull();
-
692  void setBuffer(std::shared_ptr<ByteBuffer> buf, std::bitset<24> *bitInfo, uint32_t recNumber);
-
693  void setBuffer(std::shared_ptr<ByteBuffer> buf);
-
694 
-
695  private:
-
696 
-
697  std::shared_ptr<ByteBuffer> getBuffer();
-
698  void expandInternalBuffers(int bytes);
-
699 
+
689  bool writingToFile() const;
+
690  bool isClosed() const;
+
691 
+
692  std::string getCurrentFilename() const;
+
693  size_t getBytesWrittenToBuffer() const;
+
694  std::string getCurrentFilePath() const;
+
695  uint32_t getSplitNumber() const;
+
696  uint32_t getSplitCount() const;
+
697  uint32_t getRecordNumber() const;
+
698  uint32_t getEventsWritten() const;
+
699  ByteOrder getByteOrder() const;
700 
-
701  public:
+
701  void setStartingRecordNumber(uint32_t startingRecordNumber);
702 
-
703  std::shared_ptr<ByteBuffer> getByteBuffer();
-
704  void setSourceId(int sId);
-
705  void setEventType(int type);
+
703  void setFirstEvent(std::shared_ptr<EvioNode> node);
+
704  void setFirstEvent(std::shared_ptr<ByteBuffer> buf);
+
705  void setFirstEvent(std::shared_ptr<EvioBank> bank);
706 
-
707  bool writingToFile() const;
-
708  bool isClosed() const;
-
709 
-
710  std::string getCurrentFilename() const;
-
711  size_t getBytesWrittenToBuffer() const;
-
712  std::string getCurrentFilePath() const;
-
713  uint32_t getSplitNumber() const;
-
714  uint32_t getSplitCount() const;
-
715  uint32_t getRecordNumber() const;
-
716  uint32_t getEventsWritten() const;
-
717  ByteOrder getByteOrder() const;
+
707  private:
+
708 
+
709  void createCommonRecord(const std::string & xmlDict,
+
710  std::shared_ptr<EvioBank> firstBank,
+
711  std::shared_ptr<EvioNode> firstNode,
+
712  std::shared_ptr<ByteBuffer> firstBuf);
+
713 
+
714  void writeFileHeader() ;
+
715 
+
716 
+
717  public :
718 
-
719  void setStartingRecordNumber(uint32_t startingRecordNumber);
-
720 
-
721  void setFirstEvent(std::shared_ptr<EvioNode> node);
-
722  void setFirstEvent(std::shared_ptr<ByteBuffer> buf);
-
723  void setFirstEvent(std::shared_ptr<EvioBank> bank);
-
724 
-
725  private:
-
726 
-
727  void createCommonRecord(const std::string & xmlDict,
-
728  std::shared_ptr<EvioBank> firstBank,
-
729  std::shared_ptr<EvioNode> firstNode,
-
730  std::shared_ptr<ByteBuffer> firstBuf);
+
719  void flush();
+
720  void close();
+
721 
+
722  protected:
+
723 
+
724  void examineFileHeader();
+
725 
+
726  private:
+
727 
+
728  void toAppendPosition();
+
729 
+
730  public:
731 
-
732  void writeFileHeader() ;
+
732  bool hasRoom(uint32_t bytes);
733 
-
734 
-
735  public :
+
734  bool writeEvent(std::shared_ptr<EvioNode> node, bool force = false,
+
735  bool duplicate = true, bool ownRecord = false);
736 
-
737  void flush();
-
738  void close();
+
737  bool writeEventToFile(std::shared_ptr<EvioNode> node, bool force = false,
+
738  bool duplicate = true, bool ownRecord = false);
739 
-
740  protected:
-
741 
-
742  void examineFileHeader();
-
743 
-
744  private:
-
745 
-
746  void toAppendPosition();
-
747 
-
748  public:
-
749 
-
750  bool hasRoom(uint32_t bytes);
-
751 
-
752  bool writeEvent(std::shared_ptr<EvioNode> node, bool force = false,
-
753  bool duplicate = true, bool ownRecord = false);
-
754 
-
755  bool writeEventToFile(std::shared_ptr<EvioNode> node, bool force = false,
-
756  bool duplicate = true, bool ownRecord = false);
+
740  bool writeEventToFile(std::shared_ptr<ByteBuffer> bb, bool force = false,
+
741  bool duplicate = true, bool ownRecord = false);
+
742 
+
743  bool writeEvent(std::shared_ptr<ByteBuffer> bankBuffer, bool force = false , bool ownRecord = false);
+
744 
+
745  bool writeEvent(std::shared_ptr<EvioBank> bank, bool force = false, bool ownRecord = false);
+
746 
+
747  bool writeEventToFile(std::shared_ptr<EvioBank> bank, bool force = false, bool ownRecord = false);
+
748 
+
749  private:
+
750 
+
751  bool writeEvent(std::shared_ptr<EvioBank> bank,
+
752  std::shared_ptr<ByteBuffer> bankBuffer,
+
753  bool force, bool ownRecord);
+
754  bool writeEventToFile(std::shared_ptr<EvioBank> bank,
+
755  std::shared_ptr<ByteBuffer> bankBuffer,
+
756  bool force, bool ownRecord);
757 
-
758  bool writeEventToFile(std::shared_ptr<ByteBuffer> bb, bool force = false,
-
759  bool duplicate = true, bool ownRecord = false);
-
760 
-
761  bool writeEvent(std::shared_ptr<ByteBuffer> bankBuffer, bool force = false , bool ownRecord = false);
+
758  bool fullDisk();
+
759 
+
760  void compressAndWriteToFile(bool force);
+
761  bool tryCompressAndWriteToFile(bool force);
762 
-
763  bool writeEvent(std::shared_ptr<EvioBank> bank, bool force = false, bool ownRecord = false);
-
764 
-
765  bool writeEventToFile(std::shared_ptr<EvioBank> bank, bool force = false, bool ownRecord = false);
-
766 
-
767  private:
-
768 
-
769  bool writeEvent(std::shared_ptr<EvioBank> bank,
-
770  std::shared_ptr<ByteBuffer> bankBuffer,
-
771  bool force, bool ownRecord);
-
772  bool writeEventToFile(std::shared_ptr<EvioBank> bank,
-
773  std::shared_ptr<ByteBuffer> bankBuffer,
-
774  bool force, bool ownRecord);
+
763  bool writeToFile(bool force, bool checkDisk);
+
764  void writeToFileMT(std::shared_ptr<RecordRingItem> item, bool force);
+
765 
+
766  void splitFile();
+
767  void writeTrailerToFile(bool writeIndex);
+
768  void flushCurrentRecordToBuffer() ;
+
769  bool writeToBuffer(std::shared_ptr<EvioBank> bank, std::shared_ptr<ByteBuffer> bankBuffer) ;
+
770 
+
771  uint32_t trailerBytes();
+
772  void writeTrailerToBuffer(bool writeIndex);
+
773 
+
774  };
775 
-
776  bool fullDisk();
+
776 }
777 
-
778  void compressAndWriteToFile(bool force);
-
779  bool tryCompressAndWriteToFile(bool force);
-
780 
-
781  bool writeToFile(bool force, bool checkDisk);
-
782  void writeToFileMT(std::shared_ptr<RecordRingItem> item, bool force);
-
783 
-
784  void splitFile();
-
785  void writeTrailerToFile(bool writeIndex);
-
786  void flushCurrentRecordToBuffer() ;
-
787  bool writeToBuffer(std::shared_ptr<EvioBank> bank, std::shared_ptr<ByteBuffer> bankBuffer) ;
-
788 
-
789  uint32_t trailerBytes();
-
790  void writeTrailerToBuffer(bool writeIndex);
-
791 
-
792  };
-
793 
-
794 }
-
795 
-
796 
-
797 #endif //EVIO_6_0_EVENTWRITER_H
+
778 
+
779 #endif //EVIO_6_0_EVENTWRITER_H
ByteBuffer.h
ByteOrder.h
Compressor.h
diff --git a/doc-6.0/doxygen/CC/html/functions_func_g.html b/doc-6.0/doxygen/CC/html/functions_func_g.html index 2b7cc57f..fec9e5cd 100644 --- a/doc-6.0/doxygen/CC/html/functions_func_g.html +++ b/doc-6.0/doxygen/CC/html/functions_func_g.html @@ -719,12 +719,12 @@

- g -