Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:56:34

0001 #ifndef MillePedeFileConverter_h
0002 #define MillePedeFileConverter_h
0003 
0004 // Original Author:  Broen van Besien
0005 //         Created:  Thu, 19 Mar 2015 18:12:35 GMT
0006 
0007 /*
0008  * This producer will take a given (binary) file and embed it in the output
0009  * edm/root file.
0010  *
0011  * The file is added as a fileblob to a vector of fileblobs that exists on the
0012  * level of the run.
0013  * The operation is performed during the endRunProduce phase.
0014  *
0015  * The file can later be extracted again by the corresponding module
0016  * MillePedeFileExtractor.
0017  *
0018  * For more info about the possible parameters, type:
0019  * edmPluginHelp -p MillePedeFileConverter
0020  */
0021 
0022 #include "FWCore/Framework/interface/Frameworkfwd.h"
0023 #include "FWCore/Framework/interface/one/EDProducer.h"
0024 #include "FWCore/Framework/interface/Event.h"
0025 #include "FWCore/Framework/interface/MakerMacros.h"
0026 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0027 
0028 class MillePedeFileConverter : public edm::one::EDProducer<edm::EndLuminosityBlockProducer> {
0029 public:
0030   explicit MillePedeFileConverter(const edm::ParameterSet&);
0031   ~MillePedeFileConverter() override = default;
0032   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0033 
0034 private:
0035   void produce(edm::Event&, const edm::EventSetup&) override {}
0036   void endLuminosityBlockProduce(edm::LuminosityBlock&, const edm::EventSetup&) final;
0037 
0038   const std::string inputDir_;
0039   const std::string inputFileName_;
0040   const std::string fileBlobLabel_;
0041 };
0042 
0043 // define this as a plug-in
0044 DEFINE_FWK_MODULE(MillePedeFileConverter);
0045 
0046 #endif