-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport of configurable BTagAnalyzer from 10_1_X
- Loading branch information
Showing
14 changed files
with
9,472 additions
and
1,983 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ | |
*.*~ | ||
#*.*# | ||
__init__.py | ||
*.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#ifndef VARIABLEPARSER_H | ||
#define VARIABLEPARSER_H | ||
|
||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
|
||
#include <unordered_set> | ||
|
||
class VariableParser { | ||
|
||
public: | ||
|
||
VariableParser(bool isMC = false); | ||
|
||
std::unordered_set<std::string> parseGroupsAndVariables(std::vector<edm::ParameterSet> groupSet, std::vector<edm::ParameterSet> variableSet); | ||
std::unordered_set<std::string> getStoredVariables(); | ||
void printStoredVariables(); | ||
void printGroups(std::vector<edm::ParameterSet> groupSet); | ||
void printVariables(std::vector<edm::ParameterSet> variableSet); | ||
void saveStoredVariablesToFile(std::string filename="storedVariables.log"); | ||
bool isToBeStored(std::string variableName); | ||
bool isMC(){return isMC_;} | ||
void resetStoredVariables(){storedVariables_.clear();} | ||
|
||
private: | ||
|
||
std::unordered_set<std::string> storedVariables_; | ||
bool isMC_; | ||
|
||
void resolveVariableName(std::string fullName, std::string* variableName, std::string* prefix); | ||
void parseGroups(std::vector<edm::ParameterSet> groupSet, std::vector<edm::ParameterSet> variableSet); | ||
void parseVariables(std::vector<edm::ParameterSet> variableSet); | ||
void addVariable(edm::ParameterSet variable, bool force = false, std::string prefix = ""); | ||
|
||
}; | ||
|
||
|
||
#endif |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.