1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#ifndef MillePedeFileConverter_h
#define MillePedeFileConverter_h
// Original Author: Broen van Besien
// Created: Thu, 19 Mar 2015 18:12:35 GMT
/*
* This producer will take a given (binary) file and embed it in the output
* edm/root file.
*
* The file is added as a fileblob to a vector of fileblobs that exists on the
* level of the run.
* The operation is performed during the endRunProduce phase.
*
* The file can later be extracted again by the corresponding module
* MillePedeFileExtractor.
*
* For more info about the possible parameters, type:
* edmPluginHelp -p MillePedeFileConverter
*/
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/one/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
class MillePedeFileConverter : public edm::one::EDProducer<edm::EndLuminosityBlockProducer> {
public:
explicit MillePedeFileConverter(const edm::ParameterSet&);
~MillePedeFileConverter() override = default;
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
private:
void produce(edm::Event&, const edm::EventSetup&) override {}
void endLuminosityBlockProduce(edm::LuminosityBlock&, const edm::EventSetup&) final;
const std::string inputDir_;
const std::string inputFileName_;
const std::string fileBlobLabel_;
};
// define this as a plug-in
DEFINE_FWK_MODULE(MillePedeFileConverter);
#endif
|