17 : outputDir_(iConfig.getParameter<
std::
string>(
"fileDir")),
18 outputFileName_(iConfig.getParameter<
std::
string>(
"outputBinaryFile")),
19 maxNumberOfBinaries_(iConfig.getParameter<
int>(
"maxNumberOfBinaries")) {
34 int shellReturn = gSystem->Exec(
command.c_str());
35 edm::LogInfo(
"MillePedeFileActions") <<
"@SUB=MillePedeFileExtractor::endLuminosityBlock" 36 <<
"Command returns " << shellReturn;
48 if (fileBlobCollection.
isValid()) {
50 edm::LogInfo(
"MillePedeFileActions") <<
"Root file contains " << fileBlobCollection->
size() <<
" FileBlob(s).";
52 for (
const auto& blob : *fileBlobCollection) {
59 char theNumberedOutputFileName[200];
64 <<
"Writing FileBlob file to file " <<
outputDir_ + theNumberedOutputFileName <<
".";
73 <<
"Error: The root file does not contain any vector of FileBlob under the label " <<
fileBlobInputTag_.
encode()
86 auto nBytes = gzwrite(
fp, &uncompressedBlob->front(), uncompressedBlob->size());
87 if (nBytes == 0 || nBytes !=
static_cast<decltype(nBytes)
>(uncompressedBlob->size())) {
88 edm::LogError(
"MillePedeFileActions") <<
"Problem while writing FileBlob to gzipped file '" <<
fileName <<
"'.";
103 "Keep the fileDir empty if you want to write to the current " 108 "Base filename of the files that will be created. This must " 110 "a placeholder for an index number in the standard C formatting " 111 "style, like %04d.");
115 "Name of the module that should have generated the blob in the " 116 "root file. Make sure you overwrite this, if you have changed " 117 "this is the configuration of the MillePedeFileConverter.");
119 desc.add<
int>(
"maxNumberOfBinaries", 1000)
121 "Number of binaries to be extracted from the input files. " 122 "Use a negative value to apply no limit.");
124 descriptions.
add(
"millePedeFileExtractor",
desc);
126 "This is the generic cfi file for the " 127 "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.