49 virtual void endJob()
override ;
62 std::map< uint32_t, uint32_t >
theMap;
129 uint32_t nEntries = m_inputTree->GetEntries();
131 for (uint32_t
i = 0;
i < nEntries; ++
i){
132 m_inputTree->GetEntry(
i);
133 std::map< uint32_t, uint32_t >::const_iterator it =
theMap.find(
rawid_i);
154 m_outputTFile->Close();
162 if (!myfile.is_open())
163 throw cms::Exception(
"FileAccess") <<
"Unable to open input text file";
169 while( !myfile.eof() && myfile.good() ){
171 myfile >> oldid >> newid;
174 std::pair< uint32_t, uint32_t > pairType;
175 if (
m_conversionType ==
"OldtoNew") {pairType.first = oldid; pairType.second = newid;}
176 if (
m_conversionType ==
"NewtoOld") {pairType.first = newid; pairType.second = oldid;}
179 theMap.insert( pairType );
181 if (myfile.fail())
break;
T getUntrackedParameter(std::string const &, T const &) const
std::string m_conversionType
#define DEFINE_FWK_MODULE(type)
virtual void beginJob() override
U second(std::pair< T, U > const &p)
virtual void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
Tracker_OldtoNewConverter(const edm::ParameterSet &)
std::map< uint32_t, uint32_t > theMap
virtual void endJob() override
~Tracker_OldtoNewConverter()