Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DDANAEVIOFactoryGenerator.cc
Go to the documentation of this file.
1 // Author: Elliott Wolin 19-Mar-2010
2 
3 
4 #include <JANA/JApplication.h>
5 
7 #include "DDANAEVIO_factory.h"
9 
10 
12  loop->AddFactory(new DDANAEVIO_factory());
13  return NOERROR;
14 }
15 
16 
17 
18 //----------------------------------------------------------------------------
19 
20 
21 // for initializing plugins
22 extern "C" {
23 
24  void InitPlugin(JApplication *app) {
25 
26  // initialize plugin system
27  InitJANAPlugin(app);
28 
29 
30  // add DANAEVIO factory
31  app->AddFactoryGenerator(new DDANAEVIOFactoryGenerator());
32 
33 
34  // Add DANAEVIO event processor to write out events
35  // default for writing is true, the normal case if factory is included
36  // to turn off specify -PEVIO::WRITEOUT=0
37  bool evioWriteOut =true;
38  gPARMS->SetDefaultParameter("EVIO:WRITEOUT",evioWriteOut);
39  if(evioWriteOut) {
40  app->AddProcessor(new JEventProcessor_danaevio(),true);
41  } else {
42  jout << endl << endl << " *** No EVIO output file will be generated ***" << endl << endl << endl;
43  }
44 
45  }
46 
47 } // "extern C"
48 
49 
50 //----------------------------------------------------------------------------
InitPlugin_t InitPlugin
jerror_t GenerateFactories(JEventLoop *)