#include <StMuChainMaker.h>
Public Member Functions | |
| StMuChainMaker (const char *name="MuDst") | |
| virtual | ~StMuChainMaker () |
| TChain * | make (string dir, string file, string filter, int maxFiles=10) |
| void | fromFileCatalog (string file) |
| void | fromList (string file) |
| void | fromFile (string file) |
| void | fromDir (string dir) |
| void | subFilter (string filter) |
| string | basename (string) |
| string | dirname (string) |
| string | buildFileName (string dir, string fileName, string extention) |
Static Public Member Functions | |
| static void | setUseFileCatalog (const char *connection="mysql://duvall.star.bnl.gov:3306/FileCatalog_BNL") |
Protected Member Functions | |
| bool | pass (string file, string *filters) |
| void | add (StMuStringIntPairVector) |
| void | add (StMuStringIntPair) |
| This method contains a hidden assumption for STAR Scheduler purposes. | |
Protected Attributes | |
| TChain * | mChain |
| StMuDbReader * | mDbReader |
| string | mSubFilters [100] |
| string | mTreeName |
| int | mFileCounter |
| int | mMaxFiles |
| StMuStringIntPairVector | mFileList |
Static Protected Attributes | |
| static string | mSQLConnection = "" |
Definition at line 29 of file StMuChainMaker.h.
| StMuChainMaker::~StMuChainMaker | ( | ) | [virtual] |
Destructor: The TChain will not be deleted since it is passed to the outside.
Definition at line 50 of file StMuChainMaker.cxx.
| string StMuChainMaker::basename | ( | string | s | ) |
Return the input string's basename by stripping of all characters from the first '.' to the end and all characters after the last '/'.
Definition at line 73 of file StMuChainMaker.cxx.
Referenced by dirname().
| string StMuChainMaker::buildFileName | ( | string | dir, | |
| string | fileName, | |||
| string | extention | |||
| ) |
Returns a full filename, simply concats the three arguments 'dir', 'fileName' and extention
Definition at line 61 of file StMuChainMaker.cxx.
| string StMuChainMaker::dirname | ( | string | s | ) |
Return a inputs string's directory name by erasing the basename() and all charcters after the last '/'. If the only remaining character is '/' and empty string "" will be returned.
Definition at line 91 of file StMuChainMaker.cxx.
References basename().
| void StMuChainMaker::fromFileCatalog | ( | string | file | ) |
| TChain * StMuChainMaker::make | ( | string | dir, | |
| string | file, | |||
| string | filter, | |||
| int | maxFiles = 10 | |||
| ) |
Parses the input strings. Multiple sub-filters will be built our of 'filter'. Here, ":" separates the individual filter strings (e.g. "MuDst:st_physics_2:raw_0001" will accept only files which have all of the sub-strings "MuDst", "st_physics_2" and "raw_0001" in them.
A TChain will be built for files matching the sub filters (in all cases). The chain will be returned.
There are a few caveats
Definition at line 126 of file StMuChainMaker.cxx.
1.5.9