17 : outputDir_(iConfig.getParameter<
std::
string>(
"fileDir")),
18 outputFileName_(iConfig.getParameter<
std::
string>(
"outputBinaryFile")),
19 maxNumberOfBinaries_(iConfig.getParameter<
int>(
"maxNumberOfBinaries")) {
36 int shellReturn = gSystem->Exec(
command.c_str());
37 edm::LogInfo(
"MillePedeFileActions") <<
"@SUB=MillePedeFileExtractor::endLuminosityBlock" 38 <<
"Command returns " << shellReturn;
44 if (fileBlobCollection.
isValid()) {
46 edm::LogInfo(
"MillePedeFileActions") <<
"Root file contains " << fileBlobCollection->
size() <<
" FileBlob(s).";
48 for (
const auto& blob : *fileBlobCollection) {
55 char theNumberedOutputFileName[200];
60 <<
"Writing FileBlob file to file " <<
outputDir_ + theNumberedOutputFileName <<
".";
68 edm::LogError(
"MillePedeFileActions") <<
"Error: The root file does not contain any vector of FileBlob.";
80 auto nBytes = gzwrite(
fp, &uncompressedBlob->front(), uncompressedBlob->size());
81 if (nBytes == 0 || nBytes !=
static_cast<decltype(nBytes)
>(uncompressedBlob->size())) {
82 edm::LogError(
"MillePedeFileActions") <<
"Problem while writing FileBlob to gzipped file '" <<
fileName <<
"'.";
97 "Keep the fileDir empty if you want to write to the current " 102 "Base filename of the files that will be created. This must " 104 "a placeholder for an index number in the standard C formatting " 105 "style, like %04d.");
109 "Name of the module that should have generated the blob in the " 110 "root file. Make sure you overwrite this, if you have changed " 111 "this is the configuration of the MillePedeFileConverter.");
113 desc.add<
int>(
"maxNumberOfBinaries", 1000)
115 "Number of binaries to be extracted from the input files. " 116 "Use a negative value to apply no limit.");
118 descriptions.
add(
"millePedeFileExtractor",
desc);
120 "This is the generic cfi file for the " 121 "MillePedeFileExtractor");
T getParameter(std::string const &) const
Log< level::Error, false > LogError
Log< level::Info, false > LogInfo
void setComment(std::string const &value)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::unique_ptr< std::vector< unsigned char > > getUncompressedBlob() const
i didn't want to do two copies ... hope this works.