StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StIOInterFace.cxx
1 #include "StIOInterFace.h"
2 //_____________________________________________________________________________
3 ClassImp(StIOInterFace)
4 
5 //_____________________________________________________________________________
6 StIOInterFace::StIOInterFace(const char *name,const char *iomode)
7 :StRTSBaseMaker("sc",name)
8 {
9  if (iomode) SetIOMode(iomode);
10  fNIO = 0;
11 }
12 //_____________________________________________________________________________
13 void StIOInterFace::SetBranch(const Char_t *brName,const Char_t *file,const Char_t *mode,Option_t *opt)
14 {
15  TString ts("SetBranch:");
16 
17  if (file) { ts += " file="; ts += file;}
18  if (mode) { ts += " mode="; ts += mode;}
19  if (opt ) { ts += " opt="; ts += opt ;}
20  IntoBranch(brName,ts);
21 }
22 //_____________________________________________________________________________
23 void StIOInterFace::IntoBranch(const Char_t *brName,const Char_t *logNames)
24 {
25  TString bN(brName); if (bN.Index("Branch")<0) bN+="Branch";
26  TDataSet *was = GetData(bN,".branches");
27  if (was) delete was;
28  AddAlias(bN,logNames,".branches");
29 }
30 //_____________________________________________________________________________
31 //void StIOInterFace::Streamer(TBuffer &b) {};
32 //_____________________________________________________________________________
33 Int_t StIOInterFace::Skip(int nskip)
34 {
35  for (; nskip; nskip--)
36  {
37  Clear(); int ret = MakeRead();
38  if (ret) break;
39  }
40 
41  return nskip;
42 }
43 //_____________________________________________________________________________
45 {
46  printf("<%s::Finish> %s: %d I/O's\n",ClassName(),GetName(),fNIO);
47  return StMaker::Finish();
48 }
Class StRTSBaseMaker - is an abstract StMaker to define the interface to access the DAQ data from the...
Int_t fNIO
Main file name name.
Definition: StIOInterFace.h:33
virtual void Clear(Option_t *option="")
User defined functions.
Definition: StMaker.cxx:634
virtual const char * GetName() const
special overload
Definition: StMaker.cxx:237
virtual Int_t Finish()
virtual Int_t Finish()
Definition: StMaker.cxx:776