StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
StMuDSTMaker
COMMON
macros
SchedulerExample.C
1
// NOTE - chain needs to be declared global so for StHbtEventReader
2
//==========================================================================================
3
#ifndef SchedulerExample_C
4
#define SchedulerExample_C
5
6
7
class
StMiniEventMaker;
8
class
StMuDbReader
;
9
10
void
SchedulerExample
(
const
char
* fileList,
const
char
* outFile=
"SchedulerExample.root"
) {
11
gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C"
);
12
loadSharedLibraries();
13
14
// create the chain"
15
StChain
* chain =
new
StChain
(
"StChain"
);
16
chain->SetDebug(0);
17
18
// now create StMuDstMaker
19
// agruments are:
20
// 0 : read mode
21
// 0 : name mode (has no effect on read mode)
22
// "" : input directory, ignored when filename or fileList is specified
23
// fileList : list of files to read
24
// "" : filter
25
// 1e9 : maximum number of files to read
26
// MuDstMaker : name of the maker
27
//cout << " press any key " << endl; cin.ignore();
28
//StMuDebug::setLevel(0);
29
// StMuDstMaker* muDstMaker = new StMuDstMaker(0,0,"",fileList,"",10,"MuDstMaker");
30
31
32
// now add your analysis maker
33
// SchedulerExample* analysis = new SchedulerExample(outFile);
34
35
// Init the chain
36
chain->Init();
// This should call the Init() method in ALL makers
37
chain->PrintInfo();
38
39
int
iret = 0;
40
int
iev =0;
41
// now loop over events, makers are call in order of creation
42
while
( !iret ) {
43
cout <<
"SchedulerExample.C -- Working on eventNumber "
<< iev++ << endl;
44
chain->
Clear
();
45
iret = chain->
Make
(iev);
// This should call the Make() method in ALL makers
46
}
// Event Loop
47
chain->
Finish
();
// This should call the Finish() method in ALL makers
48
49
}
50
51
52
#endif
53
SchedulerExample
Definition:
SchedulerExample.h:33
StChain::Clear
virtual void Clear(Option_t *option="")
User defined functions.
Definition:
StChain.cxx:77
StMuDbReader
Definition:
StMuDbReader.h:19
StChain::Finish
virtual Int_t Finish()
Definition:
StChain.cxx:85
StChain::Make
virtual Int_t Make()
Definition:
StChain.cxx:110
StChain
Definition:
StChain.h:33
Generated by
1.8.5