#include <stdlib.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <map>
#include <algorithm>
#include <string>
#include "DataFormats/HcalDetId/interface/HcalDetId.h"
#include "DataFormats/HcalDetId/interface/HcalTrigTowerDetId.h"
#include "DataFormats/HcalDetId/interface/HcalElectronicsId.h"
#include "Geometry/CaloTopology/interface/HcalTopology.h"
#include "CondCore/IOVService/interface/IOV.h"
#include "CalibCalorimetry/HcalAlgos/interface/HcalDbHardcode.h"
#include "CalibCalorimetry/HcalAlgos/interface/HcalDbASCIIIO.h"
#include "CondTools/Hcal/interface/HcalDbXml.h"
#include "CondTools/Hcal/interface/HcalDbOnline.h"
#include "CondTools/Hcal/interface/HcalDbTool.h"
#include "CondFormats/HcalObjects/interface/HcalPedestals.h"
#include "CondFormats/HcalObjects/interface/HcalPedestalWidths.h"
#include "CondFormats/HcalObjects/interface/HcalGains.h"
#include "CondFormats/HcalObjects/interface/HcalGainWidths.h"
#include "CondFormats/HcalObjects/interface/HcalElectronicsMap.h"
#include "CondFormats/HcalObjects/interface/HcalChannelQuality.h"
#include "CondFormats/HcalObjects/interface/HcalQIEData.h"
#include "CondFormats/HcalObjects/interface/HcalCalibrationQIEData.h"
#include "FWCore/MessageService/interface/MessageServicePresence.h"
Go to the source code of this file.
Classes | |
class | Args |
Typedefs | |
typedef std::map< IOVRun, std::string > | IOVCollection |
typedef HcalDbTool::IOVRun | IOVRun |
Functions | |
bool | asciiFile (const std::string fParam) |
template<class T> | |
bool | copyObject (T *fObject, const std::string &fInput, const std::string &fInputTag, HcalDbTool::IOVRun fInputRun, const std::string &fOutput, const std::string &fOutputTag, HcalDbTool::IOVRun fOutputRun, bool fAppend, unsigned long long fIovgmtbegin, unsigned long long fIovgmtend, unsigned fNread, unsigned fNwrite, unsigned fNtrace, bool fVerbose, const char *fInputCatalog, const char *fOutputCatalog, bool fXmlAuth) |
bool | dbFile (const std::string fParam) |
bool | defaultsFile (const std::string fParam) |
void | fillDefaults (HcalCalibrationQIEData *&fObject) |
void | fillDefaults (HcalQIEData *&fObject) |
void | fillDefaults (HcalElectronicsMap *&fMap) |
void | fillDefaults (HcalGainWidths *&fGains) |
void | fillDefaults (HcalGains *&fGains) |
void | fillDefaults (HcalPedestalWidths *&fPedestals) |
void | fillDefaults (HcalPedestals *&fPedestals) |
int | main (int argn, char *argv[]) |
bool | occiFile (const std::string fParam) |
bool | onlineFile (const std::string fParam) |
void | printHelp (const Args &args) |
template<class T> | |
std::vector< HcalDetId > | undefinedCells (const T &fData) |
bool | xmlFile (const std::string fParam) |
typedef std::map<IOVRun,std::string> IOVCollection |
Definition at line 43 of file hcalCalibrationsCopy.cc.
typedef HcalDbTool::IOVRun IOVRun |
Definition at line 42 of file hcalCalibrationsCopy.cc.
bool asciiFile | ( | const std::string | fParam | ) |
Definition at line 210 of file hcalCalibrationsCopy.cc.
00210 { 00211 return fParam.find (':') == std::string::npos && std::string (fParam, fParam.length () - 4) == ".txt"; 00212 }
bool copyObject | ( | T * | fObject, | |
const std::string & | fInput, | |||
const std::string & | fInputTag, | |||
HcalDbTool::IOVRun | fInputRun, | |||
const std::string & | fOutput, | |||
const std::string & | fOutputTag, | |||
HcalDbTool::IOVRun | fOutputRun, | |||
bool | fAppend, | |||
unsigned long long | fIovgmtbegin, | |||
unsigned long long | fIovgmtend, | |||
unsigned | fNread, | |||
unsigned | fNwrite, | |||
unsigned | fNtrace, | |||
bool | fVerbose, | |||
const char * | fInputCatalog, | |||
const char * | fOutputCatalog, | |||
bool | fXmlAuth | |||
) | [inline] |
Definition at line 232 of file hcalCalibrationsCopy.cc.
References asciiFile(), TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, dbFile(), defaultsFile(), HcalDbXml::dumpObject(), HcalDbASCIIIO::dumpObject(), lat::endl(), fillDefaults(), first, HcalDbOnline::getIOVs(), HcalDbASCIIIO::getObject(), HcalDbOnline::getObject(), i, cond::IOV::iov, onlineFile(), HLT_VtxMuL3::result, edm::second(), t, and xmlFile().
Referenced by main().
00240 { 00241 typedef std::vector <std::pair<HcalDbTool::IOVRun, T*> > Objects; 00242 00243 bool result = false; 00244 time_t t0 = time (0); 00245 time_t t1 = t0; 00246 unsigned traceCounter = 0; 00247 HcalDbTool* poolDb = 0; 00248 HcalDbOnline* onlineDb = 0; 00249 // HcalDbToolOCCI* occiDb = 0; 00250 Objects allInstances; 00251 while (traceCounter < fNread) { 00252 delete fObject; 00253 // get input 00254 if (defaultsFile (fInput)) { 00255 if (!traceCounter) std::cout << "USE INPUT: defaults" << std::endl; 00256 fillDefaults (fObject); 00257 result = true; 00258 } 00259 else if (asciiFile (fInput)) { 00260 if (!traceCounter) std::cout << "USE INPUT: ASCII: " << fInput << std::endl; 00261 std::ifstream inStream (fInput.c_str ()); 00262 fObject = new T; 00263 HcalDbASCIIIO::getObject (inStream, fObject); 00264 result = true; 00265 } 00266 else if (dbFile (fInput)) { 00267 if (!traceCounter) std::cout << "USE INPUT: Pool: " << fInput << "/" << fInputRun << std::endl; 00268 if (!poolDb) poolDb = new HcalDbTool (fInput, fVerbose, fXmlAuth, fInputCatalog); 00269 if (fInputRun > 0) { 00270 fObject = new T; 00271 result = poolDb->getObject (fObject, fInputTag, fInputRun); 00272 } 00273 else { // copy all instances 00274 std::cout << "Copy all instances... " << std::endl; 00275 cond::IOV iov; 00276 if (poolDb->getObject (&iov, fInputTag)) { 00277 IOVCollection::const_iterator iovi = iov.iov.begin (); 00278 for (; iovi != iov.iov.end (); iovi++) { 00279 IOVRun iovMax = iovi->first; 00280 if (fVerbose) { 00281 std::cout << "fetching object for run " << iovMax << std::endl; 00282 } 00283 T* object = new T; 00284 if (!poolDb->getObject (object, fInputTag, iovMax)) { 00285 std::cerr << "Failed to fetch object..." << std::endl; 00286 result = false; 00287 delete object; 00288 break; 00289 } 00290 allInstances.push_back (std::make_pair (iovMax, object)); 00291 std::cerr << '.'; 00292 } 00293 if (iovi == iov.iov.end ()) result = true; 00294 } 00295 else { 00296 std::cerr << "can not find IOV for tag " << fInputTag << std::endl; 00297 result = false; 00298 } 00299 } 00300 } 00301 else if (onlineFile (fInput)) { 00302 if (!traceCounter) std::cout << "USE INPUT: Online: " << fInput << std::endl; 00303 if (!onlineDb) onlineDb = new HcalDbOnline (fInput, fVerbose); 00304 if (fInputRun > 0) { 00305 fObject = new T; 00306 result = onlineDb->getObject (fObject, fInputTag, fInputRun); 00307 } 00308 else { // copy all instances 00309 std::cout << "Copy all instances... " << std::endl; 00310 std::vector<HcalDbOnline::IntervalOV> iovs = onlineDb->getIOVs (fInputTag); 00311 for (unsigned i = 0; i < iovs.size ();i++) { 00312 IOVRun iovMin = iovs[i].first; 00313 if (fVerbose) { 00314 std::cout << "fetching object for run " << iovMin << std::endl; 00315 } 00316 T* object = new T; 00317 if (!onlineDb->getObject (object, fInputTag, iovMin)) { 00318 std::cerr << "Failed to fetch object..." << std::endl; 00319 result = false; 00320 delete object; 00321 break; 00322 } 00323 allInstances.push_back (std::make_pair (iovMin, object)); 00324 std::cerr << '.'; 00325 } 00326 result = true; 00327 } 00328 } 00329 // else if (occiFile (fInput)) { 00330 // if (!traceCounter) std::cout << "USE INPUT: OCCI" << std::endl; 00331 // if (!occiDb) occiDb = new HcalDbPoolOCCI (fInput); 00332 // fObject = new T; 00333 // result = occiDb->getObject (fObject, fInputTag, fInputRun); 00334 // } 00335 traceCounter++; 00336 fInputRun++; 00337 if (fNtrace && !(traceCounter % fNtrace)) { 00338 time_t t = time (0); 00339 std::cout << "read transaction: " << traceCounter << " time: " << t - t0 << " dtime: " << t - t1 << std::endl; 00340 t1 = t; 00341 } 00342 } 00343 delete poolDb; 00344 delete onlineDb; 00345 poolDb = 0; 00346 onlineDb = 0; 00347 if (result) { 00348 t0 = time (0); 00349 t1 = t0; 00350 traceCounter = 0; 00351 T* object = 0; 00352 while (traceCounter < fNwrite) { 00353 delete object; 00354 object = fObject ? new T (*fObject) : 0; // copy original object 00355 if (asciiFile (fOutput)) { 00356 if (!traceCounter) std::cout << "USE OUTPUT: ASCII: " << fOutput << std::endl; 00357 if (fObject && allInstances.empty ()) { 00358 std::ofstream outStream (fOutput.c_str ()); 00359 HcalDbASCIIIO::dumpObject (outStream, *object); 00360 } 00361 else { 00362 for (unsigned i = 0; i < allInstances.size (); i++) { 00363 if (fVerbose) { 00364 std::cout << "Storing object for run " << allInstances[i].first << std::endl; 00365 } 00366 std::ostringstream outName; 00367 unsigned ipos = fOutput.find (".txt"); 00368 if (ipos == std::string::npos) { 00369 outName << fOutput << "_" << allInstances[i].first; 00370 } 00371 else { 00372 outName << std::string (fOutput, 0, ipos) << "_" << allInstances[i].first << ".txt"; 00373 } 00374 std::ofstream outStream (outName.str().c_str ()); 00375 object = allInstances[i].second; 00376 HcalDbASCIIIO::dumpObject (outStream, *object); 00377 delete object; 00378 allInstances[i].second = 0; 00379 std::cerr << '.'; 00380 } 00381 } 00382 } 00383 else if (xmlFile (fOutput)) { 00384 if (!traceCounter) std::cout << "USE OUTPUT: XML: " << fOutput << std::endl; 00385 std::ofstream outStream (fOutput.c_str ()); 00386 HcalDbXml::dumpObject (outStream, fOutputRun, fIovgmtbegin, fIovgmtend, fOutputTag, *object); 00387 outStream.close (); 00388 std::cout << "close file\n"; 00389 } 00390 else if (dbFile (fOutput)) { //POOL 00391 if (!traceCounter) std::cout << "USE OUTPUT: Pool: " << fOutput << '/' << fOutputRun << std::endl; 00392 if (!poolDb) poolDb = new HcalDbTool (fOutput, fVerbose, fXmlAuth, fOutputCatalog); 00393 if (fOutputRun > 0) { 00394 poolDb->putObject (object, fOutputTag, fOutputRun, fAppend); 00395 object = 0; // owned by POOL 00396 } 00397 else { 00398 for (unsigned i = 0; i < allInstances.size (); i++) { 00399 if (fVerbose) { 00400 std::cout << "Storing object for run " << allInstances[i].first << std::endl; 00401 } 00402 poolDb->putObject (allInstances[i].second, fOutputTag, allInstances[i].first, fAppend); 00403 allInstances[i].second = 0; 00404 std::cerr << '.'; 00405 } 00406 } 00407 } 00408 traceCounter++; 00409 fOutputRun++; 00410 if (fNtrace && !(traceCounter % fNtrace)) { 00411 time_t t = time (0); 00412 std::cout << "write transaction: " << traceCounter << " time: " << t - t0 << " dtime: " << t - t1 << std::endl; 00413 t1 = t; 00414 } 00415 } 00416 delete poolDb; 00417 poolDb = 0; 00418 } 00419 return result; 00420 }
bool dbFile | ( | const std::string | fParam | ) |
bool defaultsFile | ( | const std::string | fParam | ) |
void fillDefaults | ( | HcalCalibrationQIEData *& | fObject | ) |
Definition at line 173 of file hcalCalibrationsCopy.cc.
References HcalCalibrationQIEData::addCoder(), eta, HcalDbHardcode::makeCalibrationQIECoder(), phi, HcalCalibrationQIEData::sort(), and HcalTopology::valid().
00173 { 00174 if (!fObject) { 00175 fObject = new HcalCalibrationQIEData; 00176 fObject->sort (); 00177 } 00178 HcalTopology topology; 00179 for (int eta = -63; eta < 64; eta++) { 00180 for (int phi = 0; phi < 128; phi++) { 00181 for (int depth = 1; depth < 5; depth++) { 00182 for (int det = 1; det < 5; det++) { 00183 HcalDetId cell ((HcalSubdetector) det, eta, phi, depth); 00184 if (topology.valid(cell)) { 00185 HcalCalibrationQIECoder item = HcalDbHardcode::makeCalibrationQIECoder (cell); 00186 fObject->addCoder (item); 00187 } 00188 } 00189 } 00190 } 00191 } 00192 fObject->sort (); 00193 }
void fillDefaults | ( | HcalQIEData *& | fObject | ) |
Definition at line 151 of file hcalCalibrationsCopy.cc.
References HcalQIEData::addCoder(), eta, HcalDbHardcode::makeQIECoder(), phi, HcalQIEData::sort(), and HcalTopology::valid().
00151 { 00152 if (!fObject) { 00153 fObject = new HcalQIEData; 00154 fObject->sort (); 00155 } 00156 HcalTopology topology; 00157 for (int eta = -63; eta < 64; eta++) { 00158 for (int phi = 0; phi < 128; phi++) { 00159 for (int depth = 1; depth < 5; depth++) { 00160 for (int det = 1; det < 5; det++) { 00161 HcalDetId cell ((HcalSubdetector) det, eta, phi, depth); 00162 if (topology.valid(cell)) { 00163 HcalQIECoder item = HcalDbHardcode::makeQIECoder (cell); 00164 fObject->addCoder (item); 00165 } 00166 } 00167 } 00168 } 00169 } 00170 fObject->sort (); 00171 }
void fillDefaults | ( | HcalElectronicsMap *& | fMap | ) |
Definition at line 143 of file hcalCalibrationsCopy.cc.
References TestMuL1L2Filter_cff::cerr, lat::endl(), and HcalElectronicsMap::sort().
00143 { 00144 if (!fMap) { 00145 fMap = new HcalElectronicsMap; 00146 fMap->sort (); 00147 } 00148 std::cerr << "Warning: fillDefaults (HcalElectronicsMap* fMap) is not implemented. Ignore." << std::endl; 00149 }
void fillDefaults | ( | HcalGainWidths *& | fGains | ) |
Definition at line 130 of file hcalCalibrationsCopy.cc.
References HcalGainWidth::getValues(), HcalDbHardcode::makeGainWidth(), and undefinedCells().
00130 { 00131 if (!fGains) { 00132 fGains = new HcalGainWidths; 00133 fGains->sort (); 00134 } 00135 std::vector<HcalDetId> cells = undefinedCells (*fGains); 00136 for (std::vector <HcalDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) { 00137 HcalGainWidth item = HcalDbHardcode::makeGainWidth (*cell); 00138 fGains->addValue (*cell, item.getValues ()); 00139 } 00140 fGains->sort (); 00141 }
Definition at line 117 of file hcalCalibrationsCopy.cc.
References HcalGain::getValues(), HcalDbHardcode::makeGain(), and undefinedCells().
00117 { 00118 if (!fGains) { 00119 fGains = new HcalGains; 00120 fGains->sort (); 00121 } 00122 std::vector<HcalDetId> cells = undefinedCells (*fGains); 00123 for (std::vector <HcalDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) { 00124 HcalGain item = HcalDbHardcode::makeGain (*cell, false); // do not smear 00125 fGains->addValue (*cell, item.getValues ()); 00126 } 00127 fGains->sort (); 00128 }
void fillDefaults | ( | HcalPedestalWidths *& | fPedestals | ) |
Definition at line 104 of file hcalCalibrationsCopy.cc.
References HcalDbHardcode::makePedestalWidth(), and undefinedCells().
00104 { 00105 if (!fPedestals) { 00106 fPedestals = new HcalPedestalWidths; 00107 fPedestals->sort (); 00108 } 00109 std::vector<HcalDetId> cells = undefinedCells (*fPedestals); 00110 for (std::vector <HcalDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) { 00111 HcalPedestalWidth item = HcalDbHardcode::makePedestalWidth (*cell); 00112 fPedestals->setWidth (item); 00113 } 00114 fPedestals->sort (); 00115 }
void fillDefaults | ( | HcalPedestals *& | fPedestals | ) |
Definition at line 91 of file hcalCalibrationsCopy.cc.
References HcalPedestal::getValues(), HcalDbHardcode::makePedestal(), and undefinedCells().
Referenced by copyObject(), and main().
00091 { 00092 if (!fPedestals) { 00093 fPedestals = new HcalPedestals; 00094 fPedestals->sort (); 00095 } 00096 std::vector<HcalDetId> cells = undefinedCells (*fPedestals); 00097 for (std::vector <HcalDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) { 00098 HcalPedestal item = HcalDbHardcode::makePedestal (*cell, false); // do not smear 00099 fPedestals->addValue (*cell, item.getValues ()); 00100 } 00101 fPedestals->sort (); 00102 }
Definition at line 422 of file hcalCalibrationsCopy.cc.
References bitset_utilities::append(), Args::arguments(), copyObject(), Args::defineOption(), Args::defineParameter(), Args::getParameter(), iggi_31X_cfg::input, Args::optionIsSet(), output(), Args::parse(), printHelp(), and GsfMatrixTools::trace().
00422 { 00423 // start message service 00424 edm::service::MessageServicePresence my_message_service; 00425 00426 Args args; 00427 args.defineParameter ("-input", "DB connection string, POOL format, or .txt file, or defaults"); 00428 args.defineParameter ("-output", "DB connection string, POOL format, or .txt, or .xml file"); 00429 args.defineParameter ("-inputrun", "run # for which constands should be made"); 00430 args.defineParameter ("-inputtag", "tag for the input constants set"); 00431 args.defineParameter ("-inputcatalog", "catalog for POOL DB <$POOL_CATALOG>"); 00432 args.defineParameter ("-outputrun", "run # for which constands should be dumped"); 00433 args.defineParameter ("-outputtag", "tag for the output constants set"); 00434 args.defineParameter ("-outputcatalog", "catalog for POOL DB <$POOL_CATALOG>"); 00435 args.defineParameter ("-iovgmtbegin", "start time for online IOV <outputrun>"); 00436 args.defineParameter ("-iovgmtend", "end time for online IOV <0>"); 00437 args.defineParameter ("-nread", "repeat input that many times with increasing run# <1>"); 00438 args.defineParameter ("-nwrite", "repeat output that many times with increasing run# <1>"); 00439 args.defineParameter ("-trace", "trace time every that many operations <false>"); 00440 args.defineOption ("-help", "this help"); 00441 args.defineOption ("-online", "interpret input DB as an online DB"); 00442 args.defineOption ("-xmlauth", "use XML authorization <false>"); 00443 args.defineOption ("-append", "Strip previous IOV, make this IOV open (POOL DB) <false>"); 00444 args.defineOption ("-verbose", "makes program verbose <false>"); 00445 00446 args.parse (argn, argv); 00447 00448 std::vector<std::string> arguments = args.arguments (); 00449 00450 if (arguments.size () < 1 || args.optionIsSet ("-help")) { 00451 printHelp (args); 00452 return -1; 00453 } 00454 00455 std::string input = args.getParameter ("-input"); 00456 std::string output = args.getParameter ("-output"); 00457 00458 HcalDbTool::IOVRun inputRun = args.getParameter ("-inputrun").empty () ? 0 : strtoull (args.getParameter ("-inputrun").c_str (), 0, 0); 00459 HcalDbTool::IOVRun outputRun = args.getParameter ("-outputrun").empty () ? 0 : strtoll (args.getParameter ("-outputrun").c_str (), 0, 0); 00460 std::string inputTag = args.getParameter ("-inputtag"); 00461 std::string outputTag = args.getParameter ("-outputtag"); 00462 00463 unsigned long long iovgmtbegin = args.getParameter ("-iovgmtbegin").empty () ? outputRun : strtoull (args.getParameter ("-iovgmtbegin").c_str (), 0, 0); 00464 unsigned long long iovgmtend = args.getParameter ("-iovgmtend").empty () ? 0 : strtoull (args.getParameter ("-iovgmtend").c_str (), 0, 0); 00465 00466 unsigned nread = args.getParameter ("-nread").empty () ? 1 : atoi (args.getParameter ("-nread").c_str ()); 00467 unsigned nwrite = args.getParameter ("-nwrite").empty () ? 1 : atoi (args.getParameter ("-nwrite").c_str ()); 00468 unsigned trace = args.getParameter ("-trace").empty () ? 0 : atoi (args.getParameter ("-trace").c_str ()); 00469 00470 const char* inputCatalog = args.getParameter ("-inputcatalog").empty () ? 0 : args.getParameter ("-inputcatalog").c_str(); 00471 const char* outputCatalog = args.getParameter ("-outputcatalog").empty () ? 0 : args.getParameter ("-outputcatalog").c_str(); 00472 00473 bool xmlAuth = args.optionIsSet ("-xmlauth"); 00474 bool append = args.optionIsSet ("-append"); 00475 00476 bool verbose = args.optionIsSet ("-verbose"); 00477 00478 00479 std::string what = arguments [0]; 00480 00481 if (what == "pedestals") { 00482 HcalPedestals* object = 0; 00483 copyObject (object, input, inputTag, inputRun, output, outputTag, outputRun, append, iovgmtbegin, iovgmtend, nread, nwrite, trace, verbose, inputCatalog, outputCatalog, xmlAuth); 00484 } 00485 else if (what == "gains") { 00486 HcalGains* object = 0; 00487 copyObject (object, input, inputTag, inputRun, output, outputTag, outputRun, append, iovgmtbegin, iovgmtend, nread, nwrite, trace, verbose, inputCatalog, outputCatalog, xmlAuth); 00488 } 00489 else if (what == "pwidths") { 00490 HcalPedestalWidths* object = 0; 00491 copyObject (object, input, inputTag, inputRun, output, outputTag, outputRun, append, iovgmtbegin, iovgmtend, nread, nwrite, trace, verbose, inputCatalog, outputCatalog, xmlAuth); 00492 } 00493 else if (what == "gwidths") { 00494 HcalGainWidths* object = 0; 00495 copyObject (object, input, inputTag, inputRun, output, outputTag, outputRun, append, iovgmtbegin, iovgmtend, nread, nwrite, trace, verbose, inputCatalog, outputCatalog, xmlAuth); 00496 } 00497 else if (what == "emap") { 00498 HcalElectronicsMap* object = 0; 00499 copyObject (object, input, inputTag, inputRun, output, outputTag, outputRun, append, iovgmtbegin, iovgmtend, nread, nwrite, trace, verbose, inputCatalog, outputCatalog, xmlAuth); 00500 } 00501 else if (what == "qie") { 00502 HcalQIEData* object = 0; 00503 copyObject (object, input, inputTag, inputRun, output, outputTag, outputRun, append, iovgmtbegin, iovgmtend, nread, nwrite, trace, verbose, inputCatalog, outputCatalog, xmlAuth); 00504 } 00505 else if (what == "calibqie") { 00506 HcalCalibrationQIEData* object = 0; 00507 copyObject (object, input, inputTag, inputRun, output, outputTag, outputRun, append, iovgmtbegin, iovgmtend, nread, nwrite, trace, verbose, inputCatalog, outputCatalog, xmlAuth); 00508 } 00509 }
bool occiFile | ( | const std::string | fParam | ) |
Definition at line 222 of file hcalCalibrationsCopy.cc.
00222 { 00223 return fParam.find ("cms_val_lb.cern.ch") != std::string::npos && 00224 fParam.find (':') == std::string::npos; 00225 }
bool onlineFile | ( | const std::string | fParam | ) |
Definition at line 227 of file hcalCalibrationsCopy.cc.
Referenced by copyObject(), printRuns(), and printTags().
00227 { 00228 return fParam.find ('@') != std::string::npos && 00229 fParam.find ("cms_val_lb") == std::string::npos; 00230 }
Definition at line 195 of file hcalCalibrationsCopy.cc.
References Args::command(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), and Args::printOptionsHelp().
Referenced by main().
00195 { 00196 char buffer [1024]; 00197 std::cout << "Tool to manipulate by Hcal Calibrations" << std::endl; 00198 std::cout << " feedback -> ratnikov@fnal.gov" << std::endl; 00199 std::cout << "Use:" << std::endl; 00200 sprintf (buffer, " %s <what> <options> <parameters>\n", args.command ().c_str()); 00201 std::cout << buffer; 00202 std::cout << " where <what> is: \n pedestals\n gains\n pwidths\n gwidths\n emap\n qie\n calibqie" << std::endl; 00203 args.printOptionsHelp (); 00204 }
std::vector<HcalDetId> undefinedCells | ( | const T & | fData | ) | [inline] |
Definition at line 68 of file hcalCalibrationsCopy.cc.
References eta, phi, HLT_VtxMuL3::result, and HcalTopology::valid().
Referenced by fillDefaults().
00068 { 00069 static std::vector<HcalDetId> result; 00070 if (result.size () <= 0) { 00071 HcalTopology topology; 00072 for (int eta = -63; eta < 64; eta++) { 00073 for (int phi = 0; phi < 128; phi++) { 00074 for (int depth = 1; depth < 5; depth++) { 00075 for (int det = 1; det < 5; det++) { 00076 HcalDetId cell ((HcalSubdetector) det, eta, phi, depth); 00077 try { 00078 fData.getValues (cell); 00079 } 00080 catch (...) { 00081 if (topology.valid(cell)) result.push_back (cell); 00082 } 00083 } 00084 } 00085 } 00086 } 00087 } 00088 return result; 00089 }
bool xmlFile | ( | const std::string | fParam | ) |
Definition at line 214 of file hcalCalibrationsCopy.cc.
00214 { 00215 return fParam.find (':') == std::string::npos && std::string (fParam, fParam.length () - 4) == ".xml"; 00216 }