• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

onlinemonitor/spadicV10monitor/TSpadicV10Event.cxx (r4864/r3721)

Go to the documentation of this file.
00001 #include "TSpadicV10Event.h"
00002 
00003 #include "TGo4Log.h"
00004 
00005 //void TSpadicV10MessageExtended::Print( unsigned kind ) const
00006 //{
00007 //    fxMessage.printData( kind, fuFulltime >> 14 );
00008 //}
00009 
00010 TSpadicV10Data::TSpadicV10Data() : TGo4EventElement()
00011 {
00012 }
00013 
00014 TSpadicV10Data::TSpadicV10Data(const char* name, Short_t id) :
00015    TGo4EventElement(name,name,id)
00016 {
00017    TGo4Log::Info("TSpadicV10Data: Create instance %s with composite id %d", name, id);
00018    // the following are not cleared between events, but initialized at on submit:
00019    fLastTriggerTm=0;
00020    for(int snc=0; snc<MAX_SPADICV10_SYNC;++snc)
00021       fLastSyncTm[snc]=0;
00022 }
00023 
00024 
00025 TSpadicV10Data::~TSpadicV10Data()
00026 {
00027 }
00028 
00029 void  TSpadicV10Data::Clear(Option_t *t)
00030 {
00031    fExtMessages.clear();
00032    //vMessageEventBuffer.clear();
00033    // note: we do not clear last trigger/sync timestamps here
00034 }
00035 
00036 
00037 //====================================================================================
00038 
00039 
00040 Bool_t  TSpadicV10Event::ConfigBoards[MAX_SPADICV10_BOARDS] = SET_SPADICV10_BOARDS;
00041 
00042 
00043 
00044 TSpadicV10Event::TSpadicV10Event(const char* name, Short_t id) :
00045    TGo4CompositeEvent(name,name,id)
00046 {
00047    TGo4Log::Info("TSpadicV10Event: Create instance %s with composite id %d", name, id);
00048    TString modname;
00049    for(int brd=0; brd<MAX_SPADICV10_BOARDS;brd++) {
00050       if(TSpadicV10Event::ConfigBoards[brd]==0) continue; // skip empty SPADICV10 ids
00051       //modname.Form("SPADICV10%02d%02d",id,roc); // branch names should be unique in complete tree!
00052       modname.Form("SPADICV10-%02d", brd); // however, for better readibility of tree, we assume we have only one spadicv10 composite!
00053       addEventElement(new TSpadicV10Data(modname.Data(),brd));
00054    }
00055 }
00056 
00057 TSpadicV10Event::TSpadicV10Event() :
00058    TGo4CompositeEvent()
00059 {
00060 }
00061 
00062 TSpadicV10Event::~TSpadicV10Event()
00063 {
00064 }
00065 
00066 ULong64_t TSpadicV10Event::CalcGlobalTime(Double_t deltaTrigger)
00067 {
00068    ULong64_t rev=fLastGlobalTriggerTm;
00069    rev+=deltaTrigger;
00070    return rev;
00071 }
00072 

Generated on Tue Dec 10 2013 04:52:23 for ROCsoft by  doxygen 1.7.1