StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StStreamFileFactory.cxx
1 #include "StStreamFileFactory.h"
2 #include "StStreamFile.h"
3 
4 StStreamFileFactory *StStreamFileFactory::fgStreamFactory=0;
5 //____________________________________________________________________________________
6 StStreamFileFactory::StStreamFileFactory()
7 {
8  if (!Factory()) SetFactory(this);
9 }
10 
11 //____________________________________________________________________________________
12 StStreamFileFactory::~StStreamFileFactory(){ if (Factory() == this) SetFactory(0); }
13 
14 //____________________________________________________________________________________
15 StStreamFile *StStreamFileFactory::StreamFile()
16 {
17  return Factory() ? Factory()->Create() :0;
18 }
19 //____________________________________________________________________________________
20 StStreamFile *StStreamFileFactory::StreamFile(const char *fileName, ios_base::openmode mode)
21 {
22  return Factory() ? Factory()->Create(fileName,mode): 0;
23 }