30 TList* subDirectoryNames = directory->GetListOfKeys();
31 if (!subDirectoryNames)
34 TIter
next(subDirectoryNames);
35 while (TKey*
key = dynamic_cast<TKey*>(
next())) {
37 TObject*
obj = directory->Get(
key->GetName());
39 if (TDirectory* subDirectory = dynamic_cast<TDirectory*>(obj)) {
43 subDirectories.insert(subDirectoryName);
63 size_t posRangeEnd =
inputFile->find(
'#', posRangeStart);
65 size_t posRangeSeparator =
inputFile->find(
'-', posRangeStart);
67 if ((posRangeEnd == std::string::npos) || (posRangeSeparator >= posRangeEnd)) {
69 <<
" Invalid range specification in inputFile = " << (*inputFile) <<
" !!";
78 if (firstFile.length() != lastFile.length()) {
80 <<
" Invalid range specification in inputFile = " << (*inputFile) <<
" !!";
84 int numFirstFile = atoi(firstFile.data());
85 int numLastFile = atoi(lastFile.data());
86 for (
int iFile = numFirstFile; iFile <= numLastFile; ++iFile) {
89 fileName << std::setfill(
'0') << std::setw(firstFile.length()) << iFile;
109 std::cout <<
"<cfgEntryFileSet::print>:" << std::endl;
110 std::cout <<
" name = " << name_ << std::endl;
112 std::cout <<
" scaleFactor = " << scaleFactor_ << std::endl;
113 std::cout <<
" dqmDirectory_store = " << dqmDirectory_store_ << std::endl;
121 std::cout <<
"<TauDQMFileLoader::TauDQMFileLoader>:" << std::endl;
136 edm::LogError(
"TauDQMFileLoader") <<
" dqmDirectory_store undefined for fileSet = " <<
fileSet->second.name_
155 std::cout <<
"<TauDQMFileLoader::endJob>:" << std::endl;
159 edm::LogError(
"endJob") <<
" Error in Configuration ParameterSet"
160 <<
" --> histograms will NOT be loaded !!";
167 <<
" --> histograms will NOT be loaded !!";
186 edm::LogError(
"endJob") <<
" Failed to open inputFile = " << (*inputFileName)
187 <<
"--> histograms will NOT be loaded !!";
193 if (TDirectory*
directory = dynamic_cast<TDirectory*>(obj)) {
197 <<
" in inputFile = " << (*inputFileName) <<
"--> histograms will NOT be loaded !!";
223 std::cout <<
" opening inputFile = " << (*inputFileName) << std::endl;
230 if (!
fileSet->second.dqmDirectory_store_.empty()) {
238 std::vector<std::string> dirNames = dqmStore.
getSubdirs();
239 for (std::vector<std::string>::const_iterator
dirName = dirNames.begin();
dirName != dirNames.end();
245 if (subDirectories.find(subDirName) != subDirectories.end()) {
258 dqmStore, inputDirName_full, outputDirName_full,
fileSet->second.scaleFactor_, mode,
true);
const double defaultScaleFactor
const edm::EventSetup & c
virtual DQM_DEPRECATED std::vector< std::string > getSubdirs() const
#define DEFINE_FWK_MODULE(type)
void setCurrentFolder(std::string const &fullpath) override
bool exists(std::string const ¶meterName) const
checks if a parameter exists
std::set< std::string > sstring
Log< level::Error, false > LogError
std::string dqmDirectoryName(const std::string &dqmRootDirectory, const std::string &dqmSubDirectory)
const std::string rangeKeyword
const std::string dqmRootDirectory_inTFile
std::string dqmSubDirectoryName_merged(const std::string &directory, const std::string &subdirectory)
std::map< std::string, sstring > subDirectoryMap_
tuple key
prepare the HTCondor submission files and eventually submit them
void endRun(const edm::Run &r, const edm::EventSetup &c) override
std::vector< std::string > vstring
void dqmCopyRecursively(dqm::legacy::DQMStore &dqmStore, const std::string &inputDirectory, const std::string &outputDirectory, double scaleFactor, int mode, bool rmInputDirectory)
std::string format_vstring(const std::vector< std::string > &vs)
cfgEntryFileSet(const std::string &, const edm::ParameterSet &)
T getParameter(std::string const &) const
std::map< std::string, cfgEntryFileSet > fileSets_
~TauDQMFileLoader() override
TauDQMFileLoader(const edm::ParameterSet &)
std::string dqmDirectory_store_
const std::string dqmRootDirectory
void mapSubDirectoryStructure(TDirectory *directory, std::string directoryName, std::set< std::string > &subDirectories)
DQM_DEPRECATED bool open(std::string const &filename, bool overwrite=false, std::string const &path="", std::string const &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
void analyze(const edm::Event &, const edm::EventSetup &) override