Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:36

0001 #ifndef CFWriter_h
0002 #define CFWriter_h
0003 
0004 /** \class CFWriter
0005  *
0006  * CFWriter is the EDProducer subclass 
0007  * It copy the transient objects CrossingFrame
0008  * into the persistent objects PCrossingFrame and
0009  * write them into the root file 
0010  *
0011  * \author Emilia Becheva, LLR Palaiseau
0012  *
0013  * \version   1st Version April 2009
0014  *
0015  ************************************************************/
0016 
0017 #include "FWCore/Framework/interface/stream/EDProducer.h"
0018 #include "FWCore/Framework/interface/Event.h"
0019 #include "FWCore/Framework/interface/EventSetup.h"
0020 
0021 #include "DataFormats/Common/interface/Handle.h"
0022 
0023 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0024 #include "FWCore/Utilities/interface/InputTag.h"
0025 
0026 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0027 #include "SimDataFormats/CrossingFrame/interface/PCrossingFrame.h"
0028 
0029 namespace edm {
0030   class CFWriter : public edm::stream::EDProducer<> {
0031   public:
0032     explicit CFWriter(const edm::ParameterSet& conf);
0033 
0034     ~CFWriter() override;
0035 
0036     //void beginJob() {}
0037     void beginRun(const edm::Run& run, const edm::EventSetup& es) override;
0038     void produce(edm::Event& e, const edm::EventSetup& c) override;
0039     virtual void put(edm::Event& e) { ; }
0040 
0041   private:
0042     inline PCrossingFrame<SimTrack> fctTest(const PCrossingFrame<SimTrack>& p) {
0043       return p;
0044       std::cout << " call PCrossingFrame object" << std::endl;
0045     };
0046 
0047     virtual void branchesActivate(const std::string& friendlyName,
0048                                   std::string subdet,
0049                                   InputTag& tag,
0050                                   std::string& label);
0051     std::vector<std::string> wantedBranches_;
0052     bool useCurrentProcessOnly_;
0053     bool flagSimTrack_;
0054     bool flagSimVertex_;
0055     bool flagHepMCProduct_;
0056     bool flagPCaloHit_;
0057     bool flagPSimHit_;
0058 
0059     typedef std::vector<edm::HepMCProduct> HepMCProductContainer;
0060     std::vector<std::string> labSimHit;
0061     std::vector<std::string> labCaloHit;
0062   };
0063 }  // namespace edm
0064 #endif