30 TList* subDirectoryNames =
directory->GetListOfKeys();
31 if (!subDirectoryNames)
34 TIter
next(subDirectoryNames);
35 while (TKey*
key = dynamic_cast<TKey*>(
next())) {
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 usesResource(
"DQMStore");
122 std::cout <<
"<TauDQMFileLoader::TauDQMFileLoader>:" << std::endl;
137 edm::LogError(
"TauDQMFileLoader") <<
" dqmDirectory_store undefined for fileSet = " <<
fileSet->second.name_
156 std::cout <<
"<TauDQMFileLoader::endJob>:" << std::endl;
160 edm::LogError(
"endJob") <<
" Error in Configuration ParameterSet" 161 <<
" --> histograms will NOT be loaded !!";
168 <<
" --> histograms will NOT be loaded !!";
187 edm::LogError(
"endJob") <<
" Failed to open inputFile = " << (*inputFileName)
188 <<
"--> histograms will NOT be loaded !!";
194 if (TDirectory*
directory = dynamic_cast<TDirectory*>(
obj)) {
198 <<
" in inputFile = " << (*inputFileName) <<
"--> histograms will NOT be loaded !!";
224 std::cout <<
" opening inputFile = " << (*inputFileName) << std::endl;
231 if (!
fileSet->second.dqmDirectory_store_.empty()) {
238 dqmStore.setCurrentFolder(inputDirectory);
239 std::vector<std::string> dirNames =
dqmStore.getSubdirs();
240 for (std::vector<std::string>::const_iterator
dirName = dirNames.begin();
dirName != dirNames.end();
246 if (subDirectories.find(subDirName) != subDirectories.end()) {
259 dqmStore, inputDirName_full, outputDirName_full,
fileSet->second.scaleFactor_,
mode,
true);
const double defaultScaleFactor
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_
void endRun(const edm::Run &r, const edm::EventSetup &c) override
std::vector< std::string > vstring
key
prepare the HTCondor submission files and eventually submit them
void dqmCopyRecursively(dqm::legacy::DQMStore &dqmStore, const std::string &inputDirectory, const std::string &outputDirectory, double scaleFactor, int mode, bool rmInputDirectory)
#define DEFINE_FWK_MODULE(type)
std::string format_vstring(const std::vector< std::string > &vs)
cfgEntryFileSet(const std::string &, const edm::ParameterSet &)
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)
void analyze(const edm::Event &, const edm::EventSetup &) override