StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
EvtExtGeneratorCommandsTable.hh
1 //--------------------------------------------------------------------------
2 //
3 // Environment:
4 // This software is part of the EvtGen package. If you use all or part
5 // of it, please give an appropriate acknowledgement.
6 //
7 // Copyright Information: See EvtGen/COPYRIGHT
8 // Copyright (C) 2012 University of Warwick, UK
9 //
10 // Module: EvtExtGeneratorCommandsTable
11 //
12 // Description: Table of commands to pass to external generators
13 //
14 // Modification history:
15 //
16 // Daniel Craik March 2012 Module created
17 //
18 //------------------------------------------------------------------------
19 
20 #include <map>
21 #include <vector>
22 #include <string>
23 
24 #ifndef EVTEXTGENERATORCOMMANDSTABLE_HH
25 #define EVTEXTGENERATORCOMMANDSTABLE_HH
26 
27 typedef std::map<std::string, std::string> Command;
28 typedef std::vector<Command> GeneratorCommands;
29 typedef std::map<std::string, GeneratorCommands > GlobalCommandMap;
30 
32 
33 public:
34 
35  static EvtExtGeneratorCommandsTable* getInstance();
36 
37  void addCommand(std::string extGenerator, Command command) { _commandMap[extGenerator].push_back(command); }
38  const GeneratorCommands& getCommands(std::string extGenerator) { return _commandMap[extGenerator]; }
39 
40 protected:
41 
44 
45 private:
46 
47  GlobalCommandMap _commandMap;
48 
50 
51 };
52 
53 #endif