#include <iostream>
#include "CondFormats/EcalObjects/interface/EcalIntercalibConstants.h"
#include "CondTools/Ecal/interface/EcalIntercalibConstantsXMLTranslator.h"
#include "CondTools/Ecal/interface/EcalCondHeader.h"
#include "DataFormats/EcalDetId/interface/EBDetId.h"
#include "DataFormats/EcalDetId/interface/EEDetId.h"
#include <string>
#include <sstream>
#include <fstream>
Go to the source code of this file.
Functions | |
int | main (int argc, char *argv[]) |
void | usage () |
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 23 of file array2xmlEB.cc.
References trackerHits::c, gather_cfg::cout, cmsRelvalreport::exit, h, UserOptions_cff::idx, recoMuon::in, EEDetId::kSizeForDenseIndexing, EBDetId::unhashIndex(), EEDetId::unhashIndex(), usage(), EEDetId::validHashIndex(), and EcalFloatCondObjectContainerXMLTranslator::writeXML().
{ if (argc!=3) { usage(); exit(0); } string arrayfilename(argv[1]); string xmlfilename(argv[2]); fstream arrayfile(arrayfilename.c_str(),ios::in); EcalIntercalibConstants rcd ; float c=0; int idx=0; while (arrayfile>>c){ uint32_t id=EBDetId::unhashIndex(idx); rcd[id]=c; ++idx; } cout << idx << endl; for (int cellid = 0; cellid < EEDetId::kSizeForDenseIndexing; ++cellid){// loop on EB cells if (EEDetId::validHashIndex(cellid)){ uint32_t rawid = EEDetId::unhashIndex(cellid); rcd[rawid]=0.0; } // if } // write new format EcalCondHeader h; EcalIntercalibConstantsXMLTranslator::writeXML(xmlfilename,h,rcd); }
void usage | ( | ) |
Definition at line 14 of file array2xmlEB.cc.
References gather_cfg::cout.
Referenced by main(), and stor::detail::memoryUsage().