25 : microSleep_(ps.getParameter<
int>(
"microSleep")),
26 frdFileVersion_(ps.getParameter<unsigned
int>(
"frdFileVersion")) {
91 if ((
unsigned)retval !=
msg.size()) {
93 <<
"Error writing FED Raw Data event data to " <<
fileName_ <<
". Possibly the output disk " 94 <<
"is full?" << std::endl;
151 outfd_ = open(
fileName_.c_str(), O_WRONLY | O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO);
156 <<
"Error opening FED Raw Data event output file: " <<
name <<
": " << strerror(errno) <<
"\n";
179 std::stringstream
ss;
181 mkdir(
ss.str().c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
192 if (
stat(rawJSDName.c_str(), &fstat) != 0) {
195 FileIO::writeStringToFile(rawJSDName,
content);
198 if (
stat(eolJSDName.c_str(), &fstat) != 0) {
201 FileIO::writeStringToFile(eolJSDName,
content);
204 if (
stat(eorJSDName.c_str(), &fstat) != 0) {
207 FileIO::writeStringToFile(eorJSDName,
content);
214 lseek(
outfd_, 0, SEEK_SET);
225 lseek(
outfd_, 0, SEEK_SET);
270 std::ostringstream ostr;
299 edm::LogInfo(
"RawEventFileWriterForBU") <<
"Writing EOR file!";
316 std::stringstream
ss;
317 ss <<
"run" << std::setfill(
'0') << std::setw(6) <<
run_;
322 desc.add<
int>(
"microSleep", 0);
323 desc.add<
unsigned int>(
"frdFileVersion", 0);
void addLegendItem(std::string const &name, std::string const &type, std::string const &operation)
jsoncollector::FastMonitor * fileMon_
void initialize(std::string const &destinationDir, std::string const &name, int ls)
void setDefPath(std::string const &dpath)
jsoncollector::IntJ perLumiLostEventCount_
edm::streamer::uint32 adlera_
std::pair< Binary, Binary > serialize(const T &payload)
jsoncollector::IntJ perFileEventCount_
jsoncollector::DataPointDefinition eolJsonDef_
jsoncollector::IntJ perRunLumiCount_
jsoncollector::IntJ perRunLastLumi_
jsoncollector::DataPointDefinition eorJsonDef_
jsoncollector::IntJ perLumiFileCount_
jsoncollector::IntJ perRunEventCount_
void doOutputEvent(edm::streamer::FRDEventMsgView const &msg)
edm::streamer::uint32 adlerb_
void registerGlobalMonitorable(JsonMonitorable *newMonitorable, bool NAifZeroUpdates, unsigned int *nBins=nullptr)
~RawEventFileWriterForBU()
jsoncollector::IntJ perLumiEventCount_
virtual void setName(std::string name)
jsoncollector::IntJ perLumiSize_
unsigned int frdFileVersion_
jsoncollector::FastMonitor * runMon_
jsoncollector::IntJ perRunFileCount_
static void extendDescription(edm::ParameterSetDescription &desc)
RawEventFileWriterForBU(edm::ParameterSet const &ps)
void finishFileWrite(int ls)
void commit(std::vector< unsigned int > *streamLumisPtr)
Log< level::Info, false > LogInfo
jsoncollector::DataPointDefinition rawJsonDef_
bool outputFullJSON(std::string const &path, unsigned int lumi, bool output=true)
jsoncollector::IntJ perLumiTotalEventCount_
void snap(unsigned int ls)
jsoncollector::IntJ perFileSize_
std::string destinationDir_
void setDefaultGroup(std::string const &group)
void makeRunPrefix(std::string const &destinationDir)
static std::string const source
jsoncollector::FastMonitor * lumiMon_
void discardCollected(unsigned int forLumi)