00001 00002 // $Id: NeardetBeamSelect.cxx,v 1.2 2007/03/01 17:15:43 rhatcher Exp $ 00003 // 00004 // A module to select beam events based on timing and trigger source 00005 // 00006 // n.tagg1@physics.ox.ac.uk 00008 #include "NeardetBeamSelect.h" 00009 #include "MessageService/MsgService.h" 00010 #include "MinosObjectMap/MomNavigator.h" 00011 #include "JobControl/JobCModuleRegistry.h" // For JOBMODULE macro 00012 #include "TTree.h" 00013 #include "TFile.h" 00014 #include "RawData/RawDigitDataBlock.h" 00015 #include "RawData/RawRecord.h" 00016 #include "RawData/RawDaqSnarlHeader.h" 00017 #include "DataUtil/GetRawHeader.h" 00018 #include "SpillTiming/SpillTimeFinder.h" 00019 #include "RawData/RawDigit.h" 00020 #include "OnlineUtil/mdTriggerCodes.h" 00021 #include "OnlineUtil/mdSpillData.h" 00022 00023 JOBMODULE(NeardetBeamSelect, "NeardetBeamSelect", 00024 "NeardetBeamSelect"); 00025 00026 CVSID("$Id: NeardetBeamSelect.cxx,v 1.2 2007/03/01 17:15:43 rhatcher Exp $"); 00027 00028 00029 //...................................................................... 00030 00031 NeardetBeamSelect::NeardetBeamSelect() 00032 { 00033 } 00034 00035 //...................................................................... 00036 00037 NeardetBeamSelect::~NeardetBeamSelect() 00038 { 00039 } 00040 00041 //...................................................................... 00042 00043 JobCResult NeardetBeamSelect::Ana(const MomNavigator* mom) 00044 { 00050 00051 const RawDaqSnarlHeader* header = 00052 DataUtil::GetRawHeader<RawDaqSnarlHeader>(mom); 00053 00054 if(!header) return JobCResult::kFailed; 00055 00056 // Look at trigger. 00057 Int_t trigger = header->GetTrigSrc(); 00058 00059 if((trigger & TRIGGER_BIT_SPILL)>0) { 00060 return JobCResult::kPassed; 00061 } 00062 00063 return JobCResult::kFailed; 00064 } 00065 00066 //...................................................................... 00067 00068 const Registry& NeardetBeamSelect::DefaultConfig() const 00069 { 00070 //====================================================================== 00071 // Supply the default configuration for the module 00072 //====================================================================== 00073 static Registry r; // Default configuration for module 00074 00075 // Set name of config 00076 std::string name = this->GetName(); 00077 name += ".config.default"; 00078 r.SetName(name.c_str()); 00079 00080 // Set values in configuration 00081 r.UnLockValues(); 00082 r.LockValues(); 00083 00084 return r; 00085 } 00086 00087 //...................................................................... 00088 00089 void NeardetBeamSelect::Config(const Registry&) 00090 { 00091 //====================================================================== 00092 // Configure the module given the Registry r 00093 //====================================================================== 00094 } 00095 00097 00098
1.3.9.1