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 52 of file v5_DataWriter.cxx.

60 {
61  boost::shared_ptr<daq::RawFileName>
62  fileName(new daq::RawFileName(fileNameCore));
63 
64  if ( fileName->hasValidCore() ) {
65  m_project = fileName->project();
66  m_streamType = fileName->streamType();
67  m_streamName = fileName->streamName();
68  m_stream = fileName->stream();
69  m_lumiBlockNumber = fileName->lumiBlockNumber();
70  m_applicationName = fileName->applicationName();
71  } else {
72  std::stringstream mystream;
73  mystream << "FileName " << fileName->fileName()
74  << " has failed interpretation."
75  << " The file header will have no values for "
76  << " project, stream, lumiBlock and appName";
77  ERS_DEBUG(1,mystream.str());
78  // EventStorage::RawFileNameIssue myissue(ERS_HERE, mystream.str().c_str() );
79  // ers::warning(myissue);
80  m_project = "";
81  m_streamType = "";
82  m_streamName = "";
83  m_stream = "";
85  m_applicationName = "";
86  }
87 
88  fileName->setFileSequenceNumber(startIndex);
89 
90  initDW(writingPath, fileName, rPar, m_project, m_streamType, m_streamName,
92  fmdStrings, compression,compLevel);
93 
94 }

◆ 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 97 of file v5_DataWriter.cxx.

110 {
111  boost::shared_ptr<FileNameCallback> fileName(new SimpleFileName(fileNameCore));
112  initDW(writingPath, fileName, rPar, project, streamType, streamName, stream, lumiBlockNumber, applicationName, fmdStrings, compression, compLevel);
113 
114 }

◆ DataWriter() [4/4]

offline_EventStorage_v5::DataWriter::DataWriter ( )
private

◆ ~DataWriter()

DataWriter::~DataWriter ( )

destructor, the way to close the sequence of files

Definition at line 117 of file v5_DataWriter.cxx.

118 {
119  ERS_DEBUG(1,"DataWriter::~DataWriter() called.");
120 
121  m_file_end_record.status = 1; // This identifies the end of the sequence.
122  if(m_cFileOpen) closeFile();
123 
124  delete m_compressed;
125 
126  ERS_DEBUG(1,"DataWriter::~DataWriter() finished.");
127 }

Member Function Documentation

◆ cd()

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

set another writing path

Definition at line 630 of file v5_DataWriter.cxx.

630  {
631  m_nextWritePath = writingPath;
632  ERS_DEBUG(3,"Directory changed to "<<m_nextWritePath
633  <<" (effective for hext file).");
634 }

◆ 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 444 of file v5_DataWriter.cxx.

445 {
446  ERS_DEBUG(3,"DataWriter::closeFile() called.");
447 
448  // do statistics
449  m_file_end_record.data_in_file = static_cast<unsigned int>(m_cFileMB+0.5);
450  m_file_end_record.data_in_run = static_cast<unsigned int>(m_runMB+0.5);
451 
453 
454  // write eof record
456 
457  m_cFile.close();
458  std::ostringstream oss;
459  oss.width(8);
460  oss.fill('0');
461  oss << std::hex << std::uppercase <<m_check;
462  std::string checksum = oss.str();
463  m_check = ::adler32(0L, Z_NULL, 0);
464 
465  // rename the file
466  ERS_DEBUG(3,"Rename file " << nameFile(UNFINISHED) << endl
467  << "to " << nameFile(FINISHED));
468  if (::rename(nameFile(UNFINISHED).c_str(), nameFile(FINISHED).c_str()) == -1) {
469 
470  EventStorage::WritingIssue ci(ERS_HERE, "Rename failed.");
471  ers::error(ci);
472  return EventStorage::DWNOOK;
473  }
474 
475  // check if the file is there
477  {
478  ERS_DEBUG(2,"Finished file "<<nameFile(FINISHED));
479  if(m_callBack != NULL) {
480  ERS_DEBUG(3,"Execute callback from DataWriter.");
481  m_callBack->FileWasClosed(
482  m_filenamecallback->getCurrentFileName(),
484  m_streamType,
485  m_streamName,
487  m_guid,
488  checksum,
494  );
495  }
496 
497  // now we can substitute new directory, if specified
498  if(m_nextWritePath != "") {
500  m_nextWritePath="";
501  ERS_DEBUG(3,"New writing path became effective. The path is "
502  <<m_writePath);
503  }
504  m_cFileOpen = false;
505 
506  try{
507  m_filenamecallback->advance();
508  }catch(EventStorage::ES_SingleFile &e){
509  //If opennext file is called, it
510  // will fail there
511  }
512  return EventStorage::DWOK;
513  }
514  return EventStorage::DWNOOK;
515 }

◆ dataMB_InFile()

unsigned int DataWriter::dataMB_InFile ( ) const

number of mega bytes written to the current file

Definition at line 433 of file v5_DataWriter.cxx.

434 {
435  return static_cast<unsigned int>(m_cFileMB+0.5);
436 }

◆ dataMB_InFileSequence()

unsigned int DataWriter::dataMB_InFileSequence ( ) const

number of mega bytes written to the file sequence

Definition at line 438 of file v5_DataWriter.cxx.

439 {
440  return static_cast<unsigned int>(m_runMB+0.5);
441 }

◆ date_timeAsInt()

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

Definition at line 212 of file v5_DataWriter.cxx.

213 {
214  long a_time;
215  time(&a_time);
216 
217  struct tm t;
218  localtime_r( &a_time, &t);
219 
220  getDate= 1000000*t.tm_mday+
221  10000*(1+t.tm_mon)+
222  1900+t.tm_year;
223 
224  getTime= 10000*t.tm_hour+
225  100*t.tm_min+
226  t.tm_sec ;
227 }

◆ eventsInFile()

unsigned int DataWriter::eventsInFile ( ) const

number of events written to the currently open file

Definition at line 423 of file v5_DataWriter.cxx.

424 {
426 }

◆ eventsInFileSequence()

unsigned int DataWriter::eventsInFileSequence ( ) const

number of events written to the file sequence

Definition at line 428 of file v5_DataWriter.cxx.

429 {
431 }

◆ file_record() [1/3]

void DataWriter::file_record ( const file_name_strings nst)
private

Definition at line 663 of file v5_DataWriter.cxx.

663  {
664 
665  const char *cName = nst.appName.c_str();
666  const char *cTag = nst.fileNameCore.c_str();
667 
668  uint32_t sizeName = nst.appName.size();
669  uint32_t sizeTag = nst.fileNameCore.size();
670 
672  m_check = ::adler32(m_check,(const Bytef*)
674  sizeof(uint32_t));
675 
676  m_cFile.write((char *)(&sizeName),sizeof(uint32_t));
677  m_check = ::adler32(m_check,(const Bytef*)
678  (&sizeName),
679  sizeof(uint32_t));
680  m_cFile.write(cName,sizeName);
681  m_check = ::adler32(m_check,(const Bytef*)
682  (cName),
683  sizeName);
684 
685  char ns = sizeName % 4;
686  if(ns){
687  m_cFile.write(" ",4-ns);
688  m_check = ::adler32(m_check,(const Bytef*)" ",4-ns);
689  }
690 
691  m_cFile.write((char *)(&sizeTag),sizeof(uint32_t));
692  m_check = ::adler32(m_check,(const Bytef*)(&sizeTag),sizeof(uint32_t));
693  m_cFile.write(cTag,sizeTag);
694  m_check = ::adler32(m_check,(const Bytef*)cTag,sizeTag);
695 
696  ns = sizeTag % 4;
697  if(ns){
698  m_cFile.write(" ",4-ns);
699  m_check = ::adler32(m_check,(const Bytef*)" ",4-ns);
700  }
701 
702 }

◆ file_record() [2/3]

void DataWriter::file_record ( const freeMetaDataStrings fmdStrings)
private

Definition at line 704 of file v5_DataWriter.cxx.

705 {
706  ERS_DEBUG(2,"Writing the metadata strings.");
707 
709  m_check = ::adler32(m_check, (const Bytef*)
711  sizeof(uint32_t));
712 
713  uint32_t nstrings = fmdStrings.size();
714  m_cFile.write((char *)(&nstrings),sizeof(uint32_t));
715  m_check = ::adler32(m_check, (const Bytef*)
716  (&nstrings),
717  sizeof(uint32_t));
718 
719  vector<string>::const_iterator it;
720  for(it=fmdStrings.begin(); it!=fmdStrings.end(); ++it) {
721 
722  const char *cst = it->c_str();
723  uint32_t slen = it->size();
724 
725  m_cFile.write((char *)(&slen),sizeof(uint32_t));
726  m_check = ::adler32(m_check,(const Bytef*)(&slen),sizeof(uint32_t));
727  m_cFile.write(cst,slen);
728  m_check = ::adler32(m_check,(const Bytef*)cst,slen);
729  char ns = slen % 4;
730  if(ns){
731  m_cFile.write(" ",4-ns);
732  m_check = ::adler32(m_check,(const Bytef*)" ",4-ns);
733  }
734  }
735 }

◆ file_record() [3/3]

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

Definition at line 645 of file v5_DataWriter.cxx.

645  {
646 
647  uint32_t *record = reinterpret_cast<uint32_t *>(ri);
648  const uint32_t *pattern = reinterpret_cast<const uint32_t *>(pi);
649  int size=pattern[1];
650 
651  for(int i=0; i<size; i++) {
652  if(pattern[i] != 0) {
653  m_cFile.write((char *)(pattern+i),sizeof(uint32_t));
654  m_check = ::adler32(m_check,(const Bytef*)(pattern+i),sizeof(uint32_t));
655  } else {
656  m_cFile.write((char *)(record+i),sizeof(uint32_t));
657  m_check = ::adler32(m_check,(const Bytef*)(record+i),sizeof(uint32_t));
658  }
659  }
660 }

◆ fileExists()

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

Definition at line 535 of file v5_DataWriter.cxx.

536 {
537  ifstream test(name.c_str(),ios::binary | ios::in);
538  bool isThere = test.good();
539  test.close();
540 
541  return isThere;
542 }

◆ 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 792 of file v5_DataWriter.cxx.

793 {
794  return m_compression;
795 }

◆ 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 779 of file v5_DataWriter.cxx.

780 {
781  struct stat64 tmp;
782  if (::stat64(fileNameCore.c_str(), &tmp) == -1) {
783  EventStorage::WritingIssue ci(ERS_HERE, "stat64 failed.");
784  ers::error(ci);
785  return 0;
786  }
787 
788  return tmp.st_size;
789 }

◆ getPosition()

int64_t DataWriter::getPosition ( ) const

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

Definition at line 417 of file v5_DataWriter.cxx.

418 {
419  return m_latestPosition;
420 }

◆ good()

bool DataWriter::good ( ) const

feedback to user

Definition at line 230 of file v5_DataWriter.cxx.

231 {
232 
233  if(m_openFailed) return false;
234 
235  if(m_cFileOpen)
236  {
237  return m_cFile.good();
238  }
239  else
240  {
241  return true;
242  }
243 
244 }

◆ 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 130 of file v5_DataWriter.cxx.

143 {
144  m_project = project;
147  m_stream = stream;
148  m_lumiBlockNumber = lumiBlockNumber;
149  m_applicationName = applicationName;
150 
151  m_filenamecallback = theFNCB;
152 
156  m_cFileMB = 0.0;
157  m_runMB = 0.0;
158  m_latestPosition = -1;
159 
160  m_writePath = writingPath;
161  m_nextWritePath = "";
162  //m_fileNameCore = fileNameCore;
163 
165  // m_file_name_strings.appName = getAppName(fileNameCore);
167 
168  setRunParamsRecord(rPar);
169 
173 
174  m_cFileOpen=false;
175  m_openFailed = false;
176 
177  m_callBack = NULL;
178 
179  m_fmdStrings = fmdStrings;
180 
182  m_complevel = compLevel;
183  m_compressed = new DataBuffer();
184 
185  // add stream, project, compression, lumiBlock
186  // (if they are valid) to meta-data:
187  m_fmdStrings.push_back("Stream=" + m_stream );
188  m_fmdStrings.push_back("Project=" + m_project );
189  std::ostringstream o;
190  o << m_lumiBlockNumber;
191  m_fmdStrings.push_back("LumiBlock=" + o.str());
192 
194  m_fmdStrings.push_back(offline_EventStorage_v5::compressiontag +
195  "=" + offline_EventStorage_v5::type_to_string(m_compression));
196  }
197 
198  m_check = ::adler32(0L, Z_NULL, 0);
199 
200  m_guid = "";
201  m_next_guid = "";
202  this->spaceForGuid();
203  this->openNextFile();
204 
205 }

◆ 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 636 of file v5_DataWriter.cxx.

636  {
637 
638  bool inT=false;
639  if((m_nextWritePath != "") &&
640  (m_nextWritePath != m_writePath)) inT=true;
641  return inT;
642 
643 }

◆ nameFile()

string DataWriter::nameFile ( const FileStatus fs) const

get the name of the current file

Definition at line 621 of file v5_DataWriter.cxx.

622 {
623  ostringstream n;
624  n << m_writePath << "/";
625  n << m_filenamecallback->getCurrentFileName((FINISHED == fs)?false:true);
626  string name = n.str();
627  return name;
628 }

◆ nextFile()

DWError DataWriter::nextFile ( )

close the file and open next one immediately

Definition at line 518 of file v5_DataWriter.cxx.

519 {
520  ERS_DEBUG(2,"DataWriter::nextFile() called.");
521 
522  DWError we=closeFile();
523 
524 /* if (m_freename)
525  {
526  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)");
527  throw ci;
528  }*/
529 
530  openNextFile();
531  if(m_openFailed) we=EventStorage::DWNOOK;
532  return we;
533 }

◆ openNextFile()

void DataWriter::openNextFile ( )
private

Definition at line 544 of file v5_DataWriter.cxx.

545 {
546  m_cFileMB=0.0;
548 
549  try{
551  }catch(EventStorage::ES_SingleFile &e){
553  }
555 
556  ERS_DEBUG(2,"Trying to open file "<<nameFile(UNFINISHED));
557 
560  {
561 
563  string err = "found an existing file with name " + nameFile(UNFINISHED);
564  EventStorage::WritingIssue ci(ERS_HERE, err.c_str());
565  ers::warning(ci);
566 
567  } else {
568 
569  string err = "found an existing file with name " + nameFile(FINISHED);
570  EventStorage::WritingIssue ci(ERS_HERE, err.c_str());
571  ers::warning(ci);
572  }
573  m_filenamecallback->fileAlreadyExists();
574 
576 
577  ostringstream oss;
578  oss << "increase file number to ";
580  EventStorage::WritingIssue ci(ERS_HERE, oss.str().c_str());
581  ers::warning(ci);
582  }
583  ERS_DEBUG(2,"OK to write file with number "<<m_file_start_record.file_number);
584 
585  ERS_DEBUG(2,"Opening file: " << nameFile(UNFINISHED));
586 
587  m_cFile.clear();
588  m_cFile.open(nameFile(UNFINISHED).c_str(),
589  ios::out | ios::app | ios::binary);
590 
591  m_check = ::adler32(0L, Z_NULL, 0);
592 
595 
596  this->replaceGuid();
597 
598  ERS_DEBUG(3,"Writing "<<m_fmdStrings.size()<<" metadata strings.");
599  if(m_fmdStrings.size()>0) file_record(m_fmdStrings);
601  ERS_DEBUG(3,"Status of the file. good() returns "<<m_cFile.good());
602  m_cFileOpen = m_cFile.good();
603  m_openFailed = !m_cFile.good();
604 
605  if((m_callBack != NULL) && m_cFileOpen) {
606  ERS_DEBUG(3,"Execute callback from DataWriter.");
607  m_callBack->FileWasOpened(
608  m_filenamecallback->getCurrentFileName(),
610  m_streamType,
611  m_streamName,
613  m_guid,
617  );
618  }
619 }

◆ 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 277 of file v5_DataWriter.cxx.

278 {
279 
280  uint32_t todisk;
282  iov.iov_base = event;
283  iov.iov_len = dataSize;
284  return this->putData(1, &iov, todisk);
285 }

◆ 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 294 of file v5_DataWriter.cxx.

294  {
295 
297  iov.iov_base = event;
298  iov.iov_len = dataSize;
299  return this->putData(1, &iov, sizeToDisk);
300 }

◆ 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 302 of file v5_DataWriter.cxx.

302  {
303  return this->putData_implementation(entries, my_iovec, sizeToDisk);
304 }

◆ 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 288 of file v5_DataWriter.cxx.

289 {
290  uint32_t todisk;
291  return this->putData(entries, my_iovec, todisk);
292 }

◆ 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 325 of file v5_DataWriter.cxx.

325  {
326 
327  ERS_DEBUG(3,"DataWriter::putData called for an iovec.");
328  if(!m_cFileOpen) openNextFile();
329 
330  if(!m_cFileOpen) return EventStorage::DWNOOK;
331 
332  if(!m_cFile.good()) return EventStorage::DWNOOK;
333 
334  // calculate events size
335  unsigned int dataSize = 0;
336  for(unsigned int i = 0; i<entries; i++) {
337  dataSize += my_iovec[i].iov_len;
338  }
339 
340 
341 
342  sizeToDisk = dataSize;
343 
344 
345  // apply limits
347  double eventMB=static_cast<double>(dataSize)/(1024*1024);
348  double dataMB=m_cFileMB+eventMB;
349  if(static_cast<unsigned int>(dataMB+0.5) >
351  ERS_DEBUG(3,"Approaching file size limit in MB.");
352  nextFile();
353  }
354  }
355 
358  ERS_DEBUG(3,"Approaching file size limit in number of events.");
359  nextFile();
360  }
361 
362  //Here we should compress, so that we have the effective size
363  //for the event record
364  if(m_compression == ZLIB && !precompressed){
365  try{
366  offline_EventStorage_v5::zlibcompress(*m_compressed, sizeToDisk,
367  entries, my_iovec, dataSize, m_complevel);
368  }catch(offline_EventStorage_v5::CompressionIssue& ex){
369  EventStorage::WritingIssue ci(ERS_HERE, "Data compression failed.", ex);
370  ers::error(ci);
371  return EventStorage::DWNOOK;
372  }
373  }
374 
375  // prepare the event record
378  dsR.data_block_size = sizeToDisk;
379 
380  // remember the position
381  m_latestPosition = m_cFile.tellg();
382 
383  // write the event record followed by event data
385 
386 
387  if(m_compression != ZLIB || precompressed){
388  for (unsigned int i =0; i<entries; i++){
389  m_cFile.write(static_cast<const char*>(my_iovec[i].iov_base),
390  my_iovec[i].iov_len);
391 
392  m_check = ::adler32(m_check,
393  static_cast<const Bytef *>(my_iovec[i].iov_base),
394  my_iovec[i].iov_len);
395  }
396  }else{
397  m_cFile.write(static_cast<const char *>(m_compressed->handle()), sizeToDisk);
398  m_check = ::adler32(m_check,
399  static_cast<const Bytef *>(m_compressed->handle()),
400  sizeToDisk);
401  }
402 
403  // update statistics
404  m_cFileMB += static_cast<double>(sizeToDisk)/(1024*1024);
405  m_runMB += static_cast<double>(sizeToDisk)/(1024*1024);
408 
409  ERS_DEBUG(3,"Event "<< m_file_end_record.events_in_run<<" is written at offset "<<m_latestPosition);
410 
411  if(!m_cFile.good()) return EventStorage::DWNOOK;
412 
413  return EventStorage::DWOK;
414 }

◆ 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 307 of file v5_DataWriter.cxx.

308  {
309 
311  iov.iov_base = event;
312  iov.iov_len = dataSize;
313  return this->putPrecompressedData(1, &iov);
314 }

◆ 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 317 of file v5_DataWriter.cxx.

318  {
319 
320  uint32_t todisk;
321  return this->putData_implementation(entries, my_iovec, todisk, true);
322 }

◆ 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 737 of file v5_DataWriter.cxx.

737  {
738  m_callBack = pUserCBclass;
739  if(m_callBack != NULL) {
740  m_callBack->FileWasOpened(
741  m_filenamecallback->getCurrentFileName(),
743  m_streamType,
744  m_streamName,
746  m_guid,
750  );
751  }
752 }

◆ replaceGuid()

void DataWriter::replaceGuid ( )
private

Definition at line 759 of file v5_DataWriter.cxx.

759  {
760  using namespace std;
761 
762  if (m_next_guid == ""){
764  m_guid = g.toString();
765  }else{
767  m_next_guid = "";
768  }
769 
770  string e1="GUID=" + m_guid;
771  m_fmdStrings[0]=e1;
772 }

◆ 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 774 of file v5_DataWriter.cxx.

774  {
775  m_next_guid = Guid;
776 }

◆ 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 248 of file v5_DataWriter.cxx.

249 {
250  m_file_start_record.sizeLimit_MB = maxFileMB;
251  return EventStorage::DWOK;
252 }

◆ 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 254 of file v5_DataWriter.cxx.

255 {
257  return EventStorage::DWOK;
258 }

◆ setRunParamsRecord()

void DataWriter::setRunParamsRecord ( const run_parameters_record rPar)
private

◆ spaceForGuid()

void DataWriter::spaceForGuid ( )
private

Definition at line 754 of file v5_DataWriter.cxx.

754  {
755  string e("");
756  m_fmdStrings.insert(m_fmdStrings.begin(),e);
757 }

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:621
offline_EventStorage_v5::DataWriter::m_check
uLong m_check
Definition: v5_DataWriter.h:334
mergePhysValFiles.pattern
pattern
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:26
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:423
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:71
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:779
offline_EventStorage_v5::DataWriter::openNextFile
void openNextFile()
Definition: v5_DataWriter.cxx:544
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:754
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:144
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:33
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:535
offline_EventStorage_v5::DataWriter::file_record
void file_record(void *ri, const void *pi)
Definition: v5_DataWriter.cxx:645
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:444
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:518
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
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
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:131
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:193
lumiFormat.i
int i
Definition: lumiFormat.py:92
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:212
offline_EventStorage_v5::DataBuffer
Definition: v5_DataBuffer.h:16
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
beamspotman.n
n
Definition: beamspotman.py:731
offline_EventStorage_v5::DataWriter::setRunParamsRecord
void setRunParamsRecord(const run_parameters_record &rPar)
Definition: v5_DataWriter.cxx:260
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:277
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
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:195
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
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:142
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
AthenaPoolExample_Copy.streamName
string streamName
Definition: AthenaPoolExample_Copy.py:39
offline_EventStorage_v5::DataWriter::m_streamType
std::string m_streamType
Definition: v5_DataWriter.h:322
RunTileMonitoring.streamType
streamType
Definition: RunTileMonitoring.py:158
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
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:307
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
python.SystemOfUnits.ns
int ns
Definition: SystemOfUnits.py:130
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
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:759
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:325
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