00001 00014 /*************************************************************************** 00015 * 00016 * $Id: StEventClusteringHints.h,v 2.8 2003/09/02 17:58:05 perev Exp $ 00017 * 00018 * Author: Thomas Ullrich, Apr 2001 00019 *************************************************************************** 00020 * 00021 * Description: Class to provide clustering hints for StEvent I/O. 00022 * The class can distinguish between two modes 00023 * miniDST and DST mode in which clustering hints 00024 * are different. 00025 * With clustering hints we mean the association 00026 * of a class stored *directly* in the StEvent class 00027 * (StEvent::mContent) and the name of the branch it 00028 * will be written to. 00029 * 00030 *************************************************************************** 00031 * 00032 * $Log: StEventClusteringHints.h,v $ 00033 * Revision 2.8 2003/09/02 17:58:05 perev 00034 * gcc 3.2 updates + WarnOff 00035 * 00036 * Revision 2.7 2002/02/22 22:56:47 jeromel 00037 * Doxygen basic documentation in all header files. None of this is required 00038 * for QM production. 00039 * 00040 * Revision 2.6 2001/05/30 17:45:54 perev 00041 * StEvent branching 00042 * 00043 * Revision 2.5 2001/05/01 03:48:36 ullrich 00044 * Added branch IDs. 00045 * 00046 * Revision 2.4 2001/04/23 19:28:53 ullrich 00047 * Inherit from StObject. Not a singleton anymore. 00048 * 00049 * Revision 2.3 2001/04/20 00:50:49 ullrich 00050 * Added new query methods. 00051 * 00052 * Revision 2.2 2001/04/11 03:44:07 ullrich 00053 * Added namespaces for Sun CC5. 00054 * 00055 * Revision 2.1 2001/04/06 17:47:20 ullrich 00056 * Initial Revision 00057 * 00058 **************************************************************************/ 00059 #ifndef StEventClusteringHints_hh 00060 #define StEventClusteringHints_hh 00061 00062 #include <map> 00063 #include <string> 00064 #include <vector> 00065 #include <Stiostream.h> 00066 #include "StObject.h" 00067 #if !defined(ST_NO_NAMESPACES) 00068 using std::map; 00069 using std::string; 00070 using std::vector; 00071 #endif 00072 00073 class StEventClusteringHints : public StObject { 00074 public: 00075 StEventClusteringHints(); 00076 virtual ~StEventClusteringHints(); 00077 00078 void setDstMode(); // switch to DST mode 00079 void setMiniDstMode(); // switch to miniDST mode 00080 const char* branchName(const char*) const; // get branch name for given class name 00081 int branchId(const char*) const; // return unique ID for given branch 00082 void SetParent(TObject *par){fParent=par;} 00083 #if !defined(__CINT__) 00084 vector<string> listOfBranches() const; // list of all branches for given mode (miniDST or DST) 00085 vector<string> listOfClasses() const; // list of all top level classes known 00086 vector<string> listOfClasses(const char*) const; // list of all top level classes for a given branch 00087 #endif 00088 00089 void setBranch(const char*, const char*, int); // assign classname with a branch name (incl. ID) 00090 void print(ostream& = cout); // print current configuration 00091 00092 private: 00093 StEventClusteringHints(const StEventClusteringHints&); 00094 00095 private: 00096 TObject *fParent; 00097 map<string,string> *mNameMap; 00098 map<string,string> mDstMap; 00099 map<string,string> mMiniDstMap; 00100 map<string, int> mBranchIds; 00101 00102 ClassDef(StEventClusteringHints,1) 00103 }; 00104 #endif
1.5.9