Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
splitDST.C
Go to the documentation of this file.
1 #include <TSystem.h>
2 R__LOAD_LIBRARY(libinterface_main)
3 R__LOAD_LIBRARY(libfun4all)
4 R__LOAD_LIBRARY(libg4detectors)
5 R__LOAD_LIBRARY(libg4eval)
6 R__LOAD_LIBRARY(libktracker)
7 R__LOAD_LIBRARY(libonlmonserver)
8 R__LOAD_LIBRARY(libdecoder_maindaq)
9 
10 int splitDST(const int run = 1784, const int nEvents = 0){
11 
13  se->Verbosity(0);
15  in->Verbosity(0);
16  in->fileopen(Form("/data2/e1039/dst/run_%06i_spin.root",run));
17  se->registerInputManager(in);
18 
19  string dir_out = gSystem->ExpandPathName("/pnfs/e906/persistent/users/$USER/DstRun");
20  gSystem->mkdir(dir_out.c_str(), true);
21  Fun4AllSpillDstOutputManager* out_sp = new Fun4AllSpillDstOutputManager(dir_out.c_str());
22  out_sp->SetSpillStep(750);
23  se->registerOutputManager(out_sp);
24 
25  se->run(nEvents);
26 
27  // finish job - close and save output files
28  se->End();
29  se->PrintTimer();
30  std::cout << "All done" << std::endl;
31 
32  delete se;
33  gSystem->Exit(0);
34 
35 
36 return 0;
37 }
int registerInputManager(Fun4AllInputManager *InManager)
virtual int End()
static Fun4AllServer * instance()
Fun4AllServer * se
void PrintTimer(const std::string &name="")
int run(const int nEvents=1)
Definition: run.C:10
A Fun4All output manger that creates one DST file per spill group.
int splitDST(const int run=1784, const int nEvents=0)
Definition: splitDST.C:10
int run(const int nevnts=0, const bool require_nevents=false)
run n events (0 means up to end of file)
int registerOutputManager(Fun4AllOutputManager *manager)
virtual void Verbosity(const int ival)
Sets the verbosity of this module (0 by default=quiet).
Definition: Fun4AllBase.h:58
virtual int fileopen(const std::string &)