Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DEventSourceEventStoreGenerator.cc
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DEventSourceEventStoreGenerator.cc
4 // Creator: sdobbs
5 //
6 
10 
11 /*
12 // Make this a plugin
13 extern "C" {
14  void InitPlugin(JApplication *app) {
15  InitJANAPlugin(app);
16  app->AddEventSourceGenerator(new DEventSourceEventStoreGenerator());
17  app->AddFactoryGenerator(new DFactoryGenerator_DESSkimData());
18  }
19 } // "extern C"
20 */
21 
22 //---------------------------------
23 // DEventSourceEventStoreGenerator (Constructor)
24 //---------------------------------
26 {
27 
28 }
29 
30 //---------------------------------
31 // ~DEventSourceEventStoreGenerator (Destructor)
32 //---------------------------------
34 {
35 
36 }
37 
38 //---------------------------------
39 // Description
40 //---------------------------------
42 {
43  return "EventStore";
44 }
45 
46 //---------------------------------
47 // CheckOpenable
48 //---------------------------------
50 {
51  // See if this looks like the beginning of an eventstore query
52  return source.substr(0,10)=="eventstore" ? 0.5:0.0;
53 }
54 
55 //---------------------------------
56 // MakeJEventSource
57 //---------------------------------
59 {
60  return new DEventSourceEventStore(source.c_str());
61 }
JEventSource * MakeJEventSource(string source)