LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
Printable.h
Go to the documentation of this file.
1 #ifndef EVDB_PRINTABLE_H
9 #define EVDB_PRINTABLE_H
10 #include <string>
11 #include <map>
12 
13 namespace evdb {
15  class Printable {
16  public:
17  Printable();
18  virtual ~Printable();
19 
20  // Print the object to a file
21  virtual void Print(const char* filename) = 0;
22 
23  // Give a medium length description of what the view holds to be
24  // printed. Examples: "Full view of experiment", "3D View", ...
25  virtual const char* Description() const { return "??"; }
26 
27  // Give a short tag which can be included in filename to ID object printed
28  // Keep to ~4 characters
29  virtual const char* PrintTag() const = 0;
30 
31  public:
32  static void AddToListOfPrintables(const char* name, evdb::Printable* p);
34  static std::map<std::string,evdb::Printable*>& GetPrintables();
35 
36  };
37 }
38 
39 #endif // EVDB_PRINTABLE_H
40 
static void RemoveFromListOfPrintables(evdb::Printable *p)
Definition: Printable.cxx:47
virtual const char * Description() const
Definition: Printable.h:25
Base class for printable objects.
Definition: Printable.h:15
virtual const char * PrintTag() const =0
Manage all things related to colors for the event display.
static std::map< std::string, evdb::Printable * > & GetPrintables()
Definition: Printable.cxx:61
virtual ~Printable()
Definition: Printable.cxx:22
static void AddToListOfPrintables(const char *name, evdb::Printable *p)
Definition: Printable.cxx:29
virtual void Print(const char *filename)=0