|
|
Go to the documentation of this file.
20 #include <boost/filesystem/fstream.hpp>
28 microSleep_(ps.getUntrackedParameter<
int>(
"microSleep", 0)),
29 frdFileVersion_(ps.getUntrackedParameter<unsigned
int>(
"frdFileVersion", 0))
96 if ((
unsigned)retval !=
msg.size()) {
98 <<
"Error writing FED Raw Data event data to " <<
fileName_ <<
". Possibly the output disk "
99 <<
"is full?" << std::endl;
111 throw cms::Exception(
"RawEventFileWriterForBU",
"doOutputEventFragment") <<
"Unsupported output mode ";
162 outfd_ = open(
fileName_.c_str(), O_WRONLY | O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO);
167 <<
"Error opening FED Raw Data event output file: " <<
name <<
": " << strerror(errno) <<
"\n";
186 std::stringstream
ss;
188 mkdir(
ss.str().c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
199 if (
stat(rawJSDName.c_str(), &fstat) != 0) {
202 FileIO::writeStringToFile(rawJSDName,
content);
205 if (
stat(eolJSDName.c_str(), &fstat) != 0) {
208 FileIO::writeStringToFile(eolJSDName,
content);
211 if (
stat(eorJSDName.c_str(), &fstat) != 0) {
214 FileIO::writeStringToFile(eorJSDName,
content);
221 lseek(
outfd_, 0, SEEK_SET);
267 std::ostringstream ostr;
296 edm::LogInfo(
"RawEventFileWriterForBU") <<
"Writing EOR file!";
313 std::stringstream
ss;
314 ss <<
"run" << std::setfill(
'0') << std::setw(6) <<
run_;
void addLegendItem(std::string const &name, std::string const &type, std::string const &operation)
jsoncollector::IntJ perFileEventCount_
jsoncollector::DataPointDefinition eolJsonDef_
void setDefaultGroup(std::string const &group)
void initialize(std::string const &destinationDir, std::string const &name, int ls)
jsoncollector::IntJ perRunLastLumi_
jsoncollector::DataPointDefinition eorJsonDef_
jsoncollector::IntJ perLumiLostEventCount_
void commit(std::vector< unsigned int > *streamLumisPtr)
jsoncollector::IntJ perRunLumiCount_
jsoncollector::IntJ perLumiFileCount_
jsoncollector::IntJ perRunEventCount_
void doOutputEventFragment(unsigned char *dataPtr, unsigned long dataSize)
void registerGlobalMonitorable(JsonMonitorable *newMonitorable, bool NAifZeroUpdates, unsigned int *nBins=nullptr)
~RawEventFileWriterForBU()
virtual void setName(std::string name)
void setDefPath(std::string const &dpath)
jsoncollector::IntJ perLumiEventCount_
static const std::string source
jsoncollector::IntJ perLumiSize_
unsigned int frdFileVersion_
jsoncollector::FastMonitor * runMon_
jsoncollector::IntJ perRunFileCount_
void finishFileWrite(int ls)
jsoncollector::DataPointDefinition rawJsonDef_
RawEventFileWriterForBU(edm::ParameterSet const &ps)
jsoncollector::IntJ perLumiTotalEventCount_
jsoncollector::IntJ perFileSize_
bool outputFullJSON(std::string const &path, unsigned int lumi)
std::string destinationDir_
std::pair< Binary, Binary > serialize(const T &payload)
void snap(unsigned int ls)
void discardCollected(unsigned int forLumi)
void makeRunPrefix(std::string const &destinationDir)
jsoncollector::FastMonitor * fileMon_
void doOutputEvent(FRDEventMsgView const &msg)
jsoncollector::FastMonitor * lumiMon_