|
//____________________________________________________________________ // // Module to copy event header from input to output node - nothing // more, nothing less. // //____________________________________________________________________ // $Id: BrHeaderModule.cxx,v 1.2 2001/12/14 15:41:16 cholm Exp $ // $Author: cholm $ // $Date: 2001/12/14 15:41:16 $ // $Copyright: 2001 BRAHMS Collaboration <brahmlib@rhic.bnl.gov> // #ifndef BRAT_BrHeaderModule #include "BrHeaderModule.h" #endif #ifndef ROOT_TDirectory #include "TDirectory.h" #endif #ifndef BRAT_BrEvent #include "BrEvent.h" #endif #ifndef BRAT_BrEventHeader #include "BrEventHeader.h" #endif #include <iostream.h> //____________________________________________________________________ ClassImp(BrHeaderModule); //____________________________________________________________________ BrHeaderModule::BrHeaderModule() {} //____________________________________________________________________ BrHeaderModule::BrHeaderModule(const Char_t* name, const Char_t* title) : BrModule(name, title) { // Named constructor SetState(kSetup); } //____________________________________________________________________ void BrHeaderModule::Event(BrEventNode* inNode, BrEventNode* outNode) { // Main method. Process one event. SetState(kEvent); Reset(); if (DebugLevel() > 9) inNode->Print(""); if (inNode->IsA() != BrEvent::Class()) { Stop("Event", "Input node is not an event"); return; } if (outNode->IsA() != BrEvent::Class()) { Stop("Event", "Output node is not an event"); return; } BrEventHeader* header = ((BrEvent*)inNode)->GetEventHeader(); if (!header) { Stop("Event", "Couldn't get header from input"); return; } ((BrEvent*)outNode)->GetEventHeader()->SetEventHeader(header); Info(10 ,"Event", "Event Header: %d.%d - %d", ((BrEvent*)outNode)->GetRunNumber(), ((BrEvent*)outNode)->GetEventNumber(), ((BrEvent*)outNode)->GetDate()); } //____________________________________________________________________ void BrHeaderModule::Print(Option_t* option) const { // Module Information method // // Options: (see also BrModule::Print) // TString opt(option); opt.ToLower(); BrModule::Print(option); if (opt.Contains("d")) cout << endl << " Original author: Christian Holm Christensen" << endl << " Revisted by: $Author: cholm $" << endl << " Revision date: $Date: 2001/12/14 15:41:16 $" << endl << " Revision number: $Revision: 1.2 $ " << endl << endl << "-------------------------------------------------" << endl; } |
||||||
This page automatically generated by script docBrat by Christian Holm |
Copyright ; 2002 BRAHMS Collaboration
<brahmlib@rcf.rhic.bnl.gov>
|