Skip to content

Implement TmpFS Plugin#441

Open
Ohisemega wants to merge 7 commits intomasterfrom
Implement_TmpfsFrame_FIX_Issue_434
Open

Implement TmpFS Plugin#441
Ohisemega wants to merge 7 commits intomasterfrom
Implement_TmpfsFrame_FIX_Issue_434

Conversation

@Ohisemega
Copy link
Contributor

Initial Commit
Add TmpFSPlugin *.cpp, *Lib.cpp and *.h files.

Fixes #434

Initial Commit
Add TmpFSPlugin *.cpp, *Lib.cpp and *.h files.

Fixes #434
@Ohisemega
Copy link
Contributor Author

@GDYendell @ajgdls
This is the 1st draft for the TmpFS Plugin implementation. I'm expecting a lot of change requests :)

@Ohisemega Ohisemega self-assigned this Feb 10, 2026
@Ohisemega Ohisemega added enhancement in progress Awaiting review/approval Has been addressed in a PR and needs to be approved or commented for rework by a reviewer labels Feb 10, 2026
@Ohisemega Ohisemega added this to the in-progress milestone Feb 10, 2026
Copy link
Collaborator

@GDYendell GDYendell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass

Change Plugin and rlated files to have TempfsPlugin prefix.
Add instruction to write to opened file.
Remove comments related to "removing file."
Remove comments related to data pointer source.
Fix error and exception logs.
Move "Create directory" step to process_frame() function.
Fixes #434
@Ohisemega Ohisemega requested a review from GDYendell February 10, 2026 18:32
@Ohisemega
Copy link
Contributor Author

Ohisemega commented Feb 10, 2026

Personal Note:

Write UNIT Test for TempfsPlugin

Add Acquisition Number and Frame Number to file path creation of TmpfsPlugin::process_frame() method.

Fixes #434
Add '/' in-between acquisiton_ID and Frame number.
Remove erratic BLOSC guard header prefixes.
Improve code comment for full_file_path_ data member.

Fixes #434
@Ohisemega Ohisemega requested a review from GDYendell February 11, 2026 16:34
strerror_r(errno, msg.data(), msg.max_size());
error << "Failed to Write to file - " << this->full_file_path_.string() <<": " << msg.data();
throw std::runtime_error(error.str());
}
Copy link
Collaborator

@GDYendell GDYendell Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In eiger-detector we added this nice helper:

#define LOG_WITH_ERRNO(log, message)                                             \
  std::stringstream error; \
  {                                                                              \
  error << message << " [errno: " << errno << " - " << strerror(errno) << "]"; \
    std::stringstream error;                                                     \
  LOG4CXX_ERROR(log, error.str()); \
    error << message << " [errno: " << errno << " - " << strerror(errno) << "]"; \
}
    LOG4CXX_ERROR(log, error.str());                                             \
  }

but it sounds like strerror_r is better because it is threadsafe?

Copy link
Contributor Author

@Ohisemega Ohisemega Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes strerrno_r() is thread-safe and re-entrant.

timcnicholls

This comment was marked as resolved.

Add boolean flag to indicate a failed directory creation.
Add return-early condition to process_frame() function if boolean is TRUE.
Set error messages in plugin's error_message bucket.

Fixes #434
Rename TmpfsPlugin to RawFileWriterPlugin and all related files and library names.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Awaiting review/approval Has been addressed in a PR and needs to be approved or commented for rework by a reviewer enhancement in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Convert TmpfsFrame into a plugin

3 participants