#include <RecoRomanPot/RecoFP420/interface/ReconstructerFP420.h>
Public Member Functions | |
virtual void | beginJob () |
virtual void | produce (edm::Event &e, const edm::EventSetup &c) |
ReconstructerFP420 (const edm::ParameterSet &conf) | |
virtual | ~ReconstructerFP420 () |
Private Types | |
typedef std::vector< std::string > | vstring |
Private Attributes | |
edm::ParameterSet | conf_ |
FP420RecoMain * | sFP420RecoMain_ |
vstring | trackerContainers |
int | verbosity |
Definition at line 29 of file ReconstructerFP420.h.
typedef std::vector<std::string> cms::ReconstructerFP420::vstring [private] |
Definition at line 44 of file ReconstructerFP420.h.
cms::ReconstructerFP420::ReconstructerFP420 | ( | const edm::ParameterSet & | conf | ) | [explicit] |
Definition at line 27 of file ReconstructerFP420.cc.
References conf_, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), sFP420RecoMain_, trackerContainers, and verbosity.
00027 :conf_(conf) { 00028 00029 edm::LogInfo ("ReconstructerFP420 ") <<"Enter the FP420 Reco constructer"; 00030 00031 00032 verbosity = conf_.getUntrackedParameter<int>("VerbosityLevel"); 00033 if (verbosity > 0) { 00034 std::cout << "Constructor of ReconstructerFP420" << std::endl; 00035 } 00036 00037 00038 std::string alias ( conf.getParameter<std::string>("@module_label") ); 00039 00040 produces<RecoCollectionFP420>().setBranchAlias( alias ); 00041 00042 trackerContainers.clear(); 00043 trackerContainers = conf.getParameter<std::vector<std::string> >("ROUList"); 00044 00045 00046 // Initialization: 00047 sFP420RecoMain_ = new FP420RecoMain(conf_); 00048 00049 }
cms::ReconstructerFP420::~ReconstructerFP420 | ( | ) | [virtual] |
Definition at line 52 of file ReconstructerFP420.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), sFP420RecoMain_, and verbosity.
00052 { 00053 if (verbosity > 0) { 00054 std::cout << "ReconstructerFP420:delete FP420RecoMain" << std::endl; 00055 } 00056 delete sFP420RecoMain_; 00057 }
Definition at line 60 of file ReconstructerFP420.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), and verbosity.
00060 { 00061 if (verbosity > 0) { 00062 std::cout << "ReconstructerFP420:BeginJob method " << std::endl; 00063 } 00064 }
void cms::ReconstructerFP420::produce | ( | edm::Event & | e, | |
const edm::EventSetup & | c | |||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 67 of file ReconstructerFP420.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), edm::Event::getByLabel(), iggi_31X_cfg::input, edm::Event::put(), FP420RecoMain::run(), sFP420RecoMain_, std, trackerContainers, and verbosity.
00068 { 00069 // beginJob; 00070 // be lazy and include the appropriate namespaces 00071 using namespace edm; 00072 using namespace std; 00073 00074 // Get input 00075 //A 00076 // edm::Handle<ClusterCollectionFP420> icf_simhit; 00077 /* 00078 Handle<ClusterCollectionFP420> cf_simhit; 00079 std::vector<const ClusterCollectionFP420 *> cf_simhitvec; 00080 for(uint32_t i = 0; i< trackerContainers.size();i++){ 00081 iEvent.getByLabel( trackerContainers[i], cf_simhit); 00082 cf_simhitvec.push_back(cf_simhit.product()); } 00083 std::auto_ptr<ClusterCollectionFP420 > input(new DigiCollectionFP420(cf_simhitvec)); 00084 */ 00085 00086 //B 00087 00088 Handle<TrackCollectionFP420> input; 00089 try{ 00090 iEvent.getByLabel( trackerContainers[0] , input); 00091 } catch(...){;} 00092 00093 00094 00095 00096 // Step C: create empty output collection 00097 std::auto_ptr<RecoCollectionFP420> toutput(new RecoCollectionFP420); 00098 00099 00100 00101 // put zero to container info from the beginning (important! because not any detID is updated with coming of new event !!!!!! 00102 // clean info of container from previous event 00103 00104 std::vector<RecoFP420> collector; 00105 collector.clear(); 00106 RecoCollectionFP420::Range inputRange; 00107 inputRange.first = collector.begin(); 00108 inputRange.second = collector.end(); 00109 00110 unsigned int detID = 0; 00111 toutput->putclear(inputRange,detID); 00112 00113 unsigned int StID = 1; 00114 toutput->putclear(inputRange,StID); 00115 StID = 2; 00116 toutput->putclear(inputRange,StID); 00117 00118 00119 // !!!!!! 00120 // if we want to keep Reco container/Collection for one event ---> uncomment the line below and vice versa 00121 toutput->clear(); //container_.clear() --> start from the beginning of the container 00122 00123 // RUN now: !!!!!! 00124 // startFP420RecoMain_.run(input, toutput); 00125 sFP420RecoMain_->run(input, toutput); 00126 // cout <<"======= ReconstructerFP420: end of produce " << endl; 00127 00128 // Step D: write output to file 00129 if (verbosity > 0) { 00130 std::cout << "ReconstructerFP420: iEvent.put(toutput)" << std::endl; 00131 } 00132 iEvent.put(toutput); 00133 if (verbosity > 0) { 00134 std::cout << "ReconstructerFP420: iEvent.put(toutput) DONE" << std::endl; 00135 } 00136 }//produce
Definition at line 48 of file ReconstructerFP420.h.
Referenced by produce(), ReconstructerFP420(), and ~ReconstructerFP420().
Definition at line 46 of file ReconstructerFP420.h.
Referenced by produce(), and ReconstructerFP420().
int cms::ReconstructerFP420::verbosity [private] |
Definition at line 49 of file ReconstructerFP420.h.
Referenced by beginJob(), produce(), ReconstructerFP420(), and ~ReconstructerFP420().