|
//____________________________________________________________________ // // Append the output node passed to this container to the input node // // This container is designed to deal with the problem of the // having to access both input (raw) as well as rdo in the same event). // passed in parallel down to all modules, like // // inNode outNode // | | // V V // +-----------------------+ // | BrBbRdoModule | // +-----------------------+ // | | // V V // inNode outNode // | (with BrBbRdo) // | | // V V // +-----------------------+ // | BrCheckVertexModule | ====> Chokes. Can't find BrbbRdo // +-----------------------+ in inNode // | | // inNode outNode // V V // +-----------------------+ // | Ohter Modules | // +-----------------------+ // // So what'd you'd like is for BrCheckModule to recive the outNode // of BrBbRdoModule as _both_ it's input and it's output. That is: // inNode outNode // | | // V V // +-----------------------+ // | BrBbRdoModule | // +-----------------------+ // | | // | V // | outNode // | (with BrMultRdo) // | / | // V V // +-----------------------+ // | BrCheckVertexModule | // +-----------------------+ // | | // inNode outNode // V V // +-----------------------+ // | Ohter Modules | // +-----------------------+ // // This cannot be done in a normal sequence, but this container classes // just that for any modules added. It also avoid any copying of the // data from inNode to outNode. It only creates a temporary branch off the // inNode with the outNode and a module can just add to the output as usual. // // example: // The Module VertexCheckModule needs to read both the raw ZDC data as well as rdo data from // BB and TPM1 tracks (it does not put data on the output node but it could // // BrAppendContainer* appModule = new BrAppendContainer("Append1","Append out to in"); // mainModule->AddModule(appModule); // // VertexCheckModule* vertexCheck = new VertexCheckModule("Vertex Check","BB,ZDc etc check"); // appModule->AddModule(vertexCheck); // // // //____________________________________________________________________ // // $Id: BrAppendContainer.cxx,v 1.3 2002/08/15 17:27:08 videbaek Exp $ // $Author: videbaek $ // $Date: 2002/08/15 17:27:08 $ // $Copyright: (C) 2001 BRAHMS Collaboration <brahmlib@rhic.bnl.gov> // #ifndef BRAT_BrAppendContainer #include "BrAppendContainer.h" #endif #ifndef ROOT_TDirectory #include "TDirectory.h" #endif #ifndef WIN32 #include <iostream> #else #include <iostream.h> #endif //____________________________________________________________________ ClassImp(BrAppendContainer); //____________________________________________________________________ BrAppendContainer::BrAppendContainer() { // Default constructor. DO NOT USE SetState(kSetup); } //____________________________________________________________________ BrAppendContainer::BrAppendContainer(const Char_t* name, const Char_t* title) : BrModuleContainer(name, title) { // Named Constructor SetState(kSetup); fNormalMode = kTRUE; } //____________________________________________________________________ void BrAppendContainer::Event(BrEventNode* inNode, BrEventNode* outNode) { // Per event method SetState(BrModule::kEvent); if (DebugLevel() > 10) cout << "In Node is: " << inNode << " Out Node is: " << outNode << endl; if(fNormalMode){ inNode->AddObject(outNode); BrModuleContainer::Event(inNode, outNode); inNode->RemoveDataObject(outNode); } else { outNode->AddObject(inNode); BrModuleContainer::Event(inNode, outNode); outNode->RemoveDataObject(inNode); } } //____________________________________________________________________ void BrAppendContainer::Print(Option_t* option) const { // Print module information // See BrModule::Print for options. // In addition this module defines the Option: // <fill in here> TString opt(option); opt.ToLower(); BrModuleContainer::Print(option); if (opt.Contains("d")) cout << endl << " Original author: Flemming Videbaek" << endl << " Last Modifications: " << endl << " $Author: videbaek $" << endl << " $Date: 2002/08/15 17:27:08 $" << endl << " $Revision: 1.3 $ " << endl << endl << "-------------------------------------------------" << endl; } |
||||||
This page automatically generated by script docBrat by Christian Holm |
Copyright ; 2002 BRAHMS Collaboration
<brahmlib@rcf.rhic.bnl.gov>
|