//_____________________________________________________________________________ // base class for STNTUPLE data block // // Author: Pasha Murat (CDF/FNAL) // Date: Nov 10 2000 // // TStnDataBlock's are responsible for memory cleanup, the corresponding // branches are created with fAutoDelete = 0; // by default data block is filled with the event data in BookStntupleModule, // if user initialization has been requested (by setting // fInitializedByUser to 1), // BookStntupleModule doesn't fill this block. In this case it is a user // responsibility to fill the block // // initialization of the data block with the event data is done either using // overloaded protected `fInit' function, or //_____________________________________________________________________________ #include #include "TClass.h" #include #include #include const Float_t TStnDataBlock::kUndefined = 1.e6; ClassImp(TStnDataBlock) //_____________________________________________________________________________ TStnDataBlock::TStnDataBlock(): fCollName("none") { // by default initialization is done by the overloaded function fUserInitialization = 0; fExternalInit = 0; fResolveLinks = 0; fLinksInitialized = 0; fInitMode = 0; fNode = 0; fEvent = 0; fMessageList = new TObjArray(10); fCurrentEntry = -1; fValid = 0; f_EventNumber = -1; f_RunNumber = -1; } //_____________________________________________________________________________ TStnDataBlock::~TStnDataBlock() { fMessageList->Delete(); delete fMessageList; } //_____________________________________________________________________________ Int_t TStnDataBlock::GetEntry(Int_t TreeEntry) { // TreeEntry refers to the current entry in the tree, fEntry - in the chain int current_entry = fEvent->GetCurrentEntry(); if (fCurrentEntry == current_entry) return 1; fCurrentEntry = current_entry; return fNode->GetEntry(TreeEntry); } //_____________________________________________________________________________ void TStnDataBlock::SetCollName(const char* Process, const char* Description, const char* CollType) { fCollName = Process; fCollName += "@"; fCollName += Description; if (CollType) { fCollName += ";"; fCollName += CollType; } } //_____________________________________________________________________________ void TStnDataBlock::Print(Option_t* option) const { std::cout << "--------------------------------------" << std::endl; std::cout << "TStnDataBlock Dump for " << fCollName <