RootInterface Class Reference

#include <RootInterface.h>

List of all members.

Public Member Functions

 RootInterface (MsgStream log)
virtual ~RootInterface ()
virtual StatusCode finalize ()
virtual bool checkEndOfTree ()
 check if all the files is over 2005-11-28
virtual bool getENDFILE ()
virtual StatusCode addInput (const std::string &treename, const std::string &file)
 add input tree to the list
virtual StatusCode addOutput (const std::string &treename, const std::string &file, int splitx, int bufsize, int compression)
 add output tree to the list
virtual StatusCode createBranch (const std::string &tree, const std::string &branch, const char *classname, void *addr, int &branchnr)
 create a branch in this tree
virtual StatusCode setBranchAddress (const std::string treename, const std::string branchname, void *addr, int &nb)
 set branch address
virtual StatusCode getBranchEntry (int nr, int entry, int &nb)
 get entry from this branch
virtual StatusCode getBranchEntry (int nr, int entry, void *addr, int &nb)
 get entry from this branch with addr
virtual bool getEOF ()
 get EOF flag
virtual Int_t getEntries ()
 get nr of entries
virtual StatusCode fillTrees ()
 fill in all trees
virtual std::string getCurrentFileName ()
virtual std::vector< int > getTotEvtNo ()
virtual std::string getJobOptions ()
virtual std::string getDecayOptions ()
virtual void printJobInfo (TFile *file, int level)
virtual void setSelectFromTag (bool temp)
virtual bool getSelectFromTag ()
virtual int getCurrentFileNum ()
virtual int getTotalFileNum ()
virtual void setTagInputFile (std::vector< std::string > input)
virtual std::vector< std::stringgetTagInputFile ()
virtual StatusCode f_addOutput (const std::string &treename, const std::string &file, int splitx=1, int bufsize=64000, int compression=1)
virtual StatusCode f_createTree (unsigned int treenr, const std::string treename)
virtual StatusCode f_createBranch (const std::string &treename, const std::string &branchname, const char *classname, void *addr, int &branchnr)
virtual StatusCode f_getTreeNr (const std::string treename, unsigned int &treenr, bool doAdd=false)
virtual StatusCode f_fillTrees ()
virtual StatusCode f_finalize ()

Static Public Member Functions

static RootInterfaceInstance (MsgStream log)
 singleton behaviour

Private Member Functions

virtual StatusCode getTreeNr (const std::string treename, unsigned int &treenr, bool doAdd=false)
 get treenr from treename
virtual TTree * getTree (const std::string treename)
 get tree
virtual TTree * getOtherTree (const std::string treename)
 get tree from other files 2005-11-28
virtual StatusCode createTree (unsigned int treenr, const std::string treename)
 create this tree

Private Attributes

std::vector< TTree * > m_otherTrees
 vector of other trees created from others files 2005-11-28
std::vector< TFile * > inputFiles
 vector of input files
std::vector< std::stringm_fileNames
 files 2005-11-28
std::string m_currentFileName
bool m_selectFromTag
std::vector< std::stringm_tagInputFile
int m_fileNum
 the number of the using files 2005-11-29
bool m_ENDFILE
 signed the tree is end 2005-11-30
std::vector< std::stringm_treenames
 vector of treenames used
std::vector< std::stringm_inputFilenames
 vector of input filenames used
std::vector< std::stringm_outputFilenames
 vector of output filenames used
std::vector< TTree * > m_inputTrees
 vector of input trees
std::vector< TTree * > m_outputTrees
 vector of output trees
std::vector< TFile * > m_inputFiles
 vector of input files
std::vector< TFile * > m_outputFiles
 vector of output files
std::vector< int > m_splitModes
 vector of splitmodes
std::vector< int > m_bufSizes
 vector of buffer sizes
std::vector< int > m_compressionLevels
 vector of compression levels
TClonesArray * m_branches
 array of branch pointers for writing
TClonesArray * m_branchesRead
 array of branch pointers for reading
bool m_EOF
 EOF flag.
Int_t m_entries
 number of entries (<0 if not yet known)
MsgStream log
 instance of message stream transmitted at construction
std::vector< std::stringm_jobOptions
std::string m_bossVer
std::string m_decayOptions
std::vector< int > m_totEvtNo
std::vector< std::stringm_single_treenames
std::vector< std::stringm_single_outputFileNames
std::vector< TFile * > m_single_outputFiles
std::vector< TTree * > m_single_outputTrees
std::vector< int > m_single_splitModes
std::vector< int > m_single_bufSizes
std::vector< int > m_single_compressionLevels

Static Private Attributes

static RootInterfacem_rootInterface = 0
 static singleton pointer


Detailed Description

Definition at line 19 of file RootInterface.h.


Constructor & Destructor Documentation

RootInterface::RootInterface ( MsgStream  log  ) 

Definition at line 31 of file RootInterface.cxx.

References false, m_branches, m_branchesRead, m_ENDFILE, m_entries, m_EOF, and m_fileNum.

Referenced by Instance().

00031                                           : log(str)
00032 { 
00033   
00034   m_branches= new TClonesArray("TBranch",1); 
00035   m_branchesRead= new TClonesArray("TBranch",1);
00036   m_entries=-1;
00037   m_EOF=false;
00038   m_ENDFILE = false ;
00039   m_fileNum = 0; //-1
00040  }

RootInterface::~RootInterface (  )  [virtual]

Definition at line 43 of file RootInterface.cxx.

00044 { 
00045 }


Member Function Documentation

StatusCode RootInterface::addInput ( const std::string treename,
const std::string file 
) [virtual]

add input tree to the list

Definition at line 163 of file RootInterface.cxx.

References Bes_Common::DEBUG, getTreeNr(), inputFiles, log, m_currentFileName, m_fileNames, m_inputFilenames, m_inputFiles, m_inputTrees, and m_otherTrees.

Referenced by RootCnvSvc::initFiles(), and RootEvtSelector::initialize().

00163                                                                                   {
00164   log << MSG::DEBUG << "addInput  for Tree "<<treename<<endreq;
00165   StatusCode sc=StatusCode::SUCCESS;
00166   m_fileNames.push_back(file); //input files 2005-11-28
00167   m_otherTrees.push_back(NULL);
00168   inputFiles.push_back(NULL);
00169   unsigned int treenr;
00170   sc=getTreeNr(treename,treenr,true);
00171   m_inputFilenames[treenr]=file; // the last one file is setted 
00172   m_inputFiles[treenr]=NULL;
00173   m_inputTrees[treenr]=NULL;
00174   m_currentFileName = m_fileNames[treenr].c_str();
00175   return sc;
00176 }

StatusCode RootInterface::addOutput ( const std::string treename,
const std::string file,
int  splitx,
int  bufsize,
int  compression 
) [virtual]

add output tree to the list

Definition at line 189 of file RootInterface.cxx.

References Bes_Common::DEBUG, getTreeNr(), genRecEmupikp::i, log, m_bufSizes, m_compressionLevels, m_outputFilenames, m_outputFiles, m_outputTrees, and m_splitModes.

Referenced by RootCnvSvc::initFiles().

00189                                                                                                                            {
00190   static int i =0;
00191   i ++;
00192   log << MSG::DEBUG << "addOutput  for Tree "<<treename<<endreq;
00193   StatusCode sc=StatusCode::SUCCESS;
00194   unsigned int treenr;
00195   sc=getTreeNr(treename,treenr,true);
00196   m_outputFilenames[treenr]=file;
00197   m_outputFiles[treenr]=NULL;
00198   m_outputTrees[treenr]=NULL;
00199   m_splitModes[treenr]=split;
00200   m_bufSizes[treenr]=bufsize;
00201   m_compressionLevels[treenr]=compression;
00202 
00203   return sc;
00204 }

bool RootInterface::checkEndOfTree (  )  [virtual]

check if all the files is over 2005-11-28

Definition at line 436 of file RootInterface.cxx.

References getTreeNr(), inputFiles, m_currentFileName, m_ENDFILE, m_entries, m_EOF, m_fileNames, m_fileNum, m_inputFiles, m_inputTrees, and m_otherTrees.

Referenced by RootEvtSelector::getEntryFromTag(), and RootEvtSelector::next().

00436                                   {
00437 
00438   if ( m_fileNum >= int(m_fileNames.size())-1 ){
00439     if(m_inputFiles[0]){ 
00440       delete m_inputFiles[0];   
00441       m_inputFiles[0] = NULL;   
00442     }   
00443     return true;
00444   }
00445   
00446   (*m_branchesRead).Clear();
00447   unsigned int treenr;
00448   getTreeNr("Event",treenr);
00449   if(m_inputFiles[treenr]){ 
00450     delete m_inputFiles[treenr];
00451     m_inputFiles[treenr] = NULL;
00452   }
00453   if(m_inputTrees[treenr]){
00454     //delete m_inputTrees[treenr];
00455     m_inputTrees[treenr] = NULL;
00456   }
00457   if(m_otherTrees[m_fileNum]) delete m_otherTrees[m_fileNum];
00458   if(inputFiles[m_fileNum])   delete inputFiles[m_fileNum];
00459 
00460   m_ENDFILE = true;
00461   m_fileNum++;
00462   m_currentFileName = m_fileNames[m_fileNum].c_str();
00463 
00464   m_entries=-1;
00465   m_EOF = false;
00466   return false;
00467 }

StatusCode RootInterface::createBranch ( const std::string tree,
const std::string branch,
const char *  classname,
void *  addr,
int &  branchnr 
) [virtual]

create a branch in this tree

Definition at line 206 of file RootInterface.cxx.

References createTree(), Bes_Common::DEBUG, getTreeNr(), log, m_branches, m_bufSizes, m_outputFilenames, m_outputTrees, and m_splitModes.

Referenced by TrigCnv::DataObjectToTObject(), RecTrackCnv::DataObjectToTObject(), McCnv::DataObjectToTObject(), HltCnv::DataObjectToTObject(), EvtRecCnv::DataObjectToTObject(), EvtNavigatorCnv::DataObjectToTObject(), EvtHeaderCnv::DataObjectToTObject(), DstCnv::DataObjectToTObject(), and DigiCnv::DataObjectToTObject().

00206                                                                                                                                             {
00207 
00208   log << MSG::DEBUG << "CreateBranch, Tree "<<treename<<" branch "<<branchname<<endreq;
00209 
00210   TBranch *branch;
00211   unsigned int treenr;
00212   StatusCode sc=getTreeNr(treename,treenr);
00213   if (!sc.isSuccess()) return sc;
00214 
00215   if ( m_outputFilenames[treenr].empty() ) {
00216      log << MSG::DEBUG << "No corresponding output file specified, ignore createBranch: "<<branchname<<endreq;
00217      return StatusCode::SUCCESS;
00218   }
00219 
00220   if(!m_outputTrees[treenr])  sc=this->createTree(treenr,treename);
00221   if (!sc.isSuccess()) return sc;
00222   TTree *  tree=m_outputTrees[treenr];
00223   tree->SetUniqueID(treenr);
00224 
00225   branch = tree->Branch(branchname.c_str(),classname,addr,m_bufSizes[treenr],m_splitModes[treenr]);
00226   branch->SetUniqueID(treenr);
00227   branchnr=m_branches->GetEntriesFast()+1;
00228   m_branches->Expand(branchnr);
00229   TClonesArray &a = *m_branches;
00230   a[branchnr-1]=branch;
00231   tree->SetBasketSize(branchname.c_str(),m_bufSizes[treenr]); //some problem with above method to set buffersize, so we set it here.
00232   return StatusCode::SUCCESS;
00233 }

StatusCode RootInterface::createTree ( unsigned int  treenr,
const std::string  treename 
) [private, virtual]

create this tree

Definition at line 236 of file RootInterface.cxx.

References EvtCyclic3::c_str(), Bes_Common::FATAL, Bes_Common::INFO, log, m_compressionLevels, m_outputFilenames, m_outputFiles, m_outputTrees, deljobs::string, and title.

Referenced by createBranch().

00237 {
00238   // opens file and creates TTree on it
00239  
00240   TDirectory *saveDir = gDirectory;   
00241 
00242   // Create the new ROOT file
00243   m_outputFiles[treenr] =new TFile(m_outputFilenames[treenr].c_str(), "RECREATE");
00244   if(m_outputFiles[treenr]->IsZombie()){ 
00245         std::cout<<"RootInterface ERROR::Can't not open file"<<m_outputFilenames[treenr].c_str()<<std::endl; 
00246         exit(1); 
00247     } 
00248   if (!m_outputFiles[treenr]->IsOpen()) {
00249     log << MSG::FATAL << "ROOT file " << m_outputFilenames[treenr] 
00250         << " could not be opened for writing." << endreq;
00251     exit(1);
00252     return StatusCode::FAILURE;
00253   }
00254   log << MSG::INFO << "RootInterface::opened file for output:" << m_outputFilenames[treenr].c_str() <<endreq;
00255  
00256   m_outputFiles[treenr]->cd();
00257   m_outputFiles[treenr]->SetCompressionLevel(m_compressionLevels[treenr]);
00258   std::string title=treename+" from conversion";
00259   m_outputTrees[treenr]= new TTree(treename.c_str(), title.c_str());
00260   TTree::SetMaxTreeSize(20000000000LL);
00261 
00262   saveDir->cd();
00263 
00264   return StatusCode::SUCCESS;
00265 }

StatusCode RootInterface::f_addOutput ( const std::string treename,
const std::string file,
int  splitx = 1,
int  bufsize = 64000,
int  compression = 1 
) [virtual]

Definition at line 636 of file RootInterface.cxx.

References f_getTreeNr(), Bes_Common::INFO, log, m_single_bufSizes, m_single_compressionLevels, m_single_outputFileNames, m_single_outputFiles, m_single_outputTrees, and m_single_splitModes.

Referenced by BesVisAlg::write2file().

00638                                                                                {
00639     log << MSG::INFO << "addOutput to single event" << endreq;
00640     StatusCode status = StatusCode::FAILURE;
00641     unsigned int treenr;
00642 
00643     status = f_getTreeNr(treename, treenr, true);
00644     m_single_compressionLevels[treenr]  =       compression;
00645     m_single_outputFileNames[treenr]    =       file;
00646     m_single_outputFiles[treenr]        =       NULL;
00647     m_single_outputTrees[treenr]        =       NULL;
00648     m_single_splitModes[treenr] =       splitx;
00649     m_single_bufSizes[treenr]   =       bufsize;
00650 
00651     std::cout << "finish f_addOutput to single event" << std::endl;
00652     return status;
00653 }

StatusCode RootInterface::f_createBranch ( const std::string treename,
const std::string branchname,
const char *  classname,
void *  addr,
int &  branchnr 
) [virtual]

Definition at line 683 of file RootInterface.cxx.

References f_createTree(), f_getTreeNr(), Bes_Common::INFO, log, m_single_bufSizes, m_single_outputTrees, and m_single_splitModes.

Referenced by BesVisAlg::write2file().

00686                                    {
00687     log << MSG::INFO << "f_craeteBranch() create branch, tree name:"
00688     << treename << ", branch name:" << branchname << endreq;
00689 
00690     TBranch *branch;
00691     unsigned int treenr;
00692     StatusCode status = f_getTreeNr(treename, treenr);
00693     if ( !status.isSuccess()) return status;
00694 
00695     if ( !m_single_outputTrees[treenr])
00696         status = this->f_createTree(treenr, treename);
00697     if ( !status.isSuccess()) return status;
00698 
00699     TTree*      tree = m_single_outputTrees[treenr];
00700     tree->SetUniqueID(treenr);
00701 
00702     branch = tree->Branch(branchname.c_str(),
00703                           classname,
00704                           addr,
00705                           m_single_bufSizes[treenr],
00706                           m_single_splitModes[treenr]);
00707 
00708 }

StatusCode RootInterface::f_createTree ( unsigned int  treenr,
const std::string  treename 
) [virtual]

Definition at line 655 of file RootInterface.cxx.

References EvtCyclic3::c_str(), calibUtil::ERROR, Bes_Common::INFO, log, m_single_compressionLevels, m_single_outputFileNames, m_single_outputFiles, m_single_outputTrees, deljobs::string, and title.

Referenced by f_createBranch().

00656                                                                 {
00657     log << MSG::INFO << "f_createTree()" << endreq;
00658 
00659     TDirectory *saveDir = gDirectory;
00660 
00661     m_single_outputFiles[treenr] =
00662         new TFile(m_single_outputFileNames[treenr].c_str(), "RECREATE");
00663     if ( !m_single_outputFiles[treenr]->IsOpen()){
00664         log << MSG::ERROR << "ROOT share file: "
00665         << m_single_outputFileNames[treenr]
00666         << " could not be opened for writing"
00667         << endreq;
00668         return StatusCode::FAILURE;
00669     }
00670     log << MSG::INFO << "f_createTree()::open share file for writing: "
00671     << m_single_outputFileNames[treenr] << endreq;
00672 
00673     m_single_outputFiles[treenr]->cd();
00674     m_single_outputFiles[treenr]->SetCompressionLevel(m_single_compressionLevels[treenr]);
00675 
00676     std::string title = treename + " for share";
00677     m_single_outputTrees[treenr] = new TTree(treename.c_str(), title.c_str());
00678     saveDir->cd();
00679 
00680     return StatusCode::SUCCESS;
00681 }

StatusCode RootInterface::f_fillTrees (  )  [virtual]

Definition at line 740 of file RootInterface.cxx.

References Bes_Common::INFO, log, and m_single_outputTrees.

Referenced by BesVisAlg::write2file().

00740                                      {
00741     StatusCode status = StatusCode::FAILURE;
00742     int byte;
00743 
00744     std::vector<TTree *>::const_iterator tree;
00745     for ( tree = m_single_outputTrees.begin(); tree < m_single_outputTrees.end(); tree++){
00746         if ( (*tree) == NULL) continue;
00747         byte = (*tree)->Fill();
00748         (*tree)->Print();
00749         log << MSG::INFO << "f_fillTrees() filled tree " << (*tree)->GetName()
00750         << " with " << byte << " bytes!" << endreq;
00751         status = StatusCode::SUCCESS;
00752     }
00753 
00754     return status;
00755 }

StatusCode RootInterface::f_finalize (  )  [virtual]

Definition at line 757 of file RootInterface.cxx.

References calibUtil::ERROR, Bes_Common::INFO, log, m_single_outputFiles, and m_single_outputTrees.

Referenced by BesVisAlg::finishSvc().

00757                                     {
00758     log << MSG::INFO << "f_finalize() in RootInterface" << endreq;
00759 
00760     std::vector<TTree *>::const_iterator        tree;
00761     for ( tree = m_single_outputTrees.begin(); tree < m_single_outputTrees.end(); tree++){
00762         if ( *tree){
00763             unsigned int treenr = (*tree)->GetUniqueID();
00764             log << MSG::INFO << "tree id: " << treenr << endreq;
00765             if ( m_single_outputFiles[treenr] ){
00766                 if ( !m_single_outputFiles[treenr]->IsOpen()){
00767                     log << MSG::ERROR << "f_finalize could not open share file for writing"
00768                     << endreq;
00769                     return StatusCode::FAILURE;
00770                 }
00771                 else {
00772                     log << MSG::INFO << "Closing file:" << treenr
00773                     << ", tree:" << (*tree)->GetName() << endreq;
00774 
00775                     TDirectory *saveDir = gDirectory;
00776                     m_single_outputFiles[treenr]->cd();
00777                     log <<MSG::INFO << "WREITE TO FILE BYTES: " 
00778                             << m_single_outputFiles[treenr]->Write()
00779                             << endreq;
00780                     m_single_outputFiles[treenr]->Close();
00781                     saveDir->cd();
00782                 }
00783             }
00784         }
00785     }
00786     return StatusCode::SUCCESS;
00787 }

StatusCode RootInterface::f_getTreeNr ( const std::string  treename,
unsigned int &  treenr,
bool  doAdd = false 
) [virtual]

Definition at line 710 of file RootInterface.cxx.

References calibUtil::ERROR, log, m_single_bufSizes, m_single_compressionLevels, m_single_outputFileNames, m_single_outputFiles, m_single_outputTrees, m_single_splitModes, m_single_treenames, and boss::where().

Referenced by f_addOutput(), and f_createBranch().

00711                                                                       {
00712 
00713     std::vector<std::string>::iterator where =
00714         std::find(m_single_treenames.begin(), m_single_treenames.end(), treename);
00715 
00716     if ( where == m_single_treenames.end()){
00717         if ( doAdd){
00718             treenr = m_single_treenames.size();
00719             m_single_treenames.push_back(treename);
00720 
00721             m_single_outputFileNames.push_back("");
00722             m_single_outputFiles.push_back(NULL);
00723             m_single_outputTrees.push_back(NULL);
00724             m_single_splitModes.push_back(0);
00725             m_single_bufSizes.push_back(0);
00726             m_single_compressionLevels.push_back(0);
00727 
00728             return StatusCode::SUCCESS;
00729         }
00730         else {
00731             log << MSG::ERROR << "Invalid share tree name: "
00732             << treename << endreq;
00733             return StatusCode::FAILURE;
00734         }
00735     }
00736     treenr = where - m_single_treenames.begin();
00737     return StatusCode::SUCCESS;
00738 }

StatusCode RootInterface::fillTrees (  )  [virtual]

fill in all trees

Definition at line 608 of file RootInterface.cxx.

References Bes_Common::DEBUG, Bes_Common::FATAL, log, m_outputFilenames, m_outputFiles, and m_outputTrees.

Referenced by RootCnvSvc::commitOutput().

00608                                     {
00609   // loop over all trees and fill them
00610   StatusCode sc=StatusCode::FAILURE;
00611   int nb;
00612   std::vector<TTree *>::const_iterator trees;
00613   for (trees=m_outputTrees.begin();trees<m_outputTrees.end();trees++) {
00614       if ((*trees)==NULL) continue;
00615       int treenr=(*trees)->GetUniqueID();
00616      if(m_outputFiles[treenr]->IsZombie()||(!m_outputFiles[treenr]->IsOpen())){
00617             std::cout<<"RootInterface ERROR::The ROOT File:"<<m_outputFilenames[treenr].c_str()<<"status is false"<<std::endl;
00618             exit(1);
00619          }
00620       nb=(*trees)->Fill();
00621       m_outputFiles[treenr] = (*trees)->GetCurrentFile();
00622       log << MSG::DEBUG << "filled tree "<<(* trees)->GetName() <<" with "<<nb<<" bytes"<< endreq;
00623       if(nb==-1){
00624          log << MSG::FATAL << "Error in filling tree "<<(* trees)->GetName() <<" with "<<nb<<" bytes"<< endreq; 
00625     exit(1);
00626         }
00627       sc=StatusCode::SUCCESS;
00628   }
00629   return sc;
00630 }

StatusCode RootInterface::finalize (  )  [virtual]

Definition at line 107 of file RootInterface.cxx.

References Bes_Common::DEBUG, calibUtil::ERROR, Bes_Common::FATAL, getDecayOptions(), getJobOptions(), getTotEvtNo(), Bes_Common::INFO, log, m_bossVer, m_decayOptions, m_jobOptions, m_outputFilenames, m_outputFiles, m_outputTrees, m_totEvtNo, TJobInfo::setBossVer(), TJobInfo::setDecayOptions(), TJobInfo::setJobOptions(), TJobInfo::setTotEvtNo(), and deljobs::string.

Referenced by RootCnvSvc::finalize().

00107                                    {
00108 
00109   //  Get the messaging service, print where you are
00110   log << MSG::INFO << "finalize() in RootInterface" << endreq;
00111 
00112   // close file (FIXME for several output files)
00113   std::vector<TTree *>::const_iterator trees;
00114   for (trees=m_outputTrees.begin();trees<m_outputTrees.end();trees++)
00115    if (*trees) {
00116     int treenr=(*trees)->GetUniqueID();
00117     if (m_outputFiles[treenr]) {
00118       if (!m_outputFiles[treenr]->IsOpen()) {
00119         log << MSG::ERROR << "Could not open file for writing" << endreq;
00120         return StatusCode::FAILURE;
00121       } else {
00122         log << MSG::DEBUG<<" Closing file "<<treenr<<", tree "<<(*trees)->GetName()<<endreq;
00123         TDirectory *saveDir = gDirectory;
00124         m_outputFiles[treenr]->cd();
00125 
00126   TJobInfo* jobInfo = new TJobInfo;
00127   TTree* m_jobInfoTree = new TTree("JobInfoTree","Job info");
00128   m_jobInfoTree->Branch("JobInfo",&jobInfo);
00129   
00130   m_bossVer = getenv("BES_RELEASE");
00131   log << MSG::INFO << "fill boss version: "<<m_bossVer << endreq;
00132 
00133   string tmpJobOptions = getJobOptions();
00134   m_jobOptions.push_back( tmpJobOptions );
00135 
00136   if(m_decayOptions.size()==0)
00137     m_decayOptions = getDecayOptions();
00138  
00139   m_totEvtNo = getTotEvtNo(); 
00140   jobInfo->setBossVer(m_bossVer);
00141   jobInfo->setJobOptions(m_jobOptions);
00142   jobInfo->setDecayOptions(m_decayOptions); 
00143   jobInfo->setTotEvtNo(m_totEvtNo); 
00144   m_jobInfoTree->Fill();
00145 
00146         //?    m_mcFile->Write(0, TObject::kOverwrite);
00147         int st =1;
00148         st = m_outputFiles[treenr]->Write();
00149         if(st==0){
00150            log << MSG::FATAL<<" can not write the file "<< m_outputFilenames[treenr].c_str()<<endreq;
00151            exit(1);
00152         }
00153  
00154         m_outputFiles[treenr]->Close();
00155         saveDir->cd();
00156       }
00157     }
00158    }
00159   if(m_outputTrees.size()>0) m_outputTrees.clear();
00160   return StatusCode::SUCCESS;
00161 }

StatusCode RootInterface::getBranchEntry ( int  nr,
int  entry,
void *  addr,
int &  nb 
) [virtual]

get entry from this branch with addr

Definition at line 539 of file RootInterface.cxx.

References Bes_Common::DEBUG, calibUtil::ERROR, log, m_branchesRead, and m_EOF.

00540 {
00541   log << MSG::DEBUG <<"RootInterface::getBranchEntry: "<<", branch nr "<<nr  <<", entry "<<entry <<endreq;
00542 
00543   if (nr <0) return StatusCode::FAILURE;
00544   TBranch *branch=(TBranch *)m_branchesRead->At(nr);
00545   if (!branch) {
00546     log << MSG::ERROR << "Could not find branch " << nr <<endreq;
00547     return StatusCode::FAILURE;
00548   }
00549 
00550   branch->SetAddress(addr);
00551   nb=branch->GetEntry(entry);
00552 
00553   if (nb<=0){
00554     m_EOF=true;
00555 
00556   }
00557   return StatusCode::SUCCESS;
00558 }

StatusCode RootInterface::getBranchEntry ( int  nr,
int  entry,
int &  nb 
) [virtual]

get entry from this branch

Definition at line 561 of file RootInterface.cxx.

References Bes_Common::DEBUG, calibUtil::ERROR, log, m_branchesRead, and m_EOF.

Referenced by RootEventBaseCnv::createObj().

00562 {
00563   log << MSG::DEBUG <<"RootInterface::getBranchEntry: "<<", branch nr "<<nr  <<", entry "<<entry <<endreq;
00564 
00565   if (nr <0) return StatusCode::FAILURE;
00566   TBranch *branch=(TBranch *)m_branchesRead->At(nr);
00567   if (!branch) {
00568     log << MSG::ERROR << "Could not find branch " << nr <<endreq;
00569     return StatusCode::FAILURE;
00570   }
00571   nb=branch->GetEntry(entry);
00572   
00573   if (nb<=0){
00574     m_EOF=true;
00575     
00576   }
00577   
00578   return StatusCode::SUCCESS;
00579 }

virtual std::string RootInterface::getCurrentFileName (  )  [inline, virtual]

Definition at line 55 of file RootInterface.h.

References m_currentFileName.

Referenced by RootEventBaseCnv::createObj(), MixerAlg::execute(), TagWriterAlg::execute(), RootEvtSelector::getEntryFromTag(), and RootEvtSelector::initialize().

00055 { return m_currentFileName;}  

virtual int RootInterface::getCurrentFileNum (  )  [inline, virtual]

Definition at line 65 of file RootInterface.h.

References m_fileNum.

Referenced by RootEvtSelector::getEntryFromTag().

00065 {return m_fileNum;}

std::string RootInterface::getDecayOptions (  )  [virtual]

Definition at line 70 of file RootInterface.cxx.

References DataInfoSvc::getDecayOptions(), Bes_Common::INFO, log, deljobs::string, and Bes_Common::WARNING.

Referenced by finalize().

00071 { 
00072   ISvcLocator* svcLocator = Gaudi::svcLocator();
00073   IDataInfoSvc *tmpInfoSvc;
00074   DataInfoSvc* jobInfoSvc;
00075   string decayOptions;
00076   StatusCode status = svcLocator->service("DataInfoSvc",tmpInfoSvc);
00077   if (status.isSuccess()) {
00078     log << MSG::INFO << "get the DataInfoSvc" << endreq;
00079     jobInfoSvc=dynamic_cast<DataInfoSvc *>(tmpInfoSvc);
00080     decayOptions = jobInfoSvc->getDecayOptions();
00081     log << MSG::INFO << "get decay options" << endreq
00082         << decayOptions << endreq;
00083   }else {
00084     log << MSG::WARNING << "could not get the DataInfoSvc. Ignore it." << endreq;
00085   }
00086   return decayOptions;
00087 }

virtual bool RootInterface::getENDFILE (  )  [inline, virtual]

Definition at line 31 of file RootInterface.h.

References m_ENDFILE.

Referenced by RootEventBaseCnv::createObj().

00031 { return m_ENDFILE;}

virtual Int_t RootInterface::getEntries (  )  [inline, virtual]

get nr of entries

Definition at line 51 of file RootInterface.h.

References m_entries.

Referenced by RootEventBaseCnv::createObj(), and RootEvtSelector::next().

00051 { return m_entries;}

virtual bool RootInterface::getEOF (  )  [inline, virtual]

get EOF flag

Definition at line 49 of file RootInterface.h.

References m_EOF.

Referenced by RootEvtSelector::next().

00049 { return m_EOF;}

std::string RootInterface::getJobOptions (  )  [virtual]

Definition at line 47 of file RootInterface.cxx.

References Bes_Common::INFO, boss::jobOptions, log, and deljobs::string.

Referenced by finalize().

00048 {
00049   IInterface* iface = Gaudi::createApplicationMgr();
00050   SmartIF<IProperty> propMgr (iface );
00051   std::string path;
00052   propMgr->getProperty( "JobOptionsPath", path);
00053   log << MSG::INFO << "JobOptions file for current job: " <<path << endreq;
00054   ifstream fin(path.c_str());
00055   string jobOptions;
00056   string tempString;
00057   while(getline(fin,tempString))
00058   {
00059     if( tempString.size()>0 && tempString.find("//")>tempString.size() )
00060     { 
00061       jobOptions += tempString;
00062       jobOptions += "\n";
00063     }
00064   }
00065   log << MSG::INFO << "JobOptions: " << endreq
00066       << jobOptions << endreq;
00067   return jobOptions;
00068 }

TTree * RootInterface::getOtherTree ( const std::string  treename  )  [private, virtual]

get tree from other files 2005-11-28

Definition at line 392 of file RootInterface.cxx.

References EvtCyclic3::c_str(), calibUtil::ERROR, false, Bes_Common::INFO, inputFiles, log, m_currentFileName, m_ENDFILE, m_entries, m_EOF, m_fileNames, m_fileNum, m_otherTrees, and printJobInfo().

Referenced by setBranchAddress().

00392                                                            {
00393   //get other TTree for input
00394   log<<MSG::INFO<<"RootInterface:;getOtherTree"<<endreq;
00395   m_ENDFILE = false ;
00396   if(m_otherTrees[m_fileNum]) return m_otherTrees[m_fileNum];
00397   // TFile* inputFile = new TFile(m_fileNames[m_fileNum].c_str(),"READ");
00398   inputFiles[m_fileNum] =  TFile::Open(m_fileNames[m_fileNum].c_str(),"READ");
00399    
00400   if(!inputFiles[m_fileNum]->IsOpen()){
00401     log<<MSG::ERROR<<"ROOT File" <<inputFiles[m_fileNum]->GetName()<<"Coult not be opened for reading."<<endreq;
00402     delete inputFiles[m_fileNum];
00403     inputFiles[m_fileNum] = NULL;
00404     return NULL; // The Root can not be opened
00405   }
00406   m_EOF = false;
00407   log<<MSG::INFO<<"RootIntrFace:;Opened File for input:"<<m_fileNames[m_fileNum].c_str()<<endreq;
00408   m_currentFileName = m_fileNames[m_fileNum].c_str(); //liangyt 2008-11-19
00409 
00410   TTree* tree =(TTree*)inputFiles[m_fileNum]->Get(treename.c_str());//the same tree name;
00411   if(!tree){
00412     log << MSG::ERROR << "ROOT file " << inputFiles[m_fileNum]->GetName()
00413         << " does not contain requested TTree: " << treename <<endreq;
00414     return NULL;
00415   }
00416 
00417   if(tree->GetEntries()<=0)
00418   {
00419     log << MSG::ERROR << "ROOT file "<< m_fileNames[m_fileNum].c_str()<< " entries <= 0" << endreq;
00420     exit(1);
00421   }
00422   
00423   m_otherTrees[m_fileNum] = tree;
00424   if (m_entries<=0){
00425     m_entries=(Int_t)tree->GetEntries();
00426     log<<MSG::INFO<<"m_entries  =  "<<m_entries<<endreq;
00427   }
00428 
00429   printJobInfo(inputFiles[m_fileNum],0);
00430 
00431   //delete inputFile;
00432   // inputFile= NULL;
00433   return tree; 
00434 }

virtual bool RootInterface::getSelectFromTag (  )  [inline, virtual]

Definition at line 63 of file RootInterface.h.

References m_selectFromTag.

Referenced by RootEventBaseCnv::createObj(), and RootEvtSelector::next().

00063 { return m_selectFromTag;}

virtual std::vector<std::string> RootInterface::getTagInputFile (  )  [inline, virtual]

Definition at line 69 of file RootInterface.h.

References m_tagInputFile.

Referenced by RootEvtSelector::getEntryFromTag().

00069 {return m_tagInputFile;}

virtual int RootInterface::getTotalFileNum (  )  [inline, virtual]

Definition at line 66 of file RootInterface.h.

References m_fileNames.

Referenced by RootEvtSelector::getEntryFromTag(), and TagWriterAlg::initialize().

00066 {return m_fileNames.size();}

std::vector< int > RootInterface::getTotEvtNo (  )  [virtual]

Definition at line 89 of file RootInterface.cxx.

References DataInfoSvc::getTotEvtNo(), Bes_Common::INFO, log, and Bes_Common::WARNING.

Referenced by finalize().

00090 {
00091   ISvcLocator* svcLocator = Gaudi::svcLocator();
00092   IDataInfoSvc *tmpInfoSvc;
00093   DataInfoSvc* jobInfoSvc;
00094   std::vector<int> totEvtNo;
00095   StatusCode status = svcLocator->service("DataInfoSvc",tmpInfoSvc);
00096   if (status.isSuccess()) {
00097     log << MSG::INFO << "get the DataInfoSvc" << endreq;
00098     jobInfoSvc=dynamic_cast<DataInfoSvc *>(tmpInfoSvc);
00099     totEvtNo = jobInfoSvc->getTotEvtNo();
00100     log << MSG::INFO << "get total event number for each run" << endreq;
00101   }else {
00102     log << MSG::WARNING << "could not get the DataInfoSvc. Ignore it." << endreq;
00103   }
00104   return totEvtNo;
00105 }

TTree * RootInterface::getTree ( const std::string  treename  )  [private, virtual]

get tree

Definition at line 267 of file RootInterface.cxx.

References EvtCyclic3::c_str(), calibUtil::ERROR, getTreeNr(), Bes_Common::INFO, log, m_currentFileName, m_entries, m_EOF, m_fileNames, m_inputFiles, m_inputTrees, and printJobInfo().

Referenced by setBranchAddress().

00268 {
00269 
00270   // get TTree for input
00271   log<<MSG::INFO<<"RootInterface:;getTree"<<endreq; 
00272   unsigned int treenr;
00273   getTreeNr(treename,treenr);
00274  
00275   if (m_inputTrees[treenr]) return m_inputTrees[treenr];
00276   if (!m_inputFiles[treenr] ) {
00277    m_inputFiles[treenr] = TFile::Open(m_fileNames[treenr].c_str(), "READ");
00278    if (!m_inputFiles[treenr]->IsOpen()) {
00279      log << MSG::ERROR << "ROOT file " << m_inputFiles[treenr]->GetName()
00280          << " could not be opened for reading." << endreq;
00281      delete m_inputFiles[treenr];
00282      m_inputFiles[treenr]=NULL;
00283      m_EOF=true;
00284      return NULL;
00285    }
00286   }
00287   log << MSG::INFO << "RootInterface::opened file for input:" << m_fileNames[treenr].c_str() <<endreq;
00288   m_currentFileName = m_fileNames[treenr].c_str();  //liangyt 2008-11-19
00289   TTree *tree= (TTree *)m_inputFiles[treenr]->Get(treename.c_str());
00290   if (!tree) {
00291     log << MSG::ERROR << "ROOT file " << m_inputFiles[treenr]->GetName()
00292         << " does not contain requested TTree: " << treename <<endreq;
00293     return NULL;
00294   }
00295   if (tree->GetEntries()<=0)
00296   {
00297     log << MSG::ERROR << "ROOT file "<< m_inputFiles[treenr]->GetName()<< " entries <= 0" << endreq;
00298     exit(1);
00299   }
00300 
00301   m_inputTrees[treenr]=tree;
00302   if (m_entries<=0 ) {
00303     m_entries=(Int_t)tree->GetEntries();
00304   }
00305 
00306   printJobInfo( m_inputFiles[treenr],1);
00307   
00308   return tree;
00309 }

StatusCode RootInterface::getTreeNr ( const std::string  treename,
unsigned int &  treenr,
bool  doAdd = false 
) [private, virtual]

get treenr from treename

Definition at line 581 of file RootInterface.cxx.

References calibUtil::ERROR, log, m_bufSizes, m_compressionLevels, m_inputFilenames, m_inputFiles, m_inputTrees, m_outputFilenames, m_outputFiles, m_outputTrees, m_splitModes, m_treenames, and boss::where().

Referenced by addInput(), addOutput(), checkEndOfTree(), createBranch(), and getTree().

00581                                                                                             {
00582   // look whether this tree has already got a number
00583   // if not, add it
00584   std::vector<std::string>::iterator where=std::find(m_treenames.begin(),m_treenames.end(),treename);
00585   if (where == m_treenames.end()) {
00586     if (doAdd) {
00587      treenr=m_treenames.size();
00588      m_treenames.push_back(treename);
00589      m_inputFilenames.push_back("");
00590      m_inputFiles.push_back(NULL);
00591      m_inputTrees.push_back(NULL);
00592      m_outputFilenames.push_back("");
00593      m_outputFiles.push_back(NULL);
00594      m_outputTrees.push_back(NULL);
00595      m_splitModes.push_back(0);
00596      m_bufSizes.push_back(0);
00597      m_compressionLevels.push_back(0);
00598      return StatusCode::SUCCESS;
00599     }else {
00600       log << MSG::ERROR << "Invalid tree name: " <<treename<< endreq;
00601       return StatusCode::FAILURE;
00602     }
00603   }
00604   treenr=where-m_treenames.begin();
00605   return StatusCode::SUCCESS;
00606 }

RootInterface * RootInterface::Instance ( MsgStream  log  )  [static]

singleton behaviour

Definition at line 25 of file RootInterface.cxx.

References m_rootInterface, and RootInterface().

Referenced by MixerAlg::execute(), TagWriterAlg::initialize(), RootEvtSelector::initialize(), RootCnvSvc::RootCnvSvc(), RootEventBaseCnv::RootEventBaseCnv(), and BesVisAlg::write2file().

00025                                                     {
00026   if (m_rootInterface) return m_rootInterface;
00027   m_rootInterface=new RootInterface(log);
00028   return m_rootInterface;
00029 }

void RootInterface::printJobInfo ( TFile *  file,
int  level 
) [virtual]

Definition at line 311 of file RootInterface.cxx.

References TJobInfo::getBossVer(), TJobInfo::getDecayOptions(), TJobInfo::getJobOptions(), TJobInfo::getTotEvtNo(), genRecEmupikp::i, Bes_Common::INFO, log, m_bossVer, m_decayOptions, m_jobOptions, m_totEvtNo, DataInfoSvc::setTotEvtNo(), and Bes_Common::WARNING.

Referenced by getOtherTree(), and getTree().

00312 {
00313   TTree* tree2  = (TTree *)file->Get("JobInfoTree");
00314   if(!tree2)
00315   {
00316     std::cout<<"no JobInfoTree for file "<<file->GetName()<<std::endl;
00317     exit(1);
00318   }
00319   else
00320   {
00321     log << MSG::INFO << "get JobInfoTree" << endreq;
00322     TBranch* branch = tree2->GetBranch("JobInfo");
00323     if(!branch)
00324     { 
00325       std::cout<<"ERROR! No branch in JobInfoTree"<<std::endl;
00326       exit(1);
00327     }
00328     else
00329     {
00330       TJobInfo* jobInfo= new TJobInfo;
00331       branch->SetAddress(&jobInfo);
00332       branch->GetEntry(0);
00333       m_bossVer = jobInfo->getBossVer() ;
00334       std::cout<<std::endl
00335              << "**************************************************" << std::endl
00336              <<"Print JobInfo for data file: "<< file->GetName()<<std::endl
00337              << "          BOSS version: "<< m_bossVer << std::endl
00338              << "**************************************************" << std::endl
00339              << std::endl;
00340 
00341       m_decayOptions = jobInfo->getDecayOptions();
00342       if(m_decayOptions.size()>0)
00343       {
00344         std::cout<< std::endl
00345                  <<"**************************************************" << std::endl
00346                  <<"          Decay Options: "<<std::endl
00347                  <<m_decayOptions << std::endl
00348                  <<"**************************************************" << std::endl
00349                  << std::endl;
00350       }
00351 
00352       ISvcLocator* svcLocator = Gaudi::svcLocator();
00353       IDataInfoSvc *tmpInfoSvc;
00354       DataInfoSvc* jobInfoSvc;
00355       StatusCode status = svcLocator->service("DataInfoSvc",tmpInfoSvc);
00356       if (status.isSuccess()) {
00357       log << MSG::INFO << "get the DataInfoSvc" << endreq;
00358       jobInfoSvc=dynamic_cast<DataInfoSvc *>(tmpInfoSvc);
00359       }else {
00360        log << MSG::WARNING << "could not get the DataInfoSvc." << endreq;
00361       }
00362  
00363       m_totEvtNo = jobInfo->getTotEvtNo();
00364       jobInfoSvc->setTotEvtNo(m_totEvtNo);
00365 
00366       if(level>0)
00367       {    
00368         std::cout<<std::endl
00369                  <<"**************************************************" << std::endl
00370                  <<"          JobOptions for this data file: " << std::endl
00371                  << std::endl;
00372       
00373                
00374         m_jobOptions = jobInfo->getJobOptions();
00375         vector<std::string> vs = m_jobOptions;
00376         int nv = vs.size();
00377         if(nv>0)
00378         {
00379           for(int i=0;i<nv;i++)
00380           {
00381             std::cout<<vs[i]<<std::endl;
00382             std::cout<<"          end of the jobOptions file " << std::endl; 
00383             std::cout<<"**************************************************" << std::endl
00384                      <<std::endl;
00385           }
00386         }
00387       }
00388     }
00389   } 
00390 }

StatusCode RootInterface::setBranchAddress ( const std::string  treename,
const std::string  branchname,
void *  addr,
int &  nb 
) [virtual]

set branch address

Definition at line 496 of file RootInterface.cxx.

References Bes_Common::DEBUG, calibUtil::ERROR, getOtherTree(), getTree(), log, m_branchesRead, and m_fileNum.

Referenced by RootEventBaseCnv::createObj().

00497 {
00498   log << MSG::DEBUG <<"RootInterface::setbranch address, treename: "<<treename <<", branch "<<branchname <<endreq;
00499 
00500   branchnr=-1;
00501   
00502   TTree * tree;
00503   
00504   if(m_fileNum != 0){
00505    
00506     tree = getOtherTree(treename);
00507   }else{
00508     tree = getTree(treename);
00509   } 
00510     
00511   //TTree * tree = getTree("Dst");
00512   if (!tree) {
00513     log << MSG::ERROR << "Could not find tree " << treename <<endreq;
00514     log << MSG::ERROR << "terminate the process handly"<<endreq;
00515     exit(1);
00516     return StatusCode::FAILURE;
00517   }
00518   tree->SetMakeClass(1);  // necessary for separate branch reading (segv otherwise)!
00519 
00520   //   log << MSG::INFO <<"ok!!!!!!!!!!!!!11"<<endreq; 
00521   TBranch *b = tree->GetBranch(branchname.c_str());
00522   if (!b) {
00523     //tree->Print();
00524     log << MSG::DEBUG << "Could not find branch xx" << branchname <<"xx"<<endreq;
00525     return StatusCode::FAILURE;
00526   }
00527   // log << MSG::INFO <<"ok!!!!!!!!!!!!!22"<<endreq;
00528   // log << MSG::INFO <<"ok!!!!!!!!!!!!!22"<<(*addr)<<endreq; 
00529   b->SetAddress(addr);  
00530   // log << MSG::INFO <<"ok!!!!!!!!!!!!!33"<<endreq;  
00531   branchnr=m_branchesRead->GetEntries();
00532   // log << MSG::INFO <<"ok!!!!!!!!!!!!!44"<<endreq;
00533   TClonesArray &a = *m_branchesRead;
00534   m_branchesRead->Expand(branchnr+1);
00535   a[branchnr]=b;
00536   return StatusCode::SUCCESS;
00537 }

virtual void RootInterface::setSelectFromTag ( bool  temp  )  [inline, virtual]

Definition at line 62 of file RootInterface.h.

References m_selectFromTag.

Referenced by RootCnvSvc::initialize().

00062 {m_selectFromTag = temp;}

void RootInterface::setTagInputFile ( std::vector< std::string input  )  [virtual]

Definition at line 179 of file RootInterface.cxx.

References Bes_Common::DEBUG, genRecEmupikp::i, log, and m_tagInputFile.

Referenced by RootEvtSelector::initialize(), and RootCnvSvc::initialize().

00180 {
00181 
00182   for(int i=0; i<input.size(); i++)
00183   {
00184     log << MSG::DEBUG <<"input tag file: "<<i<<" "<<input[i]<<endreq;
00185     m_tagInputFile.push_back(input[i]);
00186   }
00187 }


Member Data Documentation

std::vector<TFile *> RootInterface::inputFiles [private]

vector of input files

Definition at line 91 of file RootInterface.h.

Referenced by addInput(), checkEndOfTree(), and getOtherTree().

MsgStream RootInterface::log [private]

instance of message stream transmitted at construction

Definition at line 138 of file RootInterface.h.

Referenced by addInput(), addOutput(), createBranch(), createTree(), f_addOutput(), f_createBranch(), f_createTree(), f_fillTrees(), f_finalize(), f_getTreeNr(), fillTrees(), finalize(), getBranchEntry(), getDecayOptions(), getJobOptions(), getOtherTree(), getTotEvtNo(), getTree(), getTreeNr(), printJobInfo(), setBranchAddress(), and setTagInputFile().

std::string RootInterface::m_bossVer [private]

Definition at line 144 of file RootInterface.h.

Referenced by finalize(), and printJobInfo().

TClonesArray* RootInterface::m_branches [private]

array of branch pointers for writing

Definition at line 126 of file RootInterface.h.

Referenced by createBranch(), and RootInterface().

TClonesArray* RootInterface::m_branchesRead [private]

array of branch pointers for reading

Definition at line 129 of file RootInterface.h.

Referenced by getBranchEntry(), RootInterface(), and setBranchAddress().

std::vector<int> RootInterface::m_bufSizes [private]

vector of buffer sizes

Definition at line 120 of file RootInterface.h.

Referenced by addOutput(), createBranch(), and getTreeNr().

std::vector<int> RootInterface::m_compressionLevels [private]

vector of compression levels

Definition at line 122 of file RootInterface.h.

Referenced by addOutput(), createTree(), and getTreeNr().

std::string RootInterface::m_currentFileName [private]

Definition at line 94 of file RootInterface.h.

Referenced by addInput(), checkEndOfTree(), getCurrentFileName(), getOtherTree(), and getTree().

std::string RootInterface::m_decayOptions [private]

Definition at line 145 of file RootInterface.h.

Referenced by finalize(), and printJobInfo().

bool RootInterface::m_ENDFILE [private]

signed the tree is end 2005-11-30

Definition at line 102 of file RootInterface.h.

Referenced by checkEndOfTree(), getENDFILE(), getOtherTree(), and RootInterface().

Int_t RootInterface::m_entries [private]

number of entries (<0 if not yet known)

Definition at line 135 of file RootInterface.h.

Referenced by checkEndOfTree(), getEntries(), getOtherTree(), getTree(), and RootInterface().

bool RootInterface::m_EOF [private]

EOF flag.

Definition at line 132 of file RootInterface.h.

Referenced by checkEndOfTree(), getBranchEntry(), getEOF(), getOtherTree(), getTree(), and RootInterface().

std::vector<std::string> RootInterface::m_fileNames [private]

files 2005-11-28

Definition at line 93 of file RootInterface.h.

Referenced by addInput(), checkEndOfTree(), getOtherTree(), getTotalFileNum(), and getTree().

int RootInterface::m_fileNum [private]

the number of the using files 2005-11-29

Definition at line 100 of file RootInterface.h.

Referenced by checkEndOfTree(), getCurrentFileNum(), getOtherTree(), RootInterface(), and setBranchAddress().

std::vector<std::string> RootInterface::m_inputFilenames [private]

vector of input filenames used

Definition at line 106 of file RootInterface.h.

Referenced by addInput(), and getTreeNr().

std::vector<TFile *> RootInterface::m_inputFiles [private]

vector of input files

Definition at line 114 of file RootInterface.h.

Referenced by addInput(), checkEndOfTree(), getTree(), and getTreeNr().

std::vector<TTree *> RootInterface::m_inputTrees [private]

vector of input trees

Definition at line 110 of file RootInterface.h.

Referenced by addInput(), checkEndOfTree(), getTree(), and getTreeNr().

std::vector<std::string> RootInterface::m_jobOptions [private]

Definition at line 143 of file RootInterface.h.

Referenced by finalize(), and printJobInfo().

std::vector<TTree *> RootInterface::m_otherTrees [private]

vector of other trees created from others files 2005-11-28

Definition at line 89 of file RootInterface.h.

Referenced by addInput(), checkEndOfTree(), and getOtherTree().

std::vector<std::string> RootInterface::m_outputFilenames [private]

vector of output filenames used

Definition at line 108 of file RootInterface.h.

Referenced by addOutput(), createBranch(), createTree(), fillTrees(), finalize(), and getTreeNr().

std::vector<TFile *> RootInterface::m_outputFiles [private]

vector of output files

Definition at line 116 of file RootInterface.h.

Referenced by addOutput(), createTree(), fillTrees(), finalize(), and getTreeNr().

std::vector<TTree *> RootInterface::m_outputTrees [private]

vector of output trees

Definition at line 112 of file RootInterface.h.

Referenced by addOutput(), createBranch(), createTree(), fillTrees(), finalize(), and getTreeNr().

RootInterface * RootInterface::m_rootInterface = 0 [static, private]

static singleton pointer

Definition at line 141 of file RootInterface.h.

Referenced by Instance().

bool RootInterface::m_selectFromTag [private]

Definition at line 95 of file RootInterface.h.

Referenced by getSelectFromTag(), and setSelectFromTag().

std::vector<int> RootInterface::m_single_bufSizes [private]

Definition at line 155 of file RootInterface.h.

Referenced by f_addOutput(), f_createBranch(), and f_getTreeNr().

std::vector<int> RootInterface::m_single_compressionLevels [private]

Definition at line 156 of file RootInterface.h.

Referenced by f_addOutput(), f_createTree(), and f_getTreeNr().

std::vector<std::string> RootInterface::m_single_outputFileNames [private]

Definition at line 151 of file RootInterface.h.

Referenced by f_addOutput(), f_createTree(), and f_getTreeNr().

std::vector<TFile *> RootInterface::m_single_outputFiles [private]

Definition at line 152 of file RootInterface.h.

Referenced by f_addOutput(), f_createTree(), f_finalize(), and f_getTreeNr().

std::vector<TTree *> RootInterface::m_single_outputTrees [private]

Definition at line 153 of file RootInterface.h.

Referenced by f_addOutput(), f_createBranch(), f_createTree(), f_fillTrees(), f_finalize(), and f_getTreeNr().

std::vector<int> RootInterface::m_single_splitModes [private]

Definition at line 154 of file RootInterface.h.

Referenced by f_addOutput(), f_createBranch(), and f_getTreeNr().

std::vector<std::string> RootInterface::m_single_treenames [private]

Definition at line 150 of file RootInterface.h.

Referenced by f_getTreeNr().

std::vector<int> RootInterface::m_splitModes [private]

vector of splitmodes

Definition at line 118 of file RootInterface.h.

Referenced by addOutput(), createBranch(), and getTreeNr().

std::vector<std::string> RootInterface::m_tagInputFile [private]

Definition at line 96 of file RootInterface.h.

Referenced by getTagInputFile(), and setTagInputFile().

std::vector<int> RootInterface::m_totEvtNo [private]

Definition at line 146 of file RootInterface.h.

Referenced by finalize(), and printJobInfo().

std::vector<std::string> RootInterface::m_treenames [private]

vector of treenames used

Definition at line 104 of file RootInterface.h.

Referenced by getTreeNr().


Generated on Tue Nov 29 23:35:52 2016 for BOSS_7.0.2 by  doxygen 1.4.7