StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEmcIUPi0Reader.cxx
1 #include "StEEmcIUPi0Reader.h"
2 
3 #include "TString.h"
4 
5 ClassImp(StEEmcIUPi0Reader);
6 
7 // ----------------------------------------------------------------------------
8 StEEmcIUPi0Reader::StEEmcIUPi0Reader(const Char_t *name):StMaker(name)
9 {
10  mChain=new TChain(name,"pi0 tree");
11  index=0;
12 }
13 
14 // ----------------------------------------------------------------------------
15 Int_t StEEmcIUPi0Reader::Init()
16 {
18  mChain-> SetBranchAddress("MixEvent",&mEvent);
19  return StMaker::Init();
20 }
21 
22 // ----------------------------------------------------------------------------
24 {
25  return getEvent(index++);
26 }
27 
28 // ----------------------------------------------------------------------------
29 Int_t StEEmcIUPi0Reader::getEvent(Int_t i)
30 {
31  Int_t stat=mChain->GetEntry(i);
32  if (!stat)return kStEOF;
33  return kStOK;
34 }
35 
36 // ----------------------------------------------------------------------------
37 void StEEmcIUPi0Reader::Clear(Option_t *opts)
38 {
39 }
40 
41 // ----------------------------------------------------------------------------
42 void StEEmcIUPi0Reader::chainFile( const Char_t *file )
43 {
44 
45  TString fname=file;
46  if ( !fname.Contains("root") ) return;
47  std::cout << "+ " << fname << std::endl;
48  mChain->Add(fname);
49 
50 }
void Clear(Option_t *opts="")
User defined functions.
Definition: Stypes.h:43
Definition: Stypes.h:40
StEEmcIUMixEvent * mEvent