#include "htriggertaskset.h"
#include "muEmulation.h"
#include "muEmulationExp.h"
#include "muEmulationSim.h"
#include "muDilepEmulation.h"
#include "muDilepEmulationExp.h"
#include "muDilepEmulationSim.h"
#include "hmuemueventfilter.h"
#include "TObjString.h"
HTriggerTaskSet::HTriggerTaskSet(const Text_t name[],const Text_t title[]) : HTaskSet(name,title) {
isReal = kFALSE;
isExp = kFALSE;
isSimulation = kFALSE;
doFilter = kFALSE;
}
HTriggerTaskSet::HTriggerTaskSet(void) : HTaskSet() {
isReal = kFALSE;
isExp = kFALSE;
isSimulation = kFALSE;
doFilter = kFALSE;
}
HTriggerTaskSet::~HTriggerTaskSet(void) {
}
HTask* HTriggerTaskSet::make(const Char_t *select,const Option_t *option) {
HTaskSet *tasks = new HTaskSet("Trigger","List of Trigger tasks");
parseArguments(select);
if(isReal) {
tasks->add(new HMUEmulation("trigger.emu", "trigger emulation"));
tasks->add(new HMUDilepEmulation("trig.dilep.emu", "trigger dilepton emulation"));
}
if(isExp) {
tasks->add(new HMUEmulationExp("trigger.emu", "trigger emulation exp"));
tasks->add(new HMUDilepEmulationExp("trig.dilep.emu", "trigger dilepton emulation exp"));
}
if(isSimulation) {
tasks->add(new HMUEmulationSim("trigger.emu", "trigger emulation sim"));
if(doFilter)
{
tasks->add(new HMUEmuEventFilter("mu.evtFilter","mu.evtFilter"));
}
}
return tasks;
}
void HTriggerTaskSet::parseArguments(TString s1)
{
s1.ToLower();
s1.ReplaceAll(" ","");
Ssiz_t len=s1.Length();
if(len!=0)
{
Char_t* mystring=(Char_t*)s1.Data();
Char_t* buffer;
TList myarguments;
TObjString *stemp;
TString argument;
Int_t count=0;
while(1)
{
if(count==0)
{
buffer=strtok(mystring,",");
stemp=new TObjString(buffer);
myarguments.Add(stemp);
}
if(!(buffer=strtok(NULL,",")))
{
break;
}
stemp=new TObjString(buffer);
myarguments.Add(stemp);
count++;
}
TIterator* myiter=myarguments.MakeIterator();
while ((stemp=(TObjString*)myiter->Next())!= 0)
{
argument=stemp->GetString();
if(argument.CompareTo("real")==0)
{
isReal = kTRUE;
}
else
{
if(argument.CompareTo("exp")==0)
{
isExp = kTRUE;
}
else
{
if(argument.CompareTo("simulation")==0)
{
isSimulation = kTRUE;
}
else
{
if(argument.CompareTo("filter")==0)
{
doFilter = kTRUE;
}
}
}
}
}
}
}
ClassImp(HTriggerTaskSet)
Last change: Sat May 22 13:17:22 2010
Last generated: 2010-05-22 13:17
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.