--- PamCut/CollectionActions/SaveEventsAction/SaveEventsAction.cpp 2010/03/10 08:49:42 1.3 +++ PamCut/CollectionActions/SaveEventsAction/SaveEventsAction.cpp 2010/06/03 14:30:48 1.3.2.1 @@ -9,8 +9,10 @@ #include "SaveEventsAction.h" -SaveEventsAction::SaveEventsAction(const char *actionName, TString outFileName, TString outOptions) : - CollectionAction(actionName), _outTreeFile(NULL), _events(NULL), _outOptions(outOptions), _outFileName(outFileName) { +SaveEventsAction::SaveEventsAction(const char *actionName, TString outFileName, TString outOptions, + Long64_t maxFileSize) : + CollectionAction(actionName), _outTreeFile(NULL), _events(NULL), _outOptions(outOptions), _outFileName(outFileName), + _maxFileSize(maxFileSize) { } @@ -36,6 +38,42 @@ if (_outOptions.Length() > 0) _events->SetWhichTrees(_outOptions); _events->CreateCloneTrees(_outTreeFile); + + // Set the output file size + TTree * currTree = NULL; + if (currTree = _events->GetCloneTree("Run")) + currTree->SetMaxTreeSize(_maxFileSize); + currTree = NULL; + if (currTree = _events->GetCloneTree("SelectionList")) + currTree->SetMaxTreeSize(_maxFileSize); + currTree = NULL; + if (currTree = _events->GetCloneTree("Tracker")) + currTree->SetMaxTreeSize(_maxFileSize); + currTree = NULL; + if (currTree = _events->GetCloneTree("Calorimeter")) + currTree->SetMaxTreeSize(_maxFileSize); + currTree = NULL; + if (currTree = _events->GetCloneTree("ToF")) + currTree->SetMaxTreeSize(_maxFileSize); + currTree = NULL; + if (currTree = _events->GetCloneTree("Trigger")) + currTree->SetMaxTreeSize(_maxFileSize); + currTree = NULL; + if (currTree = _events->GetCloneTree("S4")) + currTree->SetMaxTreeSize(_maxFileSize); + currTree = NULL; + if (currTree = _events->GetCloneTree("NeutronD")) + currTree->SetMaxTreeSize(_maxFileSize); + currTree = NULL; + if (currTree = _events->GetCloneTree("Anticounter")) + currTree->SetMaxTreeSize(_maxFileSize); + currTree = NULL; + if (currTree = _events->GetCloneTree("OrbitalInfo")) + currTree->SetMaxTreeSize(_maxFileSize); + currTree = NULL; + if (currTree = _events->GetCloneTree("h20")) + currTree->SetMaxTreeSize(_maxFileSize); + } void SaveEventsAction::OnGood(PamLevel2 *event) {