ATLAS Offline Software
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
offline_EventStorage_v5::DataWriter Class Reference

#include <v5_DataWriter.h>

Inheritance diagram for offline_EventStorage_v5::DataWriter:
Collaboration diagram for offline_EventStorage_v5::DataWriter:

Public Types

using iovec_const = offline_EventStorage_v5::iovec_const
 

Public Member Functions

 DataWriter (const std::string &writingPath, const std::string &fileNameCore, const run_parameters_record &rPar, const std::vector< std::string > &fmdStrings, const unsigned int startIndex=1, const CompressionType compression=NONE, const unsigned int compLevel=1)
 constructor with metadata strings More...
 
 DataWriter (const std::string &writingPath, boost::shared_ptr< EventStorage::FileNameCallback > theFNCB, const run_parameters_record &rPar, const std::string &project, const std::string &streamType, const std::string &streamName, const std::string &stream, const unsigned int lumiBlockNumber, const std::string &applicationName, const std::vector< std::string > &fmdStrings, const CompressionType compression=NONE, const unsigned int compLevel=1)
 
 DataWriter (const std::string &writingPath, const std::string &fileNameCore, const run_parameters_record &rPar, const std::string &project, const std::string &streamType, const std::string &streamName, const std::string &stream, const unsigned int lumiBlockNumber, const std::string &applicationName, const std::vector< std::string > &fmdStrings, const CompressionType compression=NONE, const unsigned int compLevel=1)
 
 ~DataWriter ()
 destructor, the way to close the sequence of files More...
 
EventStorage::DWError setMaxFileNE (const unsigned int &maxFileNE)
 max size of 1 file in number of data blocks (or events) 1 putData call is one block More...
 
EventStorage::DWError setMaxFileMB (const unsigned int &maxFileMB)
 max size of 1 file in MB. More...
 
void setGUID (const std::string &GUID)
 Set the GUID for the next file in this sequence. More...
 
bool good () const
 feedback to user More...
 
void cd (const std::string &writingPath)
 set another writing path More...
 
bool inTransition () const
 The file currently open is not closed immediately after cd() this method will return true if we are in transition phase, i.e. More...
 
EventStorage::DWError putData (const unsigned int &dataSize, const void *event)
 Write a single block of data. More...
 
EventStorage::DWError putPrecompressedData (const unsigned int &dataSize, const void *event)
 Write a single block of data already compressed. More...
 
EventStorage::DWError putPrecompressedData (const unsigned int &entries, const iovec_const *my_iovec)
 Write a single block of data already compressed. More...
 
EventStorage::DWError putData (const unsigned int &entries, const struct iovec *my_iovec)
 Write data when you have one event scattered in many blocks, in memory, like in the SFI application. More...
 
EventStorage::DWError putData (const unsigned int &dataSize, const void *event, uint32_t &sizeToDisk)
 Write a single block of data. More...
 
EventStorage::DWError putData (const unsigned int &entries, const iovec_const *my_iovec, uint32_t &sizeToDisk)
 Write data when you have one event scattered in many blocks, in memory, like in the SFI application. More...
 
EventStorage::DWError closeFile ()
 Close the currently open file. More...
 
EventStorage::DWError nextFile ()
 close the file and open next one immediately More...
 
std::string nameFile (const FileStatus &fs) const
 get the name of the current file More...
 
int64_t getPosition () const
 get the offset of the latest written event; one should call it AFTER putData(...) More...
 
unsigned int eventsInFile () const
 number of events written to the currently open file More...
 
unsigned int eventsInFileSequence () const
 number of events written to the file sequence More...
 
unsigned int dataMB_InFile () const
 number of mega bytes written to the current file More...
 
unsigned int dataMB_InFileSequence () const
 number of mega bytes written to the file sequence More...
 
void registerCallBack (EventStorage::DataWriterCallBack *pUserCBclass)
 If you want to define actions to be taken when a file is open or closed register your call-back class here with this method. More...
 
CompressionType getCompression () const
 Returns the compression type for this file. More...
 
void setGuid (const std::string &Guid)
 Externally set the GUID for the next file in this sequence. More...
 

Private Member Functions

 DataWriter ()
 
void initDW (const std::string &writingPath, boost::shared_ptr< EventStorage::FileNameCallback > theFNCB, const run_parameters_record &rPar, const std::string &project, const std::string &streamType, const std::string &streamName, const std::string &stream, const unsigned int lumiBlockNumber, const std::string &applicationName, const std::vector< std::string > &fmdStrings, const CompressionType compression, const unsigned int compLevel)
 
EventStorage::DWError putData_implementation (const unsigned int &entries, const iovec_const *my_iovec, uint32_t &sizeToDisk, bool precompressed=false)
 
void date_timeAsInt (uint32_t &getDate, uint32_t &getTime) const
 
void openNextFile ()
 
bool fileExists (const std::string &name) const
 
void setRunParamsRecord (const run_parameters_record &rPar)
 
void file_record (void *ri, const void *pi)
 
void file_record (const file_name_strings &nst)
 
void file_record (const freeMetaDataStrings &fmdStrings)
 
std::string getAppName (const std::string &fileNameCore) const
 
std::string getElement (const std::string &fileNameCore, const std::string &element) const
 
uint64_t getFileSize (const std::string &fileNameCore) const
 
void spaceForGuid ()
 
void replaceGuid ()
 

Private Attributes

std::fstream m_cFile
 
bool m_cFileOpen
 
bool m_openFailed
 
file_start_record m_file_start_record
 
file_name_strings m_file_name_strings
 
internal_run_parameters_record m_internal_run_parameters_record
 
file_end_record m_file_end_record
 
std::string m_guid
 
std::string m_next_guid
 
std::string m_writePath
 
std::string m_nextWritePath
 
std::string m_fileNameCore
 
std::string m_project
 
std::string m_streamType
 
std::string m_streamName
 
std::string m_stream
 
unsigned int m_lumiBlockNumber
 
std::string m_applicationName
 
CompressionType m_compression
 
unsigned int m_complevel
 
DataBufferm_compressed
 
double m_cFileMB
 
long double m_runMB
 
uLong m_check
 
int64_t m_latestPosition
 
EventStorage::DataWriterCallBack * m_callBack
 
freeMetaDataStrings m_fmdStrings
 
boost::shared_ptr< EventStorage::FileNameCallback > m_filenamecallback
 

Detailed Description

Definition at line 44 of file v5_DataWriter.h.

Member Typedef Documentation

◆ iovec_const

Definition at line 47 of file v5_DataWriter.h.

Constructor & Destructor Documentation

◆ DataWriter() [1/4]

DataWriter::DataWriter ( const std::string &  writingPath,
const std::string &  fileNameCore,
const run_parameters_record rPar,
const std::vector< std::string > &  fmdStrings,
const unsigned int  startIndex = 1,
const CompressionType  compression = NONE,
const unsigned int  compLevel = 1 
)

constructor with metadata strings

Parameters
writingPathdirectory where to write data
fileNameCorefile name not including the ending "._NNNN.data"
run_parameters_recordrPar other parameters from IS including the run number
fmdStringsoptional vector of strings containing metadata
startIndexinitial file sequence index
compressionCompression type
compLevelCompression level

Definition at line 73 of file v5_DataWriter.cxx.

81 {
82  boost::shared_ptr<daq::RawFileName>
83  fileName(new daq::RawFileName(fileNameCore));
84 
85  if ( fileName->hasValidCore() ) {
86  m_project = fileName->project();
87  m_streamType = fileName->streamType();
88  m_streamName = fileName->streamName();
89  m_stream = fileName->stream();
90  m_lumiBlockNumber = fileName->lumiBlockNumber();
91  m_applicationName = fileName->applicationName();
92  } else {
93  std::stringstream mystream;
94  mystream << "FileName " << fileName->fileName()
95  << " has failed interpretation."
96  << " The file header will have no values for "
97  << " project, stream, lumiBlock and appName";
98  ERS_DEBUG(1,mystream.str());
99  // EventStorage::RawFileNameIssue myissue(ERS_HERE, mystream.str().c_str() );
100  // ers::warning(myissue);
101  m_project = "";
102  m_streamType = "";
103  m_streamName = "";
104  m_stream = "";
105  m_lumiBlockNumber = 0;
106  m_applicationName = "";
107  }
108 
109  fileName->setFileSequenceNumber(startIndex);
110 
111  initDW(writingPath, fileName, rPar, m_project, m_streamType, m_streamName,
113  fmdStrings, compression,compLevel);
114 
115 }

◆ DataWriter() [2/4]

offline_EventStorage_v5::DataWriter::DataWriter ( const std::string &  writingPath,
boost::shared_ptr< EventStorage::FileNameCallback >  theFNCB,
const run_parameters_record rPar,
const std::string &  project,
const std::string &  streamType,
const std::string &  streamName,
const std::string &  stream,
const unsigned int  lumiBlockNumber,
const std::string &  applicationName,
const std::vector< std::string > &  fmdStrings,
const CompressionType  compression = NONE,
const unsigned int  compLevel = 1 
)

◆ DataWriter() [3/4]

DataWriter::DataWriter ( const std::string &  writingPath,
const std::string &  fileNameCore,
const run_parameters_record rPar,
const std::string &  project,
const std::string &  streamType,
const std::string &  streamName,
const std::string &  stream,
const unsigned int  lumiBlockNumber,
const std::string &  applicationName,
const std::vector< std::string > &  fmdStrings,
const CompressionType  compression = NONE,
const unsigned int  compLevel = 1 
)

Definition at line 118 of file v5_DataWriter.cxx.

131 {
132  boost::shared_ptr<FileNameCallback> fileName(new SimpleFileName(fileNameCore));
133  initDW(writingPath, fileName, rPar, project, streamType, streamName, stream, lumiBlockNumber, applicationName, fmdStrings, compression, compLevel);
134 
135 }

◆ DataWriter() [4/4]

offline_EventStorage_v5::DataWriter::DataWriter ( )
private

◆ ~DataWriter()

DataWriter::~DataWriter ( )

destructor, the way to close the sequence of files

Definition at line 138 of file v5_DataWriter.cxx.

139 {
140  ERS_DEBUG(1,"DataWriter::~DataWriter() called.");
141 
142  m_file_end_record.status = 1; // This identifies the end of the sequence.
143  if(m_cFileOpen) closeFile();
144 
145  delete m_compressed;
146 
147  ERS_DEBUG(1,"DataWriter::~DataWriter() finished.");
148 }

Member Function Documentation

◆ cd()

void DataWriter::cd ( const std::string &  writingPath)

set another writing path

Definition at line 651 of file v5_DataWriter.cxx.

651  {
652  m_nextWritePath = writingPath;
653  ERS_DEBUG(3,"Directory changed to "<<m_nextWritePath
654  <<" (effective for hext file).");
655 }

◆ closeFile()

DWError DataWriter::closeFile ( )

Close the currently open file.

Next file will be open anyway if you try to write again afterwards.

Definition at line 465 of file v5_DataWriter.cxx.

466 {
467  ERS_DEBUG(3,"DataWriter::closeFile() called.");
468 
469  // do statistics
470  m_file_end_record.data_in_file = static_cast<unsigned int>(m_cFileMB+0.5);
471  m_file_end_record.data_in_run = static_cast<unsigned int>(m_runMB+0.5);
472 
474 
475  // write eof record
477 
478  m_cFile.close();
479  std::ostringstream oss;
480  oss.width(8);
481  (void)oss.fill('0');
482  oss << std::hex << std::uppercase <<m_check;
483  std::string checksum = oss.str();
484  m_check = ::adler32(0L, Z_NULL, 0);
485 
486  // rename the file
487  ERS_DEBUG(3,"Rename file " << nameFile(UNFINISHED) << endl
488  << "to " << nameFile(FINISHED));
489  if (::rename(nameFile(UNFINISHED).c_str(), nameFile(FINISHED).c_str()) == -1) {
490 
491  EventStorage::WritingIssue ci(ERS_HERE, "Rename failed.");
492  ers::error(ci);
493  return EventStorage::DWNOOK;
494  }
495 
496  // check if the file is there
498  {
499  ERS_DEBUG(2,"Finished file "<<nameFile(FINISHED));
500  if(m_callBack != NULL) {
501  ERS_DEBUG(3,"Execute callback from DataWriter.");
502  m_callBack->FileWasClosed(
503  m_filenamecallback->getCurrentFileName(),
505  m_streamType,
506  m_streamName,
508  m_guid,
509  checksum,
515  );
516  }
517 
518  // now we can substitute new directory, if specified
519  if(m_nextWritePath != "") {
521  m_nextWritePath="";
522  ERS_DEBUG(3,"New writing path became effective. The path is "
523  <<m_writePath);
524  }
525  m_cFileOpen = false;
526 
527  try{
528  m_filenamecallback->advance();
529  }catch(EventStorage::ES_SingleFile &e){
530  //If opennext file is called, it
531  // will fail there
532  }
533  return EventStorage::DWOK;
534  }
535  return EventStorage::DWNOOK;
536 }

◆ dataMB_InFile()

unsigned int DataWriter::dataMB_InFile ( ) const

number of mega bytes written to the current file

Definition at line 454 of file v5_DataWriter.cxx.

455 {
456  return static_cast<unsigned int>(m_cFileMB+0.5);
457 }

◆ dataMB_InFileSequence()

unsigned int DataWriter::dataMB_InFileSequence ( ) const

number of mega bytes written to the file sequence

Definition at line 459 of file v5_DataWriter.cxx.

460 {
461  return static_cast<unsigned int>(m_runMB+0.5);
462 }

◆ date_timeAsInt()

void DataWriter::date_timeAsInt ( uint32_t &  getDate,
uint32_t &  getTime 
) const
private

Definition at line 233 of file v5_DataWriter.cxx.

234 {
235  long a_time;
236  time(&a_time);
237 
238  struct tm t;
239  localtime_r( &a_time, &t);
240 
241  getDate= 1000000*t.tm_mday+
242  10000*(1+t.tm_mon)+
243  1900+t.tm_year;
244 
245  getTime= 10000*t.tm_hour+
246  100*t.tm_min+
247  t.tm_sec ;
248 }

◆ eventsInFile()

unsigned int DataWriter::eventsInFile ( ) const

number of events written to the currently open file

Definition at line 444 of file v5_DataWriter.cxx.

445 {
447 }

◆ eventsInFileSequence()

unsigned int DataWriter::eventsInFileSequence ( ) const

number of events written to the file sequence

Definition at line 449 of file v5_DataWriter.cxx.

450 {
452 }

◆ file_record() [1/3]

void DataWriter::file_record ( const file_name_strings nst)
private

Definition at line 684 of file v5_DataWriter.cxx.

684  {
685 
686  const char *cName = nst.appName.c_str();
687  const char *cTag = nst.fileNameCore.c_str();
688 
689  uint32_t sizeName = nst.appName.size();
690  uint32_t sizeTag = nst.fileNameCore.size();
691 
693  m_check = ::adler32(m_check,reinterpret_cast<const Bytef*>
695  sizeof(uint32_t));
696 
697  m_cFile.write(charAddress(sizeName),sizeof(uint32_t));
698  m_check = ::adler32(m_check,cbytefAddress(sizeName),sizeof(uint32_t));
699  m_cFile.write(cName,sizeName);
700  m_check = ::adler32(m_check,reinterpret_cast<const Bytef*>(cName),sizeName);
701 
702  char ns = sizeName % 4;
703  if(ns){
704  m_cFile.write(" ",4-ns);
705  m_check = ::adler32(m_check,reinterpret_cast<const Bytef*>(" "),4-ns);
706  }
707 
708  m_cFile.write(charAddress(sizeTag),sizeof(uint32_t));
709  m_check = ::adler32(m_check,bytefAddress(sizeTag),sizeof(uint32_t));
710  m_cFile.write(cTag,sizeTag);
711  m_check = ::adler32(m_check,reinterpret_cast<const Bytef*>(cTag),sizeTag);
712 
713  ns = sizeTag % 4;
714  if(ns){
715  m_cFile.write(" ",4-ns);
716  m_check = ::adler32(m_check,reinterpret_cast<const Bytef*>(" "),4-ns);
717  }
718 
719 }

◆ file_record() [2/3]

void DataWriter::file_record ( const freeMetaDataStrings fmdStrings)
private

Definition at line 721 of file v5_DataWriter.cxx.

722 {
723  ERS_DEBUG(2,"Writing the metadata strings.");
724 
726  m_check = ::adler32(m_check, reinterpret_cast<const Bytef*>
728  sizeof(uint32_t));
729 
730  uint32_t nstrings = fmdStrings.size();
731  m_cFile.write(charAddress(nstrings),sizeof(uint32_t));
732  m_check = ::adler32(m_check, bytefAddress(nstrings),
733  sizeof(uint32_t));
734 
735  vector<string>::const_iterator it;
736  for(it=fmdStrings.begin(); it!=fmdStrings.end(); ++it) {
737 
738  const char *cst = it->c_str();
739  uint32_t slen = it->size();
740 
741  m_cFile.write(charAddress(slen),sizeof(uint32_t));
742  m_check = ::adler32(m_check,bytefAddress(slen),sizeof(uint32_t));
743  m_cFile.write(cst,slen);
744  m_check = ::adler32(m_check,reinterpret_cast<const Bytef*>(cst),slen);
745  char ns = slen % 4;
746  if(ns){
747  m_cFile.write(" ",4-ns);
748  m_check = ::adler32(m_check,reinterpret_cast<const Bytef*>(" "),4-ns);
749  }
750  }
751 }

◆ file_record() [3/3]

void DataWriter::file_record ( void *  ri,
const void *  pi 
)
private

Definition at line 666 of file v5_DataWriter.cxx.

666  {
667 
668  uint32_t *record = reinterpret_cast<uint32_t *>(ri);
669  const uint32_t *pattern = reinterpret_cast<const uint32_t *>(pi);
670  int size=pattern[1];
671 
672  for(int i=0; i<size; i++) {
673  if(pattern[i] != 0) {
674  m_cFile.write(reinterpret_cast<const char*>(pattern+i),sizeof(uint32_t));
675  m_check = ::adler32(m_check,reinterpret_cast<const Bytef*>(pattern+i),sizeof(uint32_t));
676  } else {
677  m_cFile.write(reinterpret_cast<char*>(record+i),sizeof(uint32_t));
678  m_check = ::adler32(m_check,reinterpret_cast<const Bytef*>(record+i),sizeof(uint32_t));
679  }
680  }
681 }

◆ fileExists()

bool DataWriter::fileExists ( const std::string &  name) const
private

Definition at line 556 of file v5_DataWriter.cxx.

557 {
558  ifstream test(name.c_str(),ios::binary | ios::in);
559  bool isThere = test.good();
560  test.close();
561 
562  return isThere;
563 }

◆ getAppName()

std::string offline_EventStorage_v5::DataWriter::getAppName ( const std::string &  fileNameCore) const
private

◆ getCompression()

offline_EventStorage_v5::CompressionType DataWriter::getCompression ( ) const

Returns the compression type for this file.

Definition at line 808 of file v5_DataWriter.cxx.

809 {
810  return m_compression;
811 }

◆ getElement()

std::string offline_EventStorage_v5::DataWriter::getElement ( const std::string &  fileNameCore,
const std::string &  element 
) const
private

◆ getFileSize()

uint64_t DataWriter::getFileSize ( const std::string &  fileNameCore) const
private

Definition at line 795 of file v5_DataWriter.cxx.

796 {
797  struct stat64 tmp;
798  if (::stat64(fileNameCore.c_str(), &tmp) == -1) {
799  EventStorage::WritingIssue ci(ERS_HERE, "stat64 failed.");
800  ers::error(ci);
801  return 0;
802  }
803 
804  return tmp.st_size;
805 }

◆ getPosition()

int64_t DataWriter::getPosition ( ) const

get the offset of the latest written event; one should call it AFTER putData(...)

Definition at line 438 of file v5_DataWriter.cxx.

439 {
440  return m_latestPosition;
441 }

◆ good()

bool DataWriter::good ( ) const

feedback to user

Definition at line 251 of file v5_DataWriter.cxx.

252 {
253 
254  if(m_openFailed) return false;
255 
256  if(m_cFileOpen)
257  {
258  return m_cFile.good();
259  }
260  else
261  {
262  return true;
263  }
264 
265 }

◆ initDW()

void DataWriter::initDW ( const std::string &  writingPath,
boost::shared_ptr< EventStorage::FileNameCallback >  theFNCB,
const run_parameters_record rPar,
const std::string &  project,
const std::string &  streamType,
const std::string &  streamName,
const std::string &  stream,
const unsigned int  lumiBlockNumber,
const std::string &  applicationName,
const std::vector< std::string > &  fmdStrings,
const CompressionType  compression,
const unsigned int  compLevel 
)
private

Definition at line 151 of file v5_DataWriter.cxx.

164 {
165  m_project = project;
168  m_stream = stream;
169  m_lumiBlockNumber = lumiBlockNumber;
170  m_applicationName = applicationName;
171 
172  m_filenamecallback = theFNCB;
173 
177  m_cFileMB = 0.0;
178  m_runMB = 0.0;
179  m_latestPosition = -1;
180 
181  m_writePath = writingPath;
182  m_nextWritePath = "";
183  //m_fileNameCore = fileNameCore;
184 
186  // m_file_name_strings.appName = getAppName(fileNameCore);
188 
189  setRunParamsRecord(rPar);
190 
194 
195  m_cFileOpen=false;
196  m_openFailed = false;
197 
198  m_callBack = NULL;
199 
200  m_fmdStrings = fmdStrings;
201 
203  m_complevel = compLevel;
204  m_compressed = new DataBuffer();
205 
206  // add stream, project, compression, lumiBlock
207  // (if they are valid) to meta-data:
208  m_fmdStrings.push_back("Stream=" + m_stream );
209  m_fmdStrings.push_back("Project=" + m_project );
210  std::ostringstream o;
211  o << m_lumiBlockNumber;
212  m_fmdStrings.push_back("LumiBlock=" + o.str());
213 
215  m_fmdStrings.push_back(offline_EventStorage_v5::compressiontag +
216  "=" + offline_EventStorage_v5::type_to_string(m_compression));
217  }
218 
219  m_check = ::adler32(0L, Z_NULL, 0);
220 
221  m_guid = "";
222  m_next_guid = "";
223  this->spaceForGuid();
224  this->openNextFile();
225 
226 }

◆ inTransition()

bool DataWriter::inTransition ( ) const

The file currently open is not closed immediately after cd() this method will return true if we are in transition phase, i.e.

the file has not yet been closed after a cd()

Definition at line 657 of file v5_DataWriter.cxx.

657  {
658 
659  bool inT=false;
660  if((m_nextWritePath != "") &&
661  (m_nextWritePath != m_writePath)) inT=true;
662  return inT;
663 
664 }

◆ nameFile()

string DataWriter::nameFile ( const FileStatus fs) const

get the name of the current file

Definition at line 642 of file v5_DataWriter.cxx.

643 {
644  ostringstream n;
645  n << m_writePath << "/";
646  n << m_filenamecallback->getCurrentFileName((FINISHED == fs)?false:true);
647  string name = n.str();
648  return name;
649 }

◆ nextFile()

DWError DataWriter::nextFile ( )

close the file and open next one immediately

Definition at line 539 of file v5_DataWriter.cxx.

540 {
541  ERS_DEBUG(2,"DataWriter::nextFile() called.");
542 
543  DWError we=closeFile();
544 
545 /* if (m_freename)
546  {
547  EventStorage::ES_SingleFile ci(ERS_HERE, "DataWriter called with freename = 1. DataWriter wants to go to next file, but cannot, since indexing is forbidden. Either deactive freename (so files can be indexed, or increase the file size limit (or turn it off)");
548  throw ci;
549  }*/
550 
551  openNextFile();
552  if(m_openFailed) we=EventStorage::DWNOOK;
553  return we;
554 }

◆ openNextFile()

void DataWriter::openNextFile ( )
private

Definition at line 565 of file v5_DataWriter.cxx.

566 {
567  m_cFileMB=0.0;
569 
570  try{
572  }catch(EventStorage::ES_SingleFile &e){
574  }
576 
577  ERS_DEBUG(2,"Trying to open file "<<nameFile(UNFINISHED));
578 
581  {
582 
584  string err = "found an existing file with name " + nameFile(UNFINISHED);
585  EventStorage::WritingIssue ci(ERS_HERE, err.c_str());
586  ers::warning(ci);
587 
588  } else {
589 
590  string err = "found an existing file with name " + nameFile(FINISHED);
591  EventStorage::WritingIssue ci(ERS_HERE, err.c_str());
592  ers::warning(ci);
593  }
594  m_filenamecallback->fileAlreadyExists();
595 
597 
598  ostringstream oss;
599  oss << "increase file number to ";
601  EventStorage::WritingIssue ci(ERS_HERE, oss.str().c_str());
602  ers::warning(ci);
603  }
604  ERS_DEBUG(2,"OK to write file with number "<<m_file_start_record.file_number);
605 
606  ERS_DEBUG(2,"Opening file: " << nameFile(UNFINISHED));
607 
608  m_cFile.clear();
609  m_cFile.open(nameFile(UNFINISHED).c_str(),
610  ios::out | ios::app | ios::binary);
611 
612  m_check = ::adler32(0L, Z_NULL, 0);
613 
616 
617  this->replaceGuid();
618 
619  ERS_DEBUG(3,"Writing "<<m_fmdStrings.size()<<" metadata strings.");
620  if(m_fmdStrings.size()>0) file_record(m_fmdStrings);
622  ERS_DEBUG(3,"Status of the file. good() returns "<<m_cFile.good());
623  m_cFileOpen = m_cFile.good();
624  m_openFailed = !m_cFile.good();
625 
626  if((m_callBack != NULL) && m_cFileOpen) {
627  ERS_DEBUG(3,"Execute callback from DataWriter.");
628  m_callBack->FileWasOpened(
629  m_filenamecallback->getCurrentFileName(),
631  m_streamType,
632  m_streamName,
634  m_guid,
638  );
639  }
640 }

◆ putData() [1/4]

DWError DataWriter::putData ( const unsigned int &  dataSize,
const void *  event 
)

Write a single block of data.

If one of the size limits would be exceeded, the current file will be closed and another one will be opened automatically.

Parameters
dataSizesize of the event in bytes
*eventstart of the event data in memory

Definition at line 298 of file v5_DataWriter.cxx.

299 {
300 
301  uint32_t todisk;
303  iov.iov_base = event;
304  iov.iov_len = dataSize;
305  return this->putData(1, &iov, todisk);
306 }

◆ putData() [2/4]

DWError DataWriter::putData ( const unsigned int &  dataSize,
const void *  event,
uint32_t &  sizeToDisk 
)

Write a single block of data.

If one of the size limits would be exceeded, the current file will be closed and another one will be opened automatically.

Parameters
dataSizesize of the eveny in bytes
*eventstart of the event data in memory
&sizeToDiskwill be update with the actual chunck size on disk

Definition at line 315 of file v5_DataWriter.cxx.

315  {
316 
318  iov.iov_base = event;
319  iov.iov_len = dataSize;
320  return this->putData(1, &iov, sizeToDisk);
321 }

◆ putData() [3/4]

DWError DataWriter::putData ( const unsigned int &  entries,
const iovec_const my_iovec,
uint32_t &  sizeToDisk 
)

Write data when you have one event scattered in many blocks, in memory, like in the SFI application.

If one of the size limits would be exceeded, the current file will be closed and another one will be opened automatically.

Parameters
entriesnumber of the data chunks
my_ioveclocations of the data chunks
&sizeToDiskwill be update with the actual chunck size on disk

Definition at line 323 of file v5_DataWriter.cxx.

323  {
324  return this->putData_implementation(entries, my_iovec, sizeToDisk);
325 }

◆ putData() [4/4]

DWError DataWriter::putData ( const unsigned int &  entries,
const struct iovec *  my_iovec 
)

Write data when you have one event scattered in many blocks, in memory, like in the SFI application.

If one of the size limits would be exceeded, the current file will be closed and another one will be opened automatically.

Parameters
numberof the data chunks
locationsof the data chunks

Definition at line 309 of file v5_DataWriter.cxx.

310 {
311  uint32_t todisk;
312  return this->putData(entries, my_iovec, todisk);
313 }

◆ putData_implementation()

DWError DataWriter::putData_implementation ( const unsigned int &  entries,
const iovec_const my_iovec,
uint32_t &  sizeToDisk,
bool  precompressed = false 
)
private

Definition at line 346 of file v5_DataWriter.cxx.

346  {
347 
348  ERS_DEBUG(3,"DataWriter::putData called for an iovec.");
349  if(!m_cFileOpen) openNextFile();
350 
351  if(!m_cFileOpen) return EventStorage::DWNOOK;
352 
353  if(!m_cFile.good()) return EventStorage::DWNOOK;
354 
355  // calculate events size
356  unsigned int dataSize = 0;
357  for(unsigned int i = 0; i<entries; i++) {
358  dataSize += my_iovec[i].iov_len;
359  }
360 
361 
362 
363  sizeToDisk = dataSize;
364 
365 
366  // apply limits
368  double eventMB=static_cast<double>(dataSize)/(1024*1024);
369  double dataMB=m_cFileMB+eventMB;
370  if(static_cast<unsigned int>(dataMB+0.5) >
372  ERS_DEBUG(3,"Approaching file size limit in MB.");
373  nextFile();
374  }
375  }
376 
379  ERS_DEBUG(3,"Approaching file size limit in number of events.");
380  nextFile();
381  }
382 
383  //Here we should compress, so that we have the effective size
384  //for the event record
385  if(m_compression == ZLIB && !precompressed){
386  try{
387  offline_EventStorage_v5::zlibcompress(*m_compressed, sizeToDisk,
388  entries, my_iovec, dataSize, m_complevel);
389  }catch(offline_EventStorage_v5::CompressionIssue& ex){
390  EventStorage::WritingIssue ci(ERS_HERE, "Data compression failed.", ex);
391  ers::error(ci);
392  return EventStorage::DWNOOK;
393  }
394  }
395 
396  // prepare the event record
399  dsR.data_block_size = sizeToDisk;
400 
401  // remember the position
402  m_latestPosition = m_cFile.tellg();
403 
404  // write the event record followed by event data
406 
407 
408  if(m_compression != ZLIB || precompressed){
409  for (unsigned int i =0; i<entries; i++){
410  m_cFile.write(static_cast<const char*>(my_iovec[i].iov_base),
411  my_iovec[i].iov_len);
412 
413  m_check = ::adler32(m_check,
414  static_cast<const Bytef *>(my_iovec[i].iov_base),
415  my_iovec[i].iov_len);
416  }
417  }else{
418  m_cFile.write(static_cast<const char *>(m_compressed->handle()), sizeToDisk);
419  m_check = ::adler32(m_check,
420  static_cast<const Bytef *>(m_compressed->handle()),
421  sizeToDisk);
422  }
423 
424  // update statistics
425  m_cFileMB += static_cast<double>(sizeToDisk)/(1024*1024);
426  m_runMB += static_cast<double>(sizeToDisk)/(1024*1024);
429 
430  ERS_DEBUG(3,"Event "<< m_file_end_record.events_in_run<<" is written at offset "<<m_latestPosition);
431 
432  if(!m_cFile.good()) return EventStorage::DWNOOK;
433 
434  return EventStorage::DWOK;
435 }

◆ putPrecompressedData() [1/2]

DWError DataWriter::putPrecompressedData ( const unsigned int &  dataSize,
const void *  event 
)

Write a single block of data already compressed.

WARNING* the library has now way to check if the compression algorithm matches the declared file type. The data is directly written to the file without check, completely trusting the caller. Use with care! If one of the size limits would be exceeded, the current file will be closed and another one will be opened automatically.

Parameters
dataSizesize of the eveny in bytes
*eventstart of the event data in memory

Definition at line 328 of file v5_DataWriter.cxx.

329  {
330 
332  iov.iov_base = event;
333  iov.iov_len = dataSize;
334  return this->putPrecompressedData(1, &iov);
335 }

◆ putPrecompressedData() [2/2]

DWError DataWriter::putPrecompressedData ( const unsigned int &  entries,
const iovec_const my_iovec 
)

Write a single block of data already compressed.

WARNING* the library has now way to check if the compression algorithm matches the declared file type. The data is directly written to the file without check, completely trusting the caller. Use with care! If one of the size limits would be exceeded, the current file will be closed and another one will be opened automatically.

Parameters
numberof the data chunks
locationsof the data chunks

Definition at line 338 of file v5_DataWriter.cxx.

339  {
340 
341  uint32_t todisk;
342  return this->putData_implementation(entries, my_iovec, todisk, true);
343 }

◆ registerCallBack()

void DataWriter::registerCallBack ( EventStorage::DataWriterCallBack *  pUserCBclass)

If you want to define actions to be taken when a file is open or closed register your call-back class here with this method.

Definition at line 753 of file v5_DataWriter.cxx.

753  {
754  m_callBack = pUserCBclass;
755  if(m_callBack != NULL) {
756  m_callBack->FileWasOpened(
757  m_filenamecallback->getCurrentFileName(),
759  m_streamType,
760  m_streamName,
762  m_guid,
766  );
767  }
768 }

◆ replaceGuid()

void DataWriter::replaceGuid ( )
private

Definition at line 775 of file v5_DataWriter.cxx.

775  {
776  using namespace std;
777 
778  if (m_next_guid == ""){
780  m_guid = g.toString();
781  }else{
783  m_next_guid = "";
784  }
785 
786  string e1="GUID=" + m_guid;
787  m_fmdStrings[0]=e1;
788 }

◆ setGUID()

void offline_EventStorage_v5::DataWriter::setGUID ( const std::string &  GUID)

Set the GUID for the next file in this sequence.

◆ setGuid()

void DataWriter::setGuid ( const std::string &  Guid)

Externally set the GUID for the next file in this sequence.

Definition at line 790 of file v5_DataWriter.cxx.

790  {
791  m_next_guid = Guid;
792 }

◆ setMaxFileMB()

DWError DataWriter::setMaxFileMB ( const unsigned int &  maxFileMB)

max size of 1 file in MB.

The file is closed before this limit is overrun.

Definition at line 269 of file v5_DataWriter.cxx.

270 {
271  m_file_start_record.sizeLimit_MB = maxFileMB;
272  return EventStorage::DWOK;
273 }

◆ setMaxFileNE()

DWError DataWriter::setMaxFileNE ( const unsigned int &  maxFileNE)

max size of 1 file in number of data blocks (or events) 1 putData call is one block

Definition at line 275 of file v5_DataWriter.cxx.

276 {
278  return EventStorage::DWOK;
279 }

◆ setRunParamsRecord()

void DataWriter::setRunParamsRecord ( const run_parameters_record rPar)
private

◆ spaceForGuid()

void DataWriter::spaceForGuid ( )
private

Definition at line 770 of file v5_DataWriter.cxx.

770  {
771  string e("");
772  m_fmdStrings.insert(m_fmdStrings.begin(),e);
773 }

Member Data Documentation

◆ m_applicationName

std::string offline_EventStorage_v5::DataWriter::m_applicationName
private

Definition at line 326 of file v5_DataWriter.h.

◆ m_callBack

EventStorage::DataWriterCallBack* offline_EventStorage_v5::DataWriter::m_callBack
private

Definition at line 338 of file v5_DataWriter.h.

◆ m_cFile

std::fstream offline_EventStorage_v5::DataWriter::m_cFile
private

Definition at line 304 of file v5_DataWriter.h.

◆ m_cFileMB

double offline_EventStorage_v5::DataWriter::m_cFileMB
private

Definition at line 332 of file v5_DataWriter.h.

◆ m_cFileOpen

bool offline_EventStorage_v5::DataWriter::m_cFileOpen
private

Definition at line 306 of file v5_DataWriter.h.

◆ m_check

uLong offline_EventStorage_v5::DataWriter::m_check
private

Definition at line 334 of file v5_DataWriter.h.

◆ m_complevel

unsigned int offline_EventStorage_v5::DataWriter::m_complevel
private

Definition at line 329 of file v5_DataWriter.h.

◆ m_compressed

DataBuffer* offline_EventStorage_v5::DataWriter::m_compressed
private

Definition at line 330 of file v5_DataWriter.h.

◆ m_compression

CompressionType offline_EventStorage_v5::DataWriter::m_compression
private

Definition at line 328 of file v5_DataWriter.h.

◆ m_file_end_record

file_end_record offline_EventStorage_v5::DataWriter::m_file_end_record
private

Definition at line 312 of file v5_DataWriter.h.

◆ m_file_name_strings

file_name_strings offline_EventStorage_v5::DataWriter::m_file_name_strings
private

Definition at line 310 of file v5_DataWriter.h.

◆ m_file_start_record

file_start_record offline_EventStorage_v5::DataWriter::m_file_start_record
private

Definition at line 309 of file v5_DataWriter.h.

◆ m_filenamecallback

boost::shared_ptr<EventStorage::FileNameCallback> offline_EventStorage_v5::DataWriter::m_filenamecallback
private

Definition at line 342 of file v5_DataWriter.h.

◆ m_fileNameCore

std::string offline_EventStorage_v5::DataWriter::m_fileNameCore
private

Definition at line 319 of file v5_DataWriter.h.

◆ m_fmdStrings

freeMetaDataStrings offline_EventStorage_v5::DataWriter::m_fmdStrings
private

Definition at line 340 of file v5_DataWriter.h.

◆ m_guid

std::string offline_EventStorage_v5::DataWriter::m_guid
private

Definition at line 314 of file v5_DataWriter.h.

◆ m_internal_run_parameters_record

internal_run_parameters_record offline_EventStorage_v5::DataWriter::m_internal_run_parameters_record
private

Definition at line 311 of file v5_DataWriter.h.

◆ m_latestPosition

int64_t offline_EventStorage_v5::DataWriter::m_latestPosition
private

Definition at line 336 of file v5_DataWriter.h.

◆ m_lumiBlockNumber

unsigned int offline_EventStorage_v5::DataWriter::m_lumiBlockNumber
private

Definition at line 325 of file v5_DataWriter.h.

◆ m_next_guid

std::string offline_EventStorage_v5::DataWriter::m_next_guid
private

Definition at line 315 of file v5_DataWriter.h.

◆ m_nextWritePath

std::string offline_EventStorage_v5::DataWriter::m_nextWritePath
private

Definition at line 318 of file v5_DataWriter.h.

◆ m_openFailed

bool offline_EventStorage_v5::DataWriter::m_openFailed
private

Definition at line 307 of file v5_DataWriter.h.

◆ m_project

std::string offline_EventStorage_v5::DataWriter::m_project
private

Definition at line 321 of file v5_DataWriter.h.

◆ m_runMB

long double offline_EventStorage_v5::DataWriter::m_runMB
private

Definition at line 333 of file v5_DataWriter.h.

◆ m_stream

std::string offline_EventStorage_v5::DataWriter::m_stream
private

Definition at line 324 of file v5_DataWriter.h.

◆ m_streamName

std::string offline_EventStorage_v5::DataWriter::m_streamName
private

Definition at line 323 of file v5_DataWriter.h.

◆ m_streamType

std::string offline_EventStorage_v5::DataWriter::m_streamType
private

Definition at line 322 of file v5_DataWriter.h.

◆ m_writePath

std::string offline_EventStorage_v5::DataWriter::m_writePath
private

Definition at line 317 of file v5_DataWriter.h.


The documentation for this class was generated from the following files:
offline_EventStorage_v5::DataWriter::m_latestPosition
int64_t m_latestPosition
Definition: v5_DataWriter.h:336
offline_EventStorage_v5::DataWriter::nameFile
std::string nameFile(const FileStatus &fs) const
get the name of the current file
Definition: v5_DataWriter.cxx:642
offline_EventStorage_v5::DataWriter::m_check
uLong m_check
Definition: v5_DataWriter.h:334
mergePhysValFiles.pattern
pattern
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:25
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
offline_EventStorage_v5::file_end_record::events_in_run
uint32_t events_in_run
Definition: v5_EventStorageRecords.h:88
offline_EventStorage_v5::file_name_strings::fileNameCore
std::string fileNameCore
Definition: v5_EventStorageRecords.h:57
offline_EventStorage_v5::DataWriter::m_applicationName
std::string m_applicationName
Definition: v5_DataWriter.h:326
dqt_zlumi_alleff_HIST.iov
iov
Definition: dqt_zlumi_alleff_HIST.py:119
offline_EventStorage_v5::FINISHED
@ FINISHED
Definition: v5_DataWriter.h:42
offline_EventStorage_v5::free_strings_marker
const uint32_t free_strings_marker
Definition: v5_EventStorageRecords.h:96
offline_EventStorage_v5::run_parameters_record::max_events
uint32_t max_events
Definition: v5_EventStorageRecords.h:66
offline_EventStorage_v5::internal_run_parameters_record::detector_mask_2of2
uint32_t detector_mask_2of2
Definition: v5_EventStorageRecords.h:117
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
egammaEnergyPositionAllSamples::e1
double e1(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 1st sampling
offline_EventStorage_v5::DataWriter::m_cFileMB
double m_cFileMB
Definition: v5_DataWriter.h:332
offline_EventStorage_v5::file_start_pattern
const file_start_record file_start_pattern
Definition: v5_EventStorageRecords.h:98
offline_EventStorage_v5::DataWriter::m_stream
std::string m_stream
Definition: v5_DataWriter.h:324
offline_EventStorage_v5::DataWriter::m_file_start_record
file_start_record m_file_start_record
Definition: v5_DataWriter.h:309
skel.it
it
Definition: skel.GENtoEVGEN.py:407
offline_EventStorage_v5::DataWriter::m_cFile
std::fstream m_cFile
Definition: v5_DataWriter.h:304
offline_EventStorage_v5::run_parameters_record::run_number
uint32_t run_number
Definition: v5_EventStorageRecords.h:65
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:70
offline_EventStorage_v5::file_start_record::date
uint32_t date
Definition: v5_EventStorageRecords.h:49
offline_EventStorage_v5::iovec_const
Definition: v5_EventStorageRecords.h:36
offline_EventStorage_v5::DataWriter::m_nextWritePath
std::string m_nextWritePath
Definition: v5_DataWriter.h:318
offline_EventStorage_v5::DataWriter::getFileSize
uint64_t getFileSize(const std::string &fileNameCore) const
Definition: v5_DataWriter.cxx:795
IDTPM::getTime
float getTime(const xAOD::TrackParticle &p)
Accessor utility function for getting the track time.
Definition: TrackParametersHelper.h:156
offline_EventStorage_v5::DataWriter::openNextFile
void openNextFile()
Definition: v5_DataWriter.cxx:565
offline_EventStorage_v5::DataWriter::m_compression
CompressionType m_compression
Definition: v5_DataWriter.h:328
offline_EventStorage_v5::DataWriter::spaceForGuid
void spaceForGuid()
Definition: v5_DataWriter.cxx:770
offline_EventStorage_v5::DataWriter::m_file_end_record
file_end_record m_file_end_record
Definition: v5_DataWriter.h:312
offline_EventStorage_v5::run_parameters_record::rec_enable
uint32_t rec_enable
Definition: v5_EventStorageRecords.h:67
TrigInDetValidation_Base.test
test
Definition: TrigInDetValidation_Base.py:142
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
offline_EventStorage_v5::internal_run_parameters_record::beam_type
uint32_t beam_type
Definition: v5_EventStorageRecords.h:118
offline_poolCopy_v5::Guid
Definition: v5_Guid.h:34
offline_EventStorage_v5::DataBuffer::handle
void * handle()
Definition: v5_DataBuffer.cxx:81
offline_EventStorage_v5::DataWriter::m_file_name_strings
file_name_strings m_file_name_strings
Definition: v5_DataWriter.h:310
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
offline_EventStorage_v5::DataWriter::m_next_guid
std::string m_next_guid
Definition: v5_DataWriter.h:315
pi
#define pi
Definition: TileMuonFitter.cxx:65
offline_EventStorage_v5::DataWriter::fileExists
bool fileExists(const std::string &name) const
Definition: v5_DataWriter.cxx:556
offline_EventStorage_v5::DataWriter::file_record
void file_record(void *ri, const void *pi)
Definition: v5_DataWriter.cxx:666
offline_EventStorage_v5::internal_run_parameters_record::rec_enable
uint32_t rec_enable
Definition: v5_EventStorageRecords.h:114
offline_EventStorage_v5::DataWriter::closeFile
EventStorage::DWError closeFile()
Close the currently open file.
Definition: v5_DataWriter.cxx:465
offline_EventStorage_v5::run_parameters_record::marker
uint32_t marker
Definition: v5_EventStorageRecords.h:63
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
offline_EventStorage_v5::DataWriter::m_runMB
long double m_runMB
Definition: v5_DataWriter.h:333
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
offline_EventStorage_v5::DataWriter::m_writePath
std::string m_writePath
Definition: v5_DataWriter.h:317
offline_EventStorage_v5::file_name_strings_marker
const uint32_t file_name_strings_marker
Definition: v5_EventStorageRecords.h:95
offline_EventStorage_v5::DataWriter::nextFile
EventStorage::DWError nextFile()
close the file and open next one immediately
Definition: v5_DataWriter.cxx:539
offline_EventStorage_v5::DataWriter::m_project
std::string m_project
Definition: v5_DataWriter.h:321
offline_EventStorage_v5::run_parameters_record::beam_energy
uint32_t beam_energy
Definition: v5_EventStorageRecords.h:71
offline_EventStorage_v5::DataWriter::initDW
void initDW(const std::string &writingPath, boost::shared_ptr< EventStorage::FileNameCallback > theFNCB, const run_parameters_record &rPar, const std::string &project, const std::string &streamType, const std::string &streamName, const std::string &stream, const unsigned int lumiBlockNumber, const std::string &applicationName, const std::vector< std::string > &fmdStrings, const CompressionType compression, const unsigned int compLevel)
Definition: v5_DataWriter.cxx:152
offline_EventStorage_v5::run_parameters_pattern
const internal_run_parameters_record run_parameters_pattern
Definition: v5_EventStorageRecords.h:134
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:183
lumiFormat.i
int i
Definition: lumiFormat.py:85
offline_EventStorage_v5::DataWriter::m_openFailed
bool m_openFailed
Definition: v5_DataWriter.h:307
offline_EventStorage_v5::DataWriter::date_timeAsInt
void date_timeAsInt(uint32_t &getDate, uint32_t &getTime) const
Definition: v5_DataWriter.cxx:233
offline_EventStorage_v5::DataBuffer
Definition: v5_DataBuffer.h:16
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
beamspotman.n
n
Definition: beamspotman.py:729
offline_EventStorage_v5::DataWriter::setRunParamsRecord
void setRunParamsRecord(const run_parameters_record &rPar)
Definition: v5_DataWriter.cxx:281
offline_EventStorage_v5::DataWriter::m_cFileOpen
bool m_cFileOpen
Definition: v5_DataWriter.h:306
offline_EventStorage_v5::file_end_pattern
const file_end_record file_end_pattern
Definition: v5_EventStorageRecords.h:167
offline_EventStorage_v5::file_end_record::data_in_run
uint32_t data_in_run
Definition: v5_EventStorageRecords.h:89
offline_EventStorage_v5::DataWriter::m_guid
std::string m_guid
Definition: v5_DataWriter.h:314
offline_EventStorage_v5::file_end_record::status
uint32_t status
Definition: v5_EventStorageRecords.h:90
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
offline_EventStorage_v5::internal_run_parameters_record::detector_mask_1of2
uint32_t detector_mask_1of2
Definition: v5_EventStorageRecords.h:116
offline_EventStorage_v5::file_name_strings::appName
std::string appName
Definition: v5_EventStorageRecords.h:56
offline_EventStorage_v5::DataWriter::putData
EventStorage::DWError putData(const unsigned int &dataSize, const void *event)
Write a single block of data.
Definition: v5_DataWriter.cxx:298
offline_EventStorage_v5::internal_run_parameters_record::marker
uint32_t marker
Definition: v5_EventStorageRecords.h:110
offline_EventStorage_v5::UNFINISHED
@ UNFINISHED
Definition: v5_DataWriter.h:42
offline_EventStorage_v5::ZLIB
@ ZLIB
Definition: v5_EventStorageRecords.h:41
offline_EventStorage_v5::DataWriter::m_fmdStrings
freeMetaDataStrings m_fmdStrings
Definition: v5_DataWriter.h:340
offline_EventStorage_v5::run_parameters_record::record_size
uint32_t record_size
Definition: v5_EventStorageRecords.h:64
offline_EventStorage_v5::internal_run_parameters_record::max_events
uint32_t max_events
Definition: v5_EventStorageRecords.h:113
offline_EventStorage_v5::file_start_record::sizeLimit_dataBlocks
uint32_t sizeLimit_dataBlocks
Definition: v5_EventStorageRecords.h:51
WriteHiveWithMetaData.streamName
string streamName
Definition: WriteHiveWithMetaData.py:22
offline_EventStorage_v5::data_separator_record
Definition: v5_EventStorageRecords.h:74
offline_EventStorage_v5::run_parameters_record::beam_type
uint32_t beam_type
Definition: v5_EventStorageRecords.h:70
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
offline_EventStorage_v5::run_parameters_record::detector_mask
uint64_t detector_mask
Definition: v5_EventStorageRecords.h:69
PayloadHelpers::dataSize
size_t dataSize(TDA::PayloadIterator start)
Size in bytes of the buffer that is needed to decode next fragment data content.
Definition: TriggerEDMDeserialiserAlg.cxx:188
offline_EventStorage_v5::internal_run_parameters_record::run_number
uint32_t run_number
Definition: v5_EventStorageRecords.h:112
offline_EventStorage_v5::DataWriter::m_lumiBlockNumber
unsigned int m_lumiBlockNumber
Definition: v5_DataWriter.h:325
python.plotting.G4DebuggerUtils.rename
def rename(label)
Definition: G4DebuggerUtils.py:11
offline_EventStorage_v5::internal_run_parameters_record::record_size
uint32_t record_size
Definition: v5_EventStorageRecords.h:111
offline_EventStorage_v5::iovec_const::iov_len
size_t iov_len
Definition: v5_EventStorageRecords.h:38
offline_EventStorage_v5::file_end_record::date
uint32_t date
Definition: v5_EventStorageRecords.h:84
offline_EventStorage_v5::DataWriter::m_internal_run_parameters_record
internal_run_parameters_record m_internal_run_parameters_record
Definition: v5_DataWriter.h:311
project
T_ResultType project(ParameterMapping::type< N > parameter_map, const T_Matrix &matrix)
Definition: MeasurementSelector.h:149
offline_EventStorage_v5::data_separator_pattern
const data_separator_record data_separator_pattern
Definition: v5_EventStorageRecords.h:160
offline_EventStorage_v5::DataWriter::m_compressed
DataBuffer * m_compressed
Definition: v5_DataWriter.h:330
offline_EventStorage_v5::DataWriter::m_callBack
EventStorage::DataWriterCallBack * m_callBack
Definition: v5_DataWriter.h:338
offline_EventStorage_v5::DataWriter::m_streamType
std::string m_streamType
Definition: v5_DataWriter.h:322
RunTileMonitoring.streamType
streamType
Definition: RunTileMonitoring.py:158
offline_EventStorage_v5::file_end_record::data_in_file
uint32_t data_in_file
Definition: v5_EventStorageRecords.h:87
offline_EventStorage_v5::data_separator_record::data_block_size
uint32_t data_block_size
Definition: v5_EventStorageRecords.h:78
offline_EventStorage_v5::file_start_record::sizeLimit_MB
uint32_t sizeLimit_MB
Definition: v5_EventStorageRecords.h:52
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
offline_EventStorage_v5::file_start_record::file_number
uint32_t file_number
Definition: v5_EventStorageRecords.h:48
offline_EventStorage_v5::DataWriter::m_complevel
unsigned int m_complevel
Definition: v5_DataWriter.h:329
offline_EventStorage_v5::DataWriter::m_streamName
std::string m_streamName
Definition: v5_DataWriter.h:323
offline_EventStorage_v5::DataWriter::putPrecompressedData
EventStorage::DWError putPrecompressedData(const unsigned int &dataSize, const void *event)
Write a single block of data already compressed.
Definition: v5_DataWriter.cxx:328
offline_EventStorage_v5::internal_run_parameters_record::beam_energy
uint32_t beam_energy
Definition: v5_EventStorageRecords.h:119
offline_EventStorage_v5::run_parameters_record::trigger_type
uint32_t trigger_type
Definition: v5_EventStorageRecords.h:68
Herwig7_QED_EvtGen_ll.fs
dictionary fs
Definition: Herwig7_QED_EvtGen_ll.py:17
entries
double entries
Definition: listroot.cxx:49
offline_EventStorage_v5::DataWriter::m_filenamecallback
boost::shared_ptr< EventStorage::FileNameCallback > m_filenamecallback
Definition: v5_DataWriter.h:342
offline_EventStorage_v5::file_start_record::time
uint32_t time
Definition: v5_EventStorageRecords.h:50
jobOptions.fileName
fileName
Definition: jobOptions.SuperChic_ALP2.py:39
offline_EventStorage_v5::NONE
@ NONE
Definition: v5_EventStorageRecords.h:41
get_generator_info.error
error
Definition: get_generator_info.py:40
offline_EventStorage_v5::file_end_record::events_in_file
uint32_t events_in_file
Definition: v5_EventStorageRecords.h:86
offline_EventStorage_v5::reset_record
void reset_record(void *ri, const void *pi)
Definition: v5_EventStorageRecords.cxx:56
offline_EventStorage_v5::data_separator_record::data_block_number
uint32_t data_block_number
Definition: v5_EventStorageRecords.h:77
offline_EventStorage_v5::DataWriter::replaceGuid
void replaceGuid()
Definition: v5_DataWriter.cxx:775
offline_EventStorage_v5::DataWriter::putData_implementation
EventStorage::DWError putData_implementation(const unsigned int &entries, const iovec_const *my_iovec, uint32_t &sizeToDisk, bool precompressed=false)
Definition: v5_DataWriter.cxx:346
python.SystemOfUnits.ns
float ns
Definition: SystemOfUnits.py:146
offline_EventStorage_v5::internal_run_parameters_record::trigger_type
uint32_t trigger_type
Definition: v5_EventStorageRecords.h:115
python.BeamSpotUpdate.compression
compression
Definition: BeamSpotUpdate.py:188
offline_EventStorage_v5::file_end_record::time
uint32_t time
Definition: v5_EventStorageRecords.h:85
python.SystemOfUnits.L
float L
Definition: SystemOfUnits.py:92