1 #ifndef CombineTools_CardWriter_h
2 #define CombineTools_CardWriter_h
53 CardWriter(std::string
const& text_pattern, std::string
const& root_pattern);
64 typedef std::map<std::string, std::set<std::string>> PatternMap;
65 std::string text_pattern_;
66 std::string root_pattern_;
67 mutable std::string tag_;
68 std::vector<std::string> wildcard_masses_;
72 std::string Compile(std::string pattern,
ch::Object const* obj,
73 bool skip_mass =
false)
const;
74 PatternMap BuildMap(std::string
const& pattern,
76 void MakeDirs(PatternMap
const& map)
const;
Automates the writing of datacards into directory structures.
CardWriter & CreateDirectories(bool flag)
Control whether directories can be created if missing.
CardWriter & SetWildcardMasses(std::vector< std::string > const &masses)
Redefine the mass values that should be treated as wildcards.
std::map< std::string, CombineHarvester > WriteCards(std::string const &tag, ch::CombineHarvester &cmb) const
Write datacards according to patterns, substituting $TAG for tag
CardWriter & SetVerbosity(unsigned v)
Set >= 1 for verbose output, otherwise silent.
CardWriter(std::string const &text_pattern, std::string const &root_pattern)
Must be constructed with text and ROOT file patterns.